I thought I’d share some troubleshooting related items to setting up my raspi-NAS the other night.
A couple of years ago, I don’t remember when, I built a small NAS using a Raspberry Pi 2 B version 1.1, and two 128G USB flash drives from Microcenter. It is called “raspi-nas”, and I built it following the How-To Geek Guide: How to Turn a Raspberry Pi into a Low-Power Network Storage Device. It worked well to back up our phones. Which is all it is used for. It used wireless for the network connection.
I’ll be teaching an Introductory class at Circle City Con this year, on Software Defined Radio.
Introduction to Software Defined Radio with the RTL-SDR on Windows and the Raspberry Pi 2
4-hour introduction to Software Defined Radio, using the RTL2832U chipset, covering both Microsoft Windows and the Raspberry Pi. We will be going over how to track airplanes, scan radio frequencies to find people talking, and covering a little radio theory. Covering RTL-SDR due to the cost of equipment. A list can be provided to students prior to the course.
Here is the part list you’ll need if you’re taking the class (Note the links got to RTL-SDR.com, Amazon, or Ada Fruit, and I am not associated with either of them). If you can get parts elsewhere that is fine :
- A computer running Windows you are authorized to install software on. I discourage using your work computers.
- A R820T2 RTL2832U radio dongle. (Only need 1 of 4 listed the below, 4 listed for diff options).
- RTL-SDR Blog R820T2 RTL2832U Metal case (built in heat sink to prevent Frequency drift), and 2 telescoping antennas. Currently sold out, but should be back in stock soon.
- NooElec NESDR Mini+ Al: 0.5PPM TCXO RTL-SDR & ADS-B USB Receiver Set w/ Aluminum Enclosure & Antenna. I have not received mine yet, so do not now the antenna quality.
- NooElec NESDR Mini 2 SDR & DVB-T USB Stick
- NooElec NESDR Mini USB RTL-SDR & ADS-B Receiver Set The antenna it comes with isn’t that great.
- A Raspberry Pi 2 or 3 (the 3 were not out when I wrote the proposal, and I have yet to find one in stock).
- A way to power the Raspberry Pi, I suggest a USB Battery Pack.
- A way to interact with the Raspberry Pi
- Headphones / earbuds
All the RTL-SDR dong’es with antennas I’ve gotten so far have had magnetic mounts, and you need a ground plane for them to work right.
—- TL/DR —-
If you want to connect a raspberry pi to a hidden access point your wpa_supplicant.conf needs to have the following in the network statement.
ssid="YOUR NETWORK NAME"
psk="YOUR ASCII KEY HERE"
Don’t put a ” or a ) in your ASCII PSK it causes problems. I couldn’t get it to work with the hex psk using wpa_passphrase but I broke the rules of troubleshooting making multiple changes at a time instead of one and resetting it.
—– End TL/DR —-
I got a new phone. Nexus 5x. But this isn’t what this post is about. My SO got a new phone last August. It was an unplanned by after the last one went for a porta-john swim. Again. not what this is about.
A co-worker suggested setting up a NAS to back up the pictures to. Being a poor college student, yes still grad school isn’t cheap, that really isn’t an option. Then he said well if it’s just the phones, why not use one of your Raspberry Pis?
The problem is getting the wpa_suplicant.conf file talking. It has taken me 2 days. Mainly because I don’t mess with that file much.
it hated my passphrase because of the ” and the ) in the middle example:
I tried wpa_passphrase with the file, but it didn’t like that either. (although I kind of want to go back and test it again, in case I missed something.
Which I couldn’t find out until after I set the AP to broadcast. So after more digging I found that
scan_ssid=1 has to be in the config.
Sigh. This is taking way longer than need be, and I’d just wire it, but it’s going to not be near the cables, because of power.
So my last post I was fighting the Raspberry Pi 2, with Kali Linux 2.0.1, when it came to starting kistmet_drone on boot. Ian had a work around, but it wasn’t what I wanted. I wanted the built in tools to do their job. Well it turns out it’s a SystemD problem. I spent probably about 12 hours bashing my head against it, making changes and trying things.
Finally, I got smart with my Google searching, and found a slightly better way, but still didn’t want to call an external shell script. Then I spent time smacking my head on the desk. SSHD works, and starts by systemd, why not look at it’s config. Seriously the better you are at something, the less you think of the simple answers that made you good to start with.
2 new lines. One made SystemD wait until after networking was up. The second was a strange sshd -D option. man ssh. Oh doesn’t run ssh as a daemon…
remove –daemonize from Kismet… It worked.
Description=Kismet Drone Daemon
Now to get everything ready before I leave for GrrCon in 17 hours, I’ll be presenting Saturday last I heard.
So I’m using the Raspberry Pi 2 and Kali 2 for this project so far. As I said last time, I had to expand the image to use the full disk. I have a script for that now. I was actually trying to script the whole deployment. These scrips can be found on my WIDS github repository. But fair warning they are still a work in process.
So I tried to do this back in July but got sick. My next talk is at A2Y.asm on Sept 12, and rebuilding all the Pi2 again with Kali 2.0.1. I have litteraly spent most of the day trying to expand the root directory.
There is a tool called rpi-wiggle, that sounded really cool, but it hasn’t been updated in 3 years. It also didn’t work for the pi2 running Kali 2.0.1. After lots of searching, I found a forum post saying talking about it.
After running apt-get install triggerhappy lau5.1 (from Kali repos) and getting the Debian raspi-config file from Debian. It says it worked. I’m waiting for the reboot to know for sure.
And it worked. from console it says it has full space.
Now if I was making anything other than a drone, I’d run apt-get install kali-linux-full to get the whole Kali experience instead of the light version. But I’m making a drone. So here is what needs to be worked on before I start making images:
- install: Kismet, NTP.
- boot to cli instead of gui
- change the root password
- configure kismet
- configure static ip, and daemon mode.
normally I’d disable ipv6, still might. but the ipv4 and ipv6 stacks are working well together right now. In the past they haven’t.
For Bsides, as mentioned earlier, I’m making some changes for the talk.
For Bsides Detroit I’m swapping out the original Raspberry Pi B devices from the project for the Raspberry Pi 2 B.
The first time I did this, with the RPi-B, I made one image got it working and then cloned it to the others. It caused minor problems with the wireless card naming. I also still had to touch them all to change names, static ip addresses, and the kismet configs.
This week there was a new version of Kali out for the Raspberry Pi 2 when I checked. So I downloaded it, patched it and installed the software. Then created the clone image.
I am going to have to touch each one anyway so figure I will just get the one image with the software, and then load each one and configure it.
The last schedule I have seen has me speaking at 4pm on Saturday the 18th at Bsides Detroit.
I know it’s a surprise to me to.
Talk is similar to the one I gave at Circle City Con on Raspberry Pi and Wifi detection.
New this talk: Looking at the clients, email alerts (I hope) and all on Raspberry Pi 2 (again I hope).
I’ll be presenting at Circle City Con this year, on Wireless Intrusion Detection with the Raspberry Pi. I’ve done some test runs of the talk, and have ended with people wanting to contact me later if they have questions. Mainly if they get stuck. Also one of the comments from the reviewers when I submitted my talk was this would be better as a training class.
After talking to one of the organizers, here is how this is going to work. Currently I’m scheduled to talk on Saturday. After my talk, through the end of the Conference I can be available (as long as I’m not in a training sessions) to use some of the the common / lobby area to work with people wanting to set up the wireless drones, what kismet calls sensors.