{"id":34477,"date":"2021-12-17T11:28:34","date_gmt":"2021-12-17T16:28:34","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=34477"},"modified":"2024-09-16T20:44:35","modified_gmt":"2024-09-17T00:44:35","slug":"forcedentry-imessage-zero-click-remote-code-execution","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2021\/12\/17\/forcedentry-imessage-zero-click-remote-code-execution\/","title":{"rendered":"FORCEDENTRY iMessage Zero-click Remote Code Execution"},"content":{"rendered":"<p><a href=\"https:\/\/googleprojectzero.blogspot.com\/2021\/12\/a-deep-dive-into-nso-zero-click.html\">Ian Beer &amp; Samuel Gro&szlig;<\/a> (<a href=\"https:\/\/news.ycombinator.com\/item?id=29568625\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/googleprojectzero.blogspot.com\/2021\/12\/a-deep-dive-into-nso-zero-click.html\"><p>Based on our research and findings, we assess this to be one of the most technically sophisticated exploits we&rsquo;ve ever seen, further demonstrating that the capabilities NSO provides rival those previously thought to be accessible to only a handful of nation states.<\/p><p>The vulnerability discussed in this blog post was fixed on September 13, 2021 in <a href=\"https:\/\/support.apple.com\/en-us\/HT212807\">iOS 14.8<\/a> as CVE-2021-30860.<\/p><p>[&#8230;]<\/p><p>Using this &ldquo;fake gif&rdquo; trick, over 20 image codecs are suddenly part of the iMessage zero-click attack surface, including some very obscure and complex formats, remotely exposing probably hundreds of thousands of lines of code.<\/p><\/blockquote>\n<p>My <a href=\"https:\/\/mjtsai.com\/blog\/2021\/07\/23\/through-the-blast-door\/\">question<\/a> answered: iMessage was calling into ImageIO from outside of the Blast Door sandbox.<\/p>\n<blockquote cite=\"https:\/\/googleprojectzero.blogspot.com\/2021\/12\/a-deep-dive-into-nso-zero-click.html\"><p>The CoreGraphics PDF parser doesn&rsquo;t <em>seem<\/em> to interpret javascript, but NSO managed to find something equally powerful inside the CoreGraphics PDF parser&#8230;<\/p><p>[&#8230;]<\/p><p>As mentioned above, the substitution based compression output is lossy. After a round of compression and decompression the rendered output doesn&rsquo;t look exactly like the input. But JBIG2 also supports lossless compression as well as an intermediate &ldquo;less lossy&rdquo; compression mode. [&#8230;] Rather than completely encoding the entire difference in one go, it can be done in steps, with each iteration using a logical operator (one of AND, OR, XOR or XNOR) to set, clear or flip bits. Each successive refinement step brings the rendered output closer to the original and this allows a level of control over the &ldquo;lossiness&rdquo; of the compression. The implementation of these refinement coding steps is very flexible and they are also able to &ldquo;read&rdquo; values already present on the output canvas.<\/p><p>[&#8230;]<\/p><p>The heap groom also places the current page&rsquo;s backing buffer just below the undersized <code>syms<\/code> buffer, such that when the page <code>JBIG2Bitmap<\/code> is unbounded, it&rsquo;s able to read and write its own fields[&#8230;]<\/p><p>[&#8230;]<\/p><p>JBIG2 doesn&rsquo;t have scripting capabilities, but when combined with a vulnerability, it does have the ability to emulate circuits of arbitrary logic gates operating on arbitrary memory. So why not just use that to build your <em>own<\/em> computer architecture and script that!? That&rsquo;s exactly what this exploit does. Using over 70,000 segment commands defining logical bit operations, they define a small computer architecture with features such as registers and a full 64-bit adder and comparator which they use to search memory and perform arithmetic operations.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/matthew_d_green\/status\/1471306384356556800\">Matthew Green<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/matthew_d_green\/status\/1471306384356556800\">\n<p>I got to this part in the exploit description and it stopped being an exploit, became something more like art.<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/11\/24\/apple-sues-nso-group\/\">Apple Sues NSO Group<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/09\/13\/zero-click-imessage-attacks\/\">Zero-click iMessage Attacks<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/07\/23\/through-the-blast-door\/\">Through the Blast Door<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Ian Beer &amp; Samuel Gro&szlig; (Hacker News): Based on our research and findings, we assess this to be one of the most technically sophisticated exploits we&rsquo;ve ever seen, further demonstrating that the capabilities NSO provides rival those previously thought to be accessible to only a handful of nation states.The vulnerability discussed in this blog post [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2021-12-17T16:28:37Z","apple_news_api_id":"2e69d67d-30f7-48ae-a21c-aac069ca9cf9","apple_news_api_modified_at":"2024-09-17T00:44:37Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/ALmnWfTD3SK6iHKrAacqc-Q","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[131,357,2095,453,140,31,1837,346,2149,30,141,2657,345,178,48],"class_list":["post-34477","post","type-post","status-publish","format-standard","hentry","category-technology","tag-bug","tag-compression","tag-exploit","tag-gif","tag-imessage","tag-ios","tag-ios-14","tag-javascript","tag-jbig2","tag-mac","tag-messages","tag-nso-group","tag-pdf","tag-quartz","tag-security"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=34477"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34477\/revisions"}],"predecessor-version":[{"id":34478,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34477\/revisions\/34478"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=34477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=34477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=34477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}