Archive for the ‘iPhone Espionage’ Category

iPhone Espionage Writeup on InfosecInstitute

October 31, 2011 1 comment

A more in-depth writeup on the IPhone espionage project has been posted at

Breaking Enterprise iPhone Application Security ?

October 17, 2011 1 comment

There are a couple of enterprise iPhone applications out there that promises over the air and device encryption. (e.g. MS Exchange email sandbox apps).

However, there is a fundamental issue. Some of these iPhone applications are built upon the iOS frameworks like UIViewController which provides the layout of the applications.

It is possible to hook onto these classes on a jailbroken iPhone to perform screen captures of confidential emails in your so called sandbox applications. When used together with a iPhone keyboard logger ( which hooks on the UIKeyboardImpl class and captures all keystrokes that you have entered, including any passwords.

In this case, if your jailbroken device is compromised, there is only so much you can do even if you are using an iPhone application that provides encryption or security.

Should you allow jailbroken iPhones in your organization?

Should your enterprise application detect if the device is a jailbroken iPhone and exit the application if a jailbroken iPhone is detected ?

Please let me know what you think.

Source code can be found at the below link

Slide deck and Short Video for iPhone Espionage talk at HackInTheBox Malaysia 2011

October 12, 2011 Leave a comment

The slide deck can be downloaded here. .

A demo video for the basic tool can be found here

Categories: iPhone Espionage

iPhone Espionage

October 12, 2011 1 comment

Slashdot published this article “iPhone’s PIN-Based Security Transparent To Ubuntu” in May 2010.   This shouldn’t work on Jailbroken iPhone 4 as the vulnerability is reported so long ago.

Using the below tool, you are able to access SMS database and other confidential information which are supposed to be protected on a passcode protected jailbroken iPhone.  Well, if you have a non jailbroken iPhone, you are safe!

In order to recreate the demo that I did in HackInTheBox, you will need to run the below on your Ubuntu/Debian system or you can download the shell script from

  • apt-get install libusb-dev usbmuxd libimobiledevice-dev libplist-dev libgnutls-dev build-essential libgnutls-dev libxml2-dev libreadline5-dev libgcrypt-dev libglib2.0-dev libplist-dev libusbmuxd-dev usbmuxd make automake autoconf libtool gcc python-dev git libfuse-dev libimobiledevice-utils -y
  • mkdir /tmp1 && cd /tmp1
  • git clone
  • cd libiphone && ./ && ./configure && make && make install
  • cd /tmp1
  • git clone
  • cd ifuse && ./ && ./configure -prefix=/ && make && make install
  • cd /tmp1
  • wget
  • bunzip2 -d ideviceinstaller-1.0.0.tar.bz2 && tar xvf ideviceinstaller-1.0.0.tar && cd ideviceinstaller-1.0.0 && ./configure && make && make install
  • cd /tmp1
  • apt-get install libgtk2.0-dev libnautilus-extension-dev intltool libzip-dev -y
  • wget
  • bunzip2 -d nautilus-ideviceinfo-0.1.0.tar.bz2 && tar xvf nautilus-ideviceinfo-0.1.0.tar && cd nautilus-ideviceinfo-0.1.0 && ./configure && make && make install

After installing the prerequisites, create a folder called /tmp1 and download the file and put it inside /tmp1

Since we are unable to use launchctl command to allow our binaries to run during setup, we need to find an alternative means.

It seems possible to overwrite the plist file for any iOS service and iOS doesnt do any verification at all.  We have identified a list of launch daemons which can be safely replaced to execute our own executable instead.

You might want to modify the plist file with the time and executable that you want it to execute.

Next, you will download (from and put it inside /tmp1/ as well.

Run and then connect your iPhone to one of the USB ports on your computer.

It should rip out a couple of databases like google maps cached location, call history database, SMS database and cell tower location database.

It should not take more than 3 seconds if you connect it locally instead of via a VM.

Edit and compile and then save it in /tmp1/Transfer/sql12.

sql2 is a iPhone tool which is a POC code which extracts your Facebook caches/database as well as Dropbox offline files.
You can find more tools which you can deploy via scanUSB from here

You might want to recompile this with your own email address and password so that it delivers the information to your email.

Run /tmp/ and then connect your iPhone.

Let me know if you face any issues or have any suggestions on how I can improve the tools.  Enjoy!

Categories: iPhone Espionage