{"id":969,"date":"2020-08-06T04:01:47","date_gmt":"2020-08-06T03:01:47","guid":{"rendered":"http:\/\/zerothcode.com\/blog\/?p=969"},"modified":"2020-08-06T04:01:47","modified_gmt":"2020-08-06T03:01:47","slug":"apple-touch-id-flaw-let-attackers-hijack-icloud-accounts","status":"publish","type":"post","link":"https:\/\/zerothcode.com\/blog\/apple-touch-id-flaw-let-attackers-hijack-icloud-accounts\/","title":{"rendered":"Apple Touch ID Flaw Could Have Let Attackers Hijack iCloud Accounts"},"content":{"rendered":"<p>Hijack iCloud Accounts- Apple earlier this year fixed a security vulnerability in iOS and macOS<\/p>\n<p>that could have potentially allowed an attacker to gain unauthorized access to a user&#8217;s iCloud account. Hijack iCloud Accounts<\/p>\n<p>Uncovered in February by Thijs Alkemade, a security specialist at IT security firm Computest,<\/p>\n<p>the flaw resided in Apple&#8217;s implementation of TouchID (or FaceID)<\/p>\n<p>biometric feature that authenticated users to log in to websites on Safari, specifically those that use ID logins.<\/p>\n<p>After the issue was reported to Apple through their responsible disclosure program, the iPhone maker addressed the vulnerability in a server-side update.<\/p>\n<h2>An Authentication Flaw &#8211; Hijack iCloud Accounts<\/h2>\n<p>The central premise of the flaw is as follows. When users try to sign in to a website that requires an ID,<\/p>\n<p>a prompt is displayed to authenticate the login using Touch ID. Hijack iCloud Accounts<\/p>\n<p>Doing so skips the two-factor authentication step since it already leverages a\u00a0combination of factors\u00a0for identification,<\/p>\n<p>such as the device (something you have) and the biometric information (something you are).<\/p>\n<div class=\"ad_two clear\">Contrast this during logins to Apple domains (e.g. &#8220;icloud.com&#8221;) the usual way with an ID and password,<\/div>\n<div class=\"ad_two clear\">wherein<\/div>\n<div class=\"ad_two clear\">the website embeds an iframe pointing to Apple&#8217;s login validation server (&#8220;https:\/\/idmsa.apple.com&#8221;), which handles the authentication process.<\/p>\n<div class=\"separator\">\n<figure style=\"width: 728px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/thehackernews.com\/images\/-xvEDKubG6Mc\/Xyp86BxK32I\/AAAAAAAAAnk\/ZRobwDNLkfs-B_SlY2itqHRJ3WXzsyKbACLcBGAsYHQ\/s728-e100\/apple-id-hacking.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"Apple Touch ID Flaw\" src=\"https:\/\/thehackernews.com\/images\/-xvEDKubG6Mc\/Xyp86BxK32I\/AAAAAAAAAnk\/ZRobwDNLkfs-B_SlY2itqHRJ3WXzsyKbACLcBGAsYHQ\/s728-e100\/apple-id-hacking.jpg\" alt=\"Hijack iCloud Accounts\" width=\"728\" height=\"411\" border=\"0\" data-original-height=\"411\" data-original-width=\"728\" \/><\/a><figcaption class=\"wp-caption-text\">Hijack iCloud Accounts<\/figcaption><\/figure>\n<\/div>\n<p>As shown in the\u00a0video demonstration, the iframe URL also contains two other parameters<\/p><\/div>\n<div class=\"ad_two clear\">\u2014 a &#8220;client_id&#8221; identifying the service (e.g., iCloud) and a &#8220;redirect_uri&#8221; that has the URL to be redirected to after successful verification.<\/p>\n<p>But in the case where a user is validated using TouchID, the iframe is handled differently in that it communicates with the AuthKit daemon<\/p><\/div>\n<div class=\"ad_two clear\">(akd) to handle the biometric authentication and subsequently retrieve a token (&#8220;grant_code&#8221;)<\/div>\n<div class=\"ad_two clear\">that&#8217;s used by the icloud.com page to continue the login process. Hijack iCloud Accounts<\/p>\n<p>To do this, the daemon communicates with an API on &#8220;gsa.apple.com,&#8221;<\/p><\/div>\n<div class=\"ad_two clear\">to which it sends the details of the request and from which it receives the token. Hijack iCloud Accounts<\/p>\n<div class=\"ad_two clear\"><center class=\"cf\"><\/p>\n<div id=\"00000001-c4a4b86a-e97d-4753-a189-27d8fb7bf06b\" class=\"_ap_apex_ad\" data-section=\"00000001-c4a4b86a-e97d-4753-a189-27d8fb7bf06b\" data-orig-id=\"8c2d7f94-a9c5-43b2-83a4-cdcf711ae05e\" data-render-time=\"1596681655389\" data-refresh-time=\"1596681780948\" data-timeout=\"1797\"><\/div>\n<p><\/center><\/div>\n<\/div>\n<div>The security flaw discovered by Computest resides in the aforementioned gsa.apple.com API, which made it theoretically possible to abuse those domains to verify a client ID without authentication.<\/p>\n<p>&#8220;Even though the client_id and redirect_uri were included in the data submitted to it by akd,<\/p><\/div>\n<div>it did not check that the redirect URI matches the client ID,&#8221;<\/div>\n<div>Alkemade noted. &#8220;Instead, there was only a whitelist applied by AKAppSSOExtension on the domains.<\/div>\n<div>All domains ending with apple.com, icloud.com and icloud.com.cn were allowed.&#8221; Hijack iCloud Accounts<\/p>\n<div class=\"separator\">\n<figure style=\"width: 728px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/thehackernews.com\/images\/-qTpC3zBEcZM\/Xyp86awWmTI\/AAAAAAAAAno\/hl_bX9jNMgM5hTg5hPJRB9JmNUeWqn-lACLcBGAsYHQ\/s728-e100\/hacking-apple-icloud.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"Apple Touch ID Flaw\" src=\"https:\/\/thehackernews.com\/images\/-qTpC3zBEcZM\/Xyp86awWmTI\/AAAAAAAAAno\/hl_bX9jNMgM5hTg5hPJRB9JmNUeWqn-lACLcBGAsYHQ\/s728-e100\/hacking-apple-icloud.jpg\" alt=\"Hijack iCloud Accounts\" width=\"728\" height=\"436\" border=\"0\" data-original-height=\"436\" data-original-width=\"728\" \/><\/a><figcaption class=\"wp-caption-text\">Hijack iCloud Accounts<\/figcaption><\/figure>\n<\/div>\n<p>This means that an attacker could exploit a cross-site scripting vulnerability on any one of Apple&#8217;s subdomains to run a malicious snippet<\/p><\/div>\n<div>of JavaScript code that can trigger a login prompt using the iCloud client ID, and use the grant token to obtain a session on icloud.com.<\/p>\n<h2>Apple Setting Up Fake Hotspots to Take Over iCloud Accounts<\/h2>\n<p>In a separate scenario, the attack could be executed by embedding JavaScript on the\u00a0<a href=\"https:\/\/captive.apple.com\/hotspot-detect.html\" target=\"_blank\" rel=\"noopener noreferrer\">web page<\/a>\u00a0that&#8217;s displayed when connecting to a<\/div>\n<div>Wi-Fi network for the first time (via &#8220;captive.apple.com&#8221;), thus allowing an attacker access to a user&#8217;s account by just accepting a TouchID prompt from that page.<\/p>\n<p>&#8220;A malicious Wi-Fi network could respond with a page with JavaScript which initiates OAuth as iCloud,&#8221;<\/p><\/div>\n<div><\/div>\n<div>\u00a0<a href=\"https:\/\/twitter.com\/xnyhps\/status\/1230383935118598144\" target=\"_blank\" rel=\"noopener noreferrer\">Alkemade said<\/a>. &#8220;The user receives a TouchID prompt, but it&#8217;s very unclear what it implies.<\/div>\n<div><\/div>\n<div>If the user authenticates on that prompt, their session token will be sent to the malicious site, giving the attacker a session for their account on iCloud.&#8221;<\/p>\n<p>&#8220;By setting up a fake hotspot in a location where users expect to receive a captive portal (for example at an airport, hotel or train station),<\/p><\/div>\n<div><\/div>\n<div>it would have been possible to gain access to a significant number of iCloud accounts,<\/div>\n<div><\/div>\n<div>which would have allowed access to backups of pictures, location of the phone, files, and much more,&#8221; he added.<\/p>\n<p>This is not the first time security issues have been found in Apple&#8217;s authentication infrastructure. In May,\u00a0<a href=\"https:\/\/thehackernews.com\/2020\/05\/sign-in-with-apple-hacking.html\" target=\"_blank\" rel=\"noopener noreferrer\">Apple patched a flaw<\/a>\u00a0impacting its<\/div>\n<div><\/div>\n<div>&#8220;Sign in with Apple&#8221; system that could have made it possible for remote attackers to bypass authentication and take over targeted users&#8217;<\/div>\n<div><\/div>\n<div>accounts on third-party services and apps that have been registered using Apple&#8217;s sign-in option.<\/div>\n<div><\/div>\n<div>You May also like to read: <a href=\"http:\/\/zerothcode.com\/blog\/unc0ver-advanced-jailbreak-iphone-hack\/\">http:\/\/zerothcode.com\/blog\/unc0ver-advanced-jailbreak-iphone-hack\/<\/a><\/div>\n<div><\/div>\n<div>You May also like to read: <a href=\"http:\/\/zerothcode.com\/blog\/visiting-site-can-hack-iphone\/\">http:\/\/zerothcode.com\/blog\/visiting-site-can-hack-iphone\/<\/a><\/div>\n<div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Hijack iCloud Accounts- Apple earlier this year fixed a security vulnerability in iOS and macOS that could have potentially allowed<\/p>\n","protected":false},"author":1,"featured_media":970,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[37],"tags":[],"yst_prominent_words":[238,1565,1571,303,1559,494,391,1566,1569,352,1574,1573,1572,1558,1567,1555,1570,260,1568,861],"class_list":["post-969","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hackers-news"],"_links":{"self":[{"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/posts\/969","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/comments?post=969"}],"version-history":[{"count":0,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/posts\/969\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/media\/970"}],"wp:attachment":[{"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/media?parent=969"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/categories?post=969"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/tags?post=969"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/zerothcode.com\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}