July 31, 2015

A Nifty Little Hacking Machine


   

Two months on, my Raspberry Pi 2 Model B (about Php1,600.00) is proving to be a tinkerer's delight. Being an ARM CPU-based "computer", it is capable of running a variety of distros optimized for the RPi2 hardware. Like most noobs, I opted for the Raspbian Debian "Wheezy", which I've managed to break and un-break several times in a sort of getting-to-know-you way. Getting the Wheezy from the Raspberry Pi Website into my RPi2 involves quite a few things: formatting a compatible SD card ("SDFormatter" is recommended) and burning the Wheezy image into it (I prefer the "Apple Pi Baker"), booting up and configuring the RPi2 proved to be quite an involved process. Looking for software to do the formatting and image burning by itself was quite a tedious process because I have to find and test each one to find out what works on my MacBook circa 2007. And as I am wont to do, I went through the install/configure/install process several times just for the sheer pleasure (or pain) of it. And picking up bits and pieces of tech voodoo along the way.

    On its first boot I plugged the RPi2 to an Ethernet, an old Apple aluminum keyboard and a 40-inch Sony flat screen TV and watched the gobbledygook scroll up the screen. Truly boring stuff-- much like watching paint dry, so in the meanwhile I pinged (using "Fing" on my iPhone) my router and zeroed in on the RPi2's IP address. With that info I moseyed over to my trusty old MacBook and SSHed to the RPi which surprisingly just worked without further configuration. I unplugged the TV and the keyboard and proceeded with the rest of the update/upgrade/configuration headless.

   Going all out portable on the RPi2 I dug up my Edimax nano WiFi adapter (Php650.00) and a power bank with a 5V/2A output a friend gave me (I used it as a back-up power for my MacBook). To my surprise the Edimax is plug and play and the power bank supplied ample power.

    Last week, I got a 2.8TFT capacitive touch screen (Php2,300.00) and got it to work on the RPi2 with a kernel patch. Though the touch screen works fine for finger input, it's more for show than for practical use. I intend to get a mini keyboard later on (Rii mini keyboard-- about Php850.00). In the meantime, I'll be using my full Apple keyboard-- which needless to state, is an anti-thesis to the concept of portability.

    With the prospect of a cheap portable throw-away hacking machine all it needs now is some decent hacking tools. And so I installed the Kali-Linux. I imagine myself sitting in Starbucks and wardriving the unwary tech-savvy posers-- something I used to do in the early days of WiFi before things got complicated and posers became somewhat smarter.

    Installing Kali Linux was a breeze. Getting the 2.8 TFT screen to work took some time to figure out (--basically using a kernel patch) but what really got me stuck was getting the RPi2 into the air-- I just could not make the Edimax nano WiFi adapter (EW-7811Un) to work (which, by the way, is plug-and-play in Wheezy). I knew and have confirmed that Kali Linux recognizes the Edimax with a "root@kali:~# dmesg". Running "root@kali:~# lsusb" likewise shows the same thing. But after trying all the work-arounds to make it work, it was a no go.

    After much head scratching and googling, I stumbled upon the information that since kernel version 3.0 of Kali, a driver (rtl8192cu)-- which supports the RTL8188CUS chipset of the EW-7811Un, is buried deep within the Kali distro. But, unlike in Wheezy, Kali doesn't auto-load the driver upon boot up. I should say that it was just plain stupid of me to try to make the WiFi adapter to work without first checking if a driver for it had been loaded in the first place. There's a lesson to be learned here but who cares if you're having so much fun-- as in life, the problem with being on the wrong side of the street is that it's so much fun.

    A "root@kali:~# find/ -name **8192** -print" showed that indeed there is such a module. Obviously, it wasn't loaded by default. Thus, I loaded it manually:-- "root@kali:~# mod probe 8192cu". A "root@kali:~# lsmod" confirmed that it is now loaded. A "root@kali:~# ifconfig wlan0" show that the Edimax is up and running. I opted the easy way out and invoked the built-in graphical WiFi manager of Kali to configure it.

    I had some success using this nifty little WiFi penetrating machine to hack into my MacBook wireless connection. Yesterday, I  took the RPi2 for a test war drive. It's my idea of a lazy Sunday morning-- sitting in a coffee shop that offers WiFi, sipping latte while scooping up data from the wireless packets in the air (this morning I used airodump-ng). As I sit there totally engrossed with mischief some friends happened to come by. It didn't take them long to figure out that I'm up to no good but when they saw the RPi2 it scared them probably realizing how an attacker could wreck havoc with a simple pen-testing machine (less than Php5,000.00) that could easily be carried around or stowed in a table drawer or hidden in a suspended ceiling to eavesdrop on an office network.

No comments:

Post a Comment