building airocrack-ng for ubiquity nanostation (and any other using airos (and any other using mips processor (and any other crosscompile)))

First of all I suggest to download from codesourcery the mips toolchain and do the thing manually. Hopefully sometime ubiquity will provide its users with a decent SDK. If you don’t take my word do the following. Pretty soon you will do the first :D

 Note that this is NOT COMPLETE NOR CORRECT.  I WILL UPDATE AGAIN, STAY TUNED.
  • First of all download airocrack-ng and airos sdk.
  • also download openssl, it will come handy (probably)
  • if you have downloaded debian packaged airos sdk  and you don’t have debian derived distro, then unpack it using the following:
    • ar vx toolchain-mips-ls_0.1-1.deb (this is based on what I downloaded, check yours)
    • untargz the output (this is usually the large archive) : tar -zxvf data.tar.gz
    • update PATH environment variable to use mips compiler instead of the system’s (that is IF your distro comes with a compiler) export PATH=~/ubnt/opt/toolchain/mips_ls/bin/:$PATH (this is for my directory structure update yours accordingly)
  • untargz airocrack distribution: tar -zxvf aircrack-ng-1.1.tar.gz (update accordingly)
  • change directory to the newly created aircrack-ng-1.1: cd aircrack-ng-1.1
  • execute there TOOL_PREFIX=mips-elf-linux-gnu- CFLAGS=”-O2 -march=24kc -EL -static -s” make if you are lucky and the so called airos SDK is a true SDK everything will compile normally

I am pretty sure it won’t.

SIDENOTE: Dear ubiquity toolchain developers: SDK MEANS SOFTWARE DEVELOPMENT KIT. THIS MEANS THAT IT SHOULD CONTAIN THE WHOLE FUCKIN’ LIST OF LIBRARIES THAT ARE NEEDED TO BUILD EXECUTABLES ON TOP OF AIRoS. NOT JUST A FUCKIN’ COMPILER FFS… This is a good time to go and download the codesourcery toolchain as mentioned in the beginning.

  •  Due to these morons we need to probably build openssl, and statically link against airocrack-ng (duuuuuhhhh…)
  • download openssl untar and enter directory
  • edit Configure and add the following line somewhere in the middle of the definitions: (this is simply SAD)
    • “nanostation”, “mips-linux-gnu-gcc:-mabi=32  -DTERMIO -O3 -g -Wall -s -EL::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)”,
  • ./Configure nanostation
  • edit Makefile (with the following):
    • AR= mips-linux-ar $(ARFLAGS) r
    • RANLIB= mips-linux-ranlib
    • NM= mips-linux-nm
    • MAKEDEPPROG= mips-linux-gcc
  • make (yeah right using the jobserver (ie -j5) is not a good idea…)
  • and then compile and statically link againstour own ssl from airocrack.

Now it is the time to setup nfs in your host linux (there we are going to store the airodump capture, and from there we will launch airodump) [example tutorial].

  • edit /etc/export and add something like:
    • /data/nanostation/ 10.140.4.0/255.255.255.0(async,rw,no_subtree_check)
  • (re)start nfs server
  • login to nanostation and mount it:
    • mkdir /tmp/lala
    • mount 10.140.4.1:/data/nanostation /tmp/lala
  • execute airodump from there
    • cd /tmp/lala
    • ./airodump with your favorite options

Please do not try to crack anything from within the nanostation. You will waste precious machine cycles :D Instead do it from the host. Make good usage of the nfs man!

Leave a Comment

Name (required)

Mail (will not be published) (required)

Website

Comment