Showing posts with label Raspberry Pi. Show all posts
Showing posts with label Raspberry Pi. Show all posts
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.
June 6, 2015
A Byte of Raspberry Pi
I've written before that I consider myself a hanger-on to the first home-computing revolution, a revolution which swept across the United States of America in the early 1980s and eventually spilled over to our shores in the late 1980s when pre-owned, refurbished and/or cobbled together remnants of the first personal computers were dumped here. You could see tons of these machines piled on top of each other in every other store in Greenhills. Somehow I got my hands on a pre-owned Commodore 64-- the C64, as it came to be known. It looked like a breadbox with a keyboard on top. To get it going you plug it into a television-- I had my C64 plugged into an banged up Philips portable B&W TV. And that was how I started to learn to code.
Back then when you turn on a computer, you are greeted by a solitary cursor blinking on the upper left corner of an otherwise blank screen. If you want to play a game, you have to "load" it up first and coax the game out from the void by typing a few indecipherable text on the uninviting blank screen. As crude as it was the C64 could be used both to play games and create games and other software. This, I think, made all the difference. Basic programming was made accessible to the average user. With a C64 one could learn to program if he chooses to; and if he opted not to he can still use the C64 as a game console. It was a computer and a game console in one machine. Somehow someone figured that most people are too dumb or maybe would prefer something simpler and thus the blinking cursor was masked over by a graphical user interface. The C64 and others like it thus gave way to dedicated game consoles and home computers that could be run with pointers and clicks. Self proclaimed "computer literate" users who have owned and used PCs for years have never typed a command on the terminal and probably never even knew that a terminal existed within the OS of their PCs. The chance to be intrigued, challenged and to learn programming was put out of reach of the average user.
Thus I welcome the coming of the Raspberry Pi. I've read about the US$35 (about Php 1,500.00) credit-sized computer that runs on stripped down Linux distributions and the fantastic things hackers, makers and just about every tinkerer are doing with it. And when the second generation Raspberry Pi came out last February 2015-- with a faster 900MHZ quad-core ARM Cortex-A7 CPU and a 1GB RAM, I got one as soon as it was available here in the Philippines.
The Raspberry Pi 2 features three upgrades-- it replaces the single-core, 700MHZ ARM11 processor; it doubles the available RAM; and it packs four full USB ports, twice the number of the original. It also now have a jack for combined 3.5mm audio and composite video. But, I think what tinkerers will highly appreciate is the 40 GPIO pins (the original only had 24), CSI and DSI connectors for direct connections to expansion boards, displays and more. Collectively, the upgrades give the Raspberry Pi 2 a speed boost and almost doubles the fun of connecting to it whatever a tinkerer could imagine.
As soon as I got my Raspberry Pi, I loaded it up with the recommended Linux-based Raspbian OS. I must say that the installer is well laid-out and will get you up and running in no time. I opted to boot up sans the LXDE graphical desktop and as the Raspbian OS finished its booting sequence, I looked up at the screen and saw an old friend-- the blinking cursor.
Subscribe to:
Posts (Atom)