After I had my iPhone jailbroken, I wanted to try it as a hacking platform. I needed some tools for that.
In Cydia, you can download a bunch of useful apps. Here are some that I downloaded (and where I found them):
Networking:
- nmap
- ngrep
- tcpdump
- netcat
- whois
Admin:
- sudo
- top
To use these, you'll need a Terminal app. I searched and found a Terminal app called MobileTerminal.
This seemed to be the Terminal to use (possibly the only choice), but it kept crashing when I opened it. Thus, I removed it and reinstalled it. It still crashed. Did some research, and this is a 'bug' with IOS 4.0.1. To fix this, I followed the instructions at:
http://www.techpetals.com/install-mobile-terminal-4.26-for-ios-4-4.0.1-iphone-4-3gs-ipad-3.2.1-1803
So, I installed OpenSSH through Cydia (so that I could get into my device through my LAN), and downloaded the MobileTerminal 4.26 debian package referenced above to my Ubuntu laptop.
I tried sshing into my OpenSSH... it hung... OpenSSH seemed a bit buggy. After some trial/error, it seems that ssh only works when the system is not locked.. meaning you have to keep touching the iPhone to keep it from screen-locking. But I was able to ssh in (changed the password, of course), and put the file in with the scp command:
scp /home/john/Desktop/MobileTerminal-426.deb root@192.168.6.144:/var/root/Media/Cydia/AutoInstall/MobileTerminal-426.deb
after reboot, I didn't have MobileTerminal there, so I rebooted again (per the instructions above). Termial still wasn't on my iPhone... hmmmmm.. I scp'd it up again, ssh'ing in to make sure it was there, then rebooted again (just in case I screwed something up the first time). Still not working. So I tried by hand, and here was the result:
iPhone:~/Media/Cydia/AutoInstall root# dpkg -i MobileTerminal-426.deb
dpkg-deb: `MobileTerminal-426.deb' is not a debian format archive
dpkg: error processing MobileTerminal-426.deb (--install):
subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
MobileTerminal-426.deb
ahhhh,,, bad deb archive file... I downloaded the MobileTerminal-426.deb file from another site, and did a diff on the original, and they didn't match. So, I deleted the original, and tried with the new MobileTerminal-426.deb file. SUCCESS! This time after reboot MobileTerminal was loaded, and it worked fine (see screenshot of an nmap ping scan).
For the wifi interface (for ngrep, tcpdump, netcat, etc), I use interface 'en0'
You'll have to dump most data you want to read to a text file, as data scrolls off the screen VERY quickly, and there is no way to scroll back up.
I thought of putting Metasploit and rdesktop (gooerrdp) on the phone, but after using simple tools like nmap, tcpdump, and ngrep, it was clear that screen-real-estate-heavy tools would be too cumbersome to be worth the trouble. The main benifits of an iPhone hacking platform are the always-on and small (covert) form factor the iPhone provides. But it simply didn't seem worth the struggle to use with complex tools. So I'll save them for laptop use.
However, for simple tools, especially ones that don't spit out much data, or spit data that is temporally relevant (like a tcpdump dump), the jailbroken iPhone will certainly come in handy.
In Cydia, you can download a bunch of useful apps. Here are some that I downloaded (and where I found them):
Networking:
- nmap
- ngrep
- tcpdump
- netcat
- whois
Admin:
- sudo
- top
To use these, you'll need a Terminal app. I searched and found a Terminal app called MobileTerminal.
This seemed to be the Terminal to use (possibly the only choice), but it kept crashing when I opened it. Thus, I removed it and reinstalled it. It still crashed. Did some research, and this is a 'bug' with IOS 4.0.1. To fix this, I followed the instructions at:
http://www.techpetals.com/install-mobile-terminal-4.26-for-ios-4-4.0.1-iphone-4-3gs-ipad-3.2.1-1803
So, I installed OpenSSH through Cydia (so that I could get into my device through my LAN), and downloaded the MobileTerminal 4.26 debian package referenced above to my Ubuntu laptop.
I tried sshing into my OpenSSH... it hung... OpenSSH seemed a bit buggy. After some trial/error, it seems that ssh only works when the system is not locked.. meaning you have to keep touching the iPhone to keep it from screen-locking. But I was able to ssh in (changed the password, of course), and put the file in with the scp command:
scp /home/john/Desktop/MobileTerminal-426.deb root@192.168.6.144:/var/root/Media/Cydia/AutoInstall/MobileTerminal-426.deb
after reboot, I didn't have MobileTerminal there, so I rebooted again (per the instructions above). Termial still wasn't on my iPhone... hmmmmm.. I scp'd it up again, ssh'ing in to make sure it was there, then rebooted again (just in case I screwed something up the first time). Still not working. So I tried by hand, and here was the result:
iPhone:~/Media/Cydia/AutoInstall root# dpkg -i MobileTerminal-426.deb
dpkg-deb: `MobileTerminal-426.deb' is not a debian format archive
dpkg: error processing MobileTerminal-426.deb (--install):
subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
MobileTerminal-426.deb
ahhhh,,, bad deb archive file... I downloaded the MobileTerminal-426.deb file from another site, and did a diff on the original, and they didn't match. So, I deleted the original, and tried with the new MobileTerminal-426.deb file. SUCCESS! This time after reboot MobileTerminal was loaded, and it worked fine (see screenshot of an nmap ping scan).
For the wifi interface (for ngrep, tcpdump, netcat, etc), I use interface 'en0'
You'll have to dump most data you want to read to a text file, as data scrolls off the screen VERY quickly, and there is no way to scroll back up.
I thought of putting Metasploit and rdesktop (gooerrdp) on the phone, but after using simple tools like nmap, tcpdump, and ngrep, it was clear that screen-real-estate-heavy tools would be too cumbersome to be worth the trouble. The main benifits of an iPhone hacking platform are the always-on and small (covert) form factor the iPhone provides. But it simply didn't seem worth the struggle to use with complex tools. So I'll save them for laptop use.
However, for simple tools, especially ones that don't spit out much data, or spit data that is temporally relevant (like a tcpdump dump), the jailbroken iPhone will certainly come in handy.
Comments
Post a Comment