admin
Comments Off on Truck Raspberry Pi Kali – for using besside-ng
and posted in Uncategorized

Story: I wanted a mobile besside-ng instance running in my truck, why? because I can!

First I image kali for raspberry pi to an SD card, and I am not going full headless on this install so be aware of that, although I might be able to now that I think of it…..Hold my zipfizz! (I don’t drink beer or soda)

dd if=kali-linux-2019.3-rpi.img of=/dev/sdc status=progress bs=1M

I am going to run two wifi devices on this kali, which gets interesting with power…so I hope you already have that figured out. In my example I am running an older raspberry pi device with two lower power usb wifi devices, but I am using a special usb cable that supplements the power to the devices – make sure you don’t just plug both ends into the raspberry pi……

now mount the SD card

mount /dev/sdc2 /mnt/

now we want to copy a couple files to /opt on the sd card:

cp run-besside.sh start-besside.sh /mnt/opt/ 

start-besside.sh

#!/bin/bash
ps -ef | grep -i [s]creen
 if [ $? -eq '1'    ]
 then
  screen -dm -S BesSideNG /opt/run-besside.sh
  echo "started"
 else
  echo "found running"
 fi

run-besside.sh

#!/bin/bash
while ( true )
do
  ifconfig wlan0 down
  iwconfig wlan0 mode monitor
  ifconfig wlan0 up
  mkdir /opt/wlan0
  cd /opt/wlan0
  besside-ng wlan0
done

Now edit the crontab of the sd card:

vim /mnt/etc/crontab

add this to the bottom

*    * * *   root    /opt/start-besside.sh > /opt/start-besside.log

now we want to setup one of the wifi cards to auto connect to our network, or our hotspot on our phone.

vim /etc/network/interfaces

add to the bottom of the file these lines, update as necessary for your network:

auto wlan1
allow-hotplug wlan1
iface wlan1 inet dhcp
wpa-ssid "YourNetworkName"
wpa-psk "YourPassword"

One thing I really want to mention here, I have not shown how to set the root password yet…I set mine after I connected to it, but you can do it before hand as well……

Now go power it up with the two wifi cards attached and you are good to go, another option is to setup hostap on one network card so you can connect with your phone to the pi directly, I just didn’t want to do that as besside-ng would attack it….LOL

Bonus: I like to use cap2hccapx.bin to convert the cap/pcap file to hccapx files so hashcat can handle them….but on the raspberry pi you can run the pre-compiled binary….so

wget https://github.com/hashcat/hashcat-utils/archive/v1.9.tar.gz
tar xzvf v1.9.tar.gz
cd hashcat-utils-v1.9/src
make

now you can do a cap2hccapx.bin wpa.pcap wpa.hccapx to get the handshakes for hashcat! Make sure you check out some previous posts about passwords….

Comments are closed.