19.11.2016 Views

Technical Analysis of the Pegasus Exploits on iOS

eNQc3Ry

eNQc3Ry

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

In order to determine <str<strong>on</strong>g>the</str<strong>on</strong>g> platform (hardware) <str<strong>on</strong>g>of</str<strong>on</strong>g> <str<strong>on</strong>g>the</str<strong>on</strong>g> victim’s device, a call is made to<br />

sysctlbyname for <str<strong>on</strong>g>the</str<strong>on</strong>g> hw.machine object. Ano<str<strong>on</strong>g>the</str<strong>on</strong>g>r call to sysctlbyname is made for <str<strong>on</strong>g>the</str<strong>on</strong>g><br />

kern.osversi<strong>on</strong> informati<strong>on</strong>. From <str<strong>on</strong>g>the</str<strong>on</strong>g>se two calls, Stage 2 is able to accurately determine<br />

<str<strong>on</strong>g>the</str<strong>on</strong>g> platform and <strong>iOS</strong> kernel versi<strong>on</strong>s. This informati<strong>on</strong> is <str<strong>on</strong>g>the</str<strong>on</strong>g>n used to find a data structure that<br />

defines <str<strong>on</strong>g>the</str<strong>on</strong>g> various memory <str<strong>on</strong>g>of</str<strong>on</strong>g>fsets that Stage 2 will use for its exploitati<strong>on</strong> operati<strong>on</strong>s. If Stage<br />

2 is unable to find <str<strong>on</strong>g>the</str<strong>on</strong>g> appropriate data structure for <str<strong>on</strong>g>the</str<strong>on</strong>g> platform/<strong>iOS</strong> combinati<strong>on</strong>, <str<strong>on</strong>g>the</str<strong>on</strong>g> process<br />

executes <str<strong>on</strong>g>the</str<strong>on</strong>g> assert callback and exits.<br />

Stage 2 uses a lock file during its executi<strong>on</strong>. As part <str<strong>on</strong>g>of</str<strong>on</strong>g> <str<strong>on</strong>g>the</str<strong>on</strong>g> setup <str<strong>on</strong>g>of</str<strong>on</strong>g> <str<strong>on</strong>g>the</str<strong>on</strong>g> working envir<strong>on</strong>ment,<br />

Stage 2 establishes <str<strong>on</strong>g>the</str<strong>on</strong>g> filename and path global variables for <str<strong>on</strong>g>the</str<strong>on</strong>g> lock file as<br />

$HOME/tmp/lock (Note: $HOME is an applicati<strong>on</strong> specific variable).<br />

The 32 bit versi<strong>on</strong> <str<strong>on</strong>g>of</str<strong>on</strong>g> <str<strong>on</strong>g>the</str<strong>on</strong>g> Stage 2 binary has 100 different combinati<strong>on</strong>s <str<strong>on</strong>g>of</str<strong>on</strong>g> platform and <strong>iOS</strong> that<br />

it supports, as identified in <str<strong>on</strong>g>the</str<strong>on</strong>g> table below.<br />

<strong>iOS</strong> Versi<strong>on</strong><br />

iPh<strong>on</strong>e 4S<br />

(“iPh<strong>on</strong>e4,1”)<br />

iPh<strong>on</strong>e 5<br />

(“iPh<strong>on</strong>e5,1”)<br />

iPh<strong>on</strong>e 5<br />

(“iPh<strong>on</strong>e5,2”)<br />

iPh<strong>on</strong>e 5c<br />

(“iPh<strong>on</strong>e5,3”)<br />

iPh<strong>on</strong>e 5c<br />

(“iPh<strong>on</strong>e5,4”)<br />

9.0 ✅ ✅ ✅ ✅ ✅<br />

9.0.1 ✅ ✅ ✅ ✅ ✅<br />

9.0.2 ✅ ✅ ✅ ✅ ✅<br />

9.1 ✅ ✅ ✅ ✅ ✅<br />

9.2 ✅ ✅ ✅ ✅ ✅<br />

9.2.1 ✅ ✅ ✅ ✅ ✅<br />

9.3 (13E233) ✅ ✅ ✅ ✅ ✅<br />

9.3 (13E237) ✅ ✅ ✅ ✅ ✅<br />

9.3 Beta ✅ ✅<br />

9.3 Beta 3 ✅<br />

9.3 Beta 6 ✅<br />

9.3 Beta 7 ✅<br />

9.3.1 ✅ ✅ ✅ ✅ ✅<br />

9.3.2 Beta ✅ ✅ ✅ ✅ ✅<br />

Page 14

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!