Running a full pentesting environment in your Android phone

Hi guys, we've been working on a pet project that we want to share. This is the first release (hopefully the first of many if you find it useful) of a gentoo powered system image for android based phones (and maybe other arm compatible devices) with a selection of tools that a pentester might find useful to have in his/her pocket.

Some of the tools that it includes are:

  • Metasploit 2.7 and 3.4
  • Nmap
  • w3af
  • Amap
  • Openssh
  • Tightvnc
  • Scapy
  • Python, Perl and Ruby interpreters
  • and many more.

Because it's based on gentoo is pretty easy to customize and add or remove packages from it (soon we will post a tutorial on that).

Requirements:

  • A rooted phone (you'll need root privileges to mount the image). I've been testing it on a Samsung Spica phone (800mhz, Android 2.1, 256 ram) and it runs fine. It does not use the uclibc toolchain so it will use more memory than other embedded apps. You'll also need 1gb of space in your memory card.
  • NOTE: The build was done targeting a generic arm processor. If you have some other device with such processor and a good amount of ram it will probably work for you too (let us know!).

  • ConnectBot, Scripting Layer for Android (SL4A) or another terminal emulator for Android.
  • ** Update 07/09/2010: Based on feedback it seems that some devices don't have 'ext2' support (the filesystem that I've used for the img). I'll try to make another release using yaffs2 soon

How to use it:

WARNING: THE IMAGE WILL HAVE ACCESS TO YOUR PHONE'S WHOLE /DEV DIRECTORY. WE WILL NOT TAKE RESPONSIBILITY FOR ANY DAMAGES YOU MIGHT DO TO YOUR PHONE.

Some things that are missing from the image and that we need to improve:

  • An Android gui for the most commonly used tools (and to automate the mounting process).
  • Trimming down the fat from the image (Right now is a full blown linux basesystem).
  • Saving configurations and files across sessions.
  • It's slow. It was build using generic compilation flags so there is room for improvement.

Screenshots

Running Metasploit 3.4

Running NMAP

Keep in mind that this is an alpha release that has not been tested in "real world" scenarios. For suggestions, ideas, comments you can contact us at info at ribadeohacklab.com.ar. Kudos to the gentoo dev team for a kick-ass distro. Enjoy!

Shameless shoutout: If someone has found a way to put the bcm4329 driver in Monitor Mode or can point me in an useful direction to find it drop me a line at fdeguzman at ribadeohacklab.com.ar . Thx!