Hi, I've found another nmap cross compilation manual by Vlatko Kosturjak, an Nmap contributor: https://secwiki.org/w/Nmap/Android
It involves using the Android NDK and it reccomends binding the cross compiled Nmap statically to a precompiled openssl so all the options are available. There is a linked Makefile on the wiki which can be changed so it compiles Nmap with openssl. The android openssl repository can be found at: git://android.git.kernel.org/platform/external/openssl.git So far I've successfully compiled it and ran it on my Samsung Galaxy S but without linking it to openssl, and I've also tested some of the features available (ex. script execution). I'll try compiling it with openssl as soon as I finish updating my GSoC proposal. On Sun, Apr 1, 2012 at 1:00 AM, Angad Singh <an...@angad.sg> wrote: > > Here is the script so that you can compile the nmap binaries for android. It > downloads the toolchain, nmap source and does everything for you. > You just need to run the script. > > https://github.com/angad/nmap-android/blob/master/nmap-android.sh > This script was tested on Ubuntu 11.04. > Please try this script and see if there are any binaries generated in > ~/nmap-android/bin > Let me know if you face any issues. > > Thanks, > Angad > > @Adriano: I already have an account. I will do a blog post soon. Thanks. > > > On Sat, Mar 31, 2012 at 4:07 AM, Adriano Marques <py.adri...@gmail.com> wrote: >> >> That is awesome Angad! >> >> Do you already have an author account in our blog? If you don't I can setup >> right now so you can post that there. >> >> >> On Sat, Mar 31, 2012 at 5:48 AM, Angad Singh <an...@angad.sg> wrote: >>> >>> I was able to compile nmap for Android. I will come up with a script soon >>> but here are the basic steps. >>> I will do a blog post on this soon when I have made a script for this. If >>> you need the binaries for Android you can get them >>> here http://code.angad.sg/nmap/ >>> >>> This will be integrated into the ns-mobile for android project. >>> >>> Cross Compiling nmap for Android - >>> >>> - Compiled on Ubuntu 11.04 for a device running Android ICS 4.0 with linux >>> kernel 3.0.16 >>> >>> Download and setup the cross-compile toolchain >>> https://sourcery.mentor.com/sgpp/lite/arm/portal/package9730/public/arm-none-linux-gnueabi/arm-2011.09-70-arm-none-linux-gnueabi.bin >>> >>> I specify the CC, LD, AR, RANLIB variables. They point to the respective >>> binaries from the toolchain. >>> Add the toolchain binaries to the path. >>> >>> To configure : >>> >>> ac_cv_func_getpgrp=yes ac_cv_func_setpgrp=yes ac_cv_linux_vers=3.0.16 >>> RANLIB='arm-none-linux-gnueabi-ranlib' LD='arm-none-linux-gnueabi-ld' >>> AR='arm-none-linux-gnueabi-ar' CC='arm-none-linux-gnueabi-gcc' >>> CXX='arm-none-linux-gnueabi-g++' ./configure --host=arm-linux-gnueabi >>> --without-nmapfe --with-pcap=linux --with-libpcap=included >>> --with-liblua=included >>> >>> Edit the Makefile and change STATIC = -static >>> >>> Run make. You should get the statically linked binary for nmap. >>> Check it by using file nmap >>> nmap: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, >>> for GNU/Linux 2.6.16, not stripped >>> >>> Connect your phone and adb push the following files to /data/local/nmap >>> >>> nmap >>> nmap-mac-prefixes >>> nmap-os-db >>> nmap-payloads >>> nmap-protocols >>> nmap-rpc >>> nmap-service-probes >>> nmap-services >>> nse_main.lua >>> nselib/ >>> scripts/ >>> >>> Android cannot resolve hostname to IP. So you will have to use the IP >>> address for scans. >>> Here is a nmap scan for scanme.nmap.org from Android. >>> >>> root@android:/data/local # ./nmap -v -A 74.207.244.221 >>> >>> Starting Nmap 5.51 ( http://nmap.org ) at 2012-03-31 08:15 UTC >>> NSE: Loaded 57 scripts for scanning. >>> Initiating Ping Scan at 08:15 >>> Scanning 74.207.244.221 [4 ports] >>> Completed Ping Scan at 08:15, 0.17s elapsed (1 total hosts) >>> mass_dns: warning: Unable to open /etc/resolv.conf. Try using --system-dns >>> or specify valid servers with --dns-servers >>> mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is >>> disabled. Try using --system-dns or specify valid servers with --dns-servers >>> Initiating SYN Stealth Scan at 08:15 >>> Scanning 74.207.244.221 [1000 ports] >>> Discovered open port 22/tcp on 74.207.244.221 >>> Discovered open port 80/tcp on 74.207.244.221 >>> Increasing send delay for 74.207.244.221 from 0 to 5 due to 55 out of 181 >>> dropped probes since last increase. >>> Completed SYN Stealth Scan at 08:16, 78.83s elapsed (1000 total ports) >>> Initiating Service scan at 08:16 >>> Scanning 2 services on 74.207.244.221 >>> Completed Service scan at 08:16, 5.01s elapsed (2 services on 1 host) >>> Initiating OS detection (try #1) against 74.207.244.221 >>> Retrying OS detection (try #2) against 74.207.244.221 >>> Initiating Traceroute at 08:16 >>> Completed Traceroute at 08:17, 9.07s elapsed >>> NSE: Script scanning 74.207.244.221. >>> Initiating NSE at 08:17 >>> Completed NSE at 08:18, 60.01s elapsed >>> Nmap scan report for 74.207.244.221 >>> Host is up (0.036s latency). >>> Not shown: 874 filtered ports, 124 closed ports >>> PORT STATE SERVICE VERSION >>> >>> Let me know if there are any issues or any thing I have missed here :) >>> >>> Cheers, >>> Angad >>> >>> ------------------------------------------------------------------------------ >>> This SF email is sponsosred by: >>> Try Windows Azure free for 90 days Click Here >>> http://p.sf.net/sfu/sfd2d-msazure >>> _______________________________________________ >>> Umit-devel mailing list >>> Umit-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/umit-devel >>> >> >> >> >> -- >> Adriano Monteiro Marques >> >> http://www.openmonitor.org >> http://www.umitproject.org >> http://www.thoughtspad.com >> >> "Don't stay in bed, unless you can make money in bed." - George Burns >> > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Umit-devel mailing list > Umit-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/umit-devel > -- Gorjan ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Umit-devel mailing list Umit-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/umit-devel