Android VM remote debugging with IDA

If you want to remote debug an android binary in a VM, you can use IDA easily, but if, like me, you run IDA in an virtual machine, you need a trick.

IDA have binary for remote debug, you don’t need gdbserver,
ida-bin

So firstly copy android_server binary in your VM in the sdcard file, or use

adb push android_server /data/local/tmp

Start a shell on your Android VM and start android_server (don’t forget to add execute permission (chmod 755))

and-shell

Forward the debug port (23946), for use it on your local machine, now android_server port is just bind on your lo interface, it’s not accessible from an other interface, and you can’t use iptable to forward it. But redir can!

redir

Check it with a useful mnemonic command:
lapute
It’s cool ;)

Now configure IDA, select remote ARM Linux/Android debugger and Debugger->Process options:

conf-ida

Don’t forget to add just the remote paths, if IDA can’t find the binary in the android VM, he will upload it.

That’s all :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>