
{"id":187,"date":"2014-12-17T22:12:38","date_gmt":"2014-12-17T20:12:38","guid":{"rendered":"http:\/\/remchp.com\/blog\/?p=187"},"modified":"2017-02-16T18:00:43","modified_gmt":"2017-02-16T16:00:43","slug":"android-vm-remote-debugging-with-ida","status":"publish","type":"post","link":"https:\/\/futex.re\/blog\/?p=187","title":{"rendered":"Android VM remote debugging with IDA"},"content":{"rendered":"<p>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.<\/p>\n<p>IDA have binary for remote debug, you don&#8217;t need gdbserver,<br \/>\n<img decoding=\"async\" src=\"https:\/\/futex.re\/blog\/wp-content\/uploads\/2014\/12\/bin-ida.png\" alt=\"ida-bin\" \/><\/p>\n<p>So firstly copy android_server binary in your VM in the sdcard file, or use<br \/>\n<code><br \/>\nadb push android_server \/data\/local\/tmp<br \/>\n<\/code><\/p>\n<p>Start a shell on your Android VM and start android_server (don&#8217;t forget to add execute permission (chmod 755))<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/futex.re\/blog\/wp-content\/uploads\/2014\/12\/and-shell.png\" alt=\"and-shell\" \/><\/p>\n<p>Forward the debug port (23946), for use it on your local machine, now android_server port is just bind on your lo interface, it&#8217;s not accessible from an other interface, and you can&#8217;t use iptable to forward it. But redir can!<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/futex.re\/blog\/wp-content\/uploads\/2014\/12\/redir.png\" alt=\"redir\" \/><\/p>\n<p>Check it with a useful mnemonic command:<br \/>\n<img decoding=\"async\" src=\"https:\/\/futex.re\/blog\/wp-content\/uploads\/2014\/12\/netstat.png\" alt=\"lapute\" \/><br \/>\nIt&#8217;s cool \ud83d\ude09<\/p>\n<p>Now configure IDA, select remote ARM Linux\/Android debugger and Debugger->Process options:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/futex.re\/blog\/wp-content\/uploads\/2014\/12\/conf-ida.png\" alt=\"conf-ida\" \/><\/p>\n<p>Don&#8217;t forget to add just the remote paths, if IDA can&#8217;t find the binary in the android VM, he will upload it.<\/p>\n<p>That&#8217;s all \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;t &hellip; <a href=\"https:\/\/futex.re\/blog\/?p=187\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/futex.re\/blog\/index.php?rest_route=\/wp\/v2\/posts\/187"}],"collection":[{"href":"https:\/\/futex.re\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/futex.re\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/futex.re\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/futex.re\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=187"}],"version-history":[{"count":10,"href":"https:\/\/futex.re\/blog\/index.php?rest_route=\/wp\/v2\/posts\/187\/revisions"}],"predecessor-version":[{"id":226,"href":"https:\/\/futex.re\/blog\/index.php?rest_route=\/wp\/v2\/posts\/187\/revisions\/226"}],"wp:attachment":[{"href":"https:\/\/futex.re\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/futex.re\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/futex.re\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}