H.D. Moore has released instructions on writing a critical exploit that leverages a bug in how Apples iPhone handles TIFF image files and, to enable the writing of exploits, has put out a new version of his Weasel debugger that can handle the peculiarities of the phones ARM processors.
At this point, the exploit can only take over phones that have been tinkered with, but Moore is promising to post instructions on how to exploit unmodified iPhones soon.
The vulnerability in question is in libtiff, the iPhones library for reading and writing TIFF files. From the get-go, Apple, of Cupertino, Calif., shipped the iPhone with a vulnerable version of libtiff and didnt bother to fix it in the recent 1.1.1 update—”fortunately for the iPhone development community,” Moore noted in an Oct. 11 posting that was the first of his two-part series on cracking the iPhone.
The vulnerability can be exploited through the phones MobileSafari Web browser.
The TIFF bug has been kicking around for a while, and in its now-embryonic form could well be a serious security threat to the iPhone in future versions, given that it entails gaining shellcode access and the ability to do virtually anything on the device.
Charlie Miller—a researcher with Baltimore-based Independent Security Evaluators and one of a trio of people who first unveiled security issues with the iPhone and released iPhone “vibrate” shellcode at Black Hat 2007—told eWEEK that the TIFF vulnerability is a serious issue. He himself was approached a few weeks ago by researchers who wanted to know what they could do with a TIFF bug on the iPhone.
The iPhone: A pocket-sized hacking platform. Click here to read more.
“They showed me a TIFF which would crash mobileSafari. I told them, as I reported in our original iPhone work, that with a mobileSafari bug, you can do anything you could do with a process running with root privileges, which is, well, anything,” he said in an e-mail message. “As for this Metasploit module, Im sure it works great.”
However, not all iPhone users will be vulnerable, in spite of Apples failure to fix the bug. Thats because exploiting the TIFF vulnerability requires that specific shellcode be run on the phone. Moore, a well-known security researcher and father of the popular Metasploit Framework pen-testing tool, includes shellcode in his posting that will only work on a phone that has been modified to add on extra tools.
“This exploit works great on modified iPhones that have an existing /bin/sh, but will fail on unmodified iPhones,” he said.
Moore is promising, however, that the next installation in his “Cracking the iPhone” series will cover how to develop shellcode for unmodified phones—as in, the phones as they exist out of the box and untampered with.
Check out eWEEK.coms Security Center for the latest security news, reviews and analysis. And for insights on security coverage around the Web, take a look at eWEEKs Security Watch blog.