Quick Start Beaglebone Black - mgdegroot/uber-selfie GitHub Wiki
Operating system
Make a 8GB SD card available, but make sure it's not mounted. Get devicename via dmesg | tail
or simply look in /dev/
pseudo filesystem for a mmcblk device.
If it is the only card inserted it should be /dev/mmcblk0
.
Get this wrong and you'll probably be at least a little bit annoyed at some point later on...
Do not copy and paste before verifying the correct device.
- Get the OS (newest stable versions at 2017-07-29)
Debian for beaglebone black
wget https://debian.beagleboard.org/images/bone-debian-8.7-iot-armhf-2017-03-19-4gb.img.xz
tar xvJf bone-debian-8.7-iot-armhf-2017-03-19-4gb.img.xz
dd if=bone-debian-8.7-iot-armhf-2017-03-19-4gb.img of=/dev/mmcblk0 bs=2M
-
Optionally install to EMMC (faster and more reliable)
If you want it to be flashed to the EMMC storage follow these steps (as root):-
Mount SD boot partition and edit file
uEnv.txt
. Change
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh
tocmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh
with an editor or sed:mkdir /mnt/mmc_p1 && mount /dev/mmcblk0p1 /mnt/mmc_p1 sed -i '#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh/cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh/' /mnt/mmc_p1/boot/uEnv.txt
-
-
Place SD card in Beaglebone and plug in USB cable from computer
-
In case of EMMC install:
- give it some time to complete the flashing.
- remove SD card and reboot (powercycle) when done.
-
Blue led 'user D2' should flash when active.
-
Check whether USB networking comes up. If not recheck / redo the SD card preparation steps.
ip link
If all is working a network interface with192.168.7.1
(or.6.1
) will be available. -
SSH into host (user
debian
, passwordtemppwd
) to add a new user and remove default user:ssh [email protected] sudo su adduser sniffer usermod -aG wheel,kismet sniffer exit logout
-
(optional) Authorize host using
ssh-copy-id [email protected]
so that no password is needed. -
SSH in again:
ssh [email protected] sudo su deluser debian
-
(optional) remove password requirement for
sudo
:
sudoedit /etc/sudoers
add line:%wheel ALL=NOPASSWD: ALL
(make sure nothing below this line overrides it)
Applications
Perform the following steps on the beaglebone as user 'sniffer'. Since space on the EMMC storage is limited it might be useful to prepare a 'working' area on the SD card:
- Optional mount points to sd card:
/var
,/tmp
,/home
,/mnt/work
- TODO: describe steps using parted / mkfs / fstab
Generic apps
A set of essential apps for automated kismet operation:
apt-get install tmux
A set of applications are sometimes useful to have available. Skip this if space is limited:
apt-get install tcpdump tshark nmap
If available change to the 'work' area on the sd card before continuing.
cd /mnt/work/
mkdir -p src/releases/ && cd src/releases/
Kismet
- Download Kismet release
wget https://www.kismetwireless.net/code/kismet-2016-07-R1.tar.xz
- Steps to compile:
tar xvJf kismet-2016-07-R1.tar.xz
cd kismet-2016-07-R1
./configure --prefix=/usr/local --sysconfdir=/etc
Output should be:
Configuration complete:
Compiling for: linux-gnueabihf (armv7l)
C++ Library: stdc++
Installing as group: root
Man pages owned by: man
Installing into: /usr/local
Setuid group: kismet
Terminal Control: ncurses
Linux WEXT capture : yes
OSX/Darwin capture : n/a (only OSX/Darwin)
PCRE Regex Filters : yes
pcap capture: yes
airpcap control: n/a (only Cygwin/Win32)
PPI log format: yes
LibCapability (enhanced
privilege dropping): no
Linux Netlink: yes (mac80211 VAP creation) - libnl-3.0 libnl-genl-3.0
If stuff is missing install applicable packages (pcre, pcap, etc). If all is ok continue with compile step (only one of 'install' or 'userinstall' is required):
make
sudo make install && make suid-install
make plugins && make restricted-plugins
sudo make plugins-install && make plugins-userinstall
sudo make restricted-plugins-install && make restricted-plugins-userinstall
After this step kismet will be available under /usr/local/
. Next step is compiling ubertooth tools.
Ubertooth
- Download Libbtbb
wget https://github.com/greatscottgadgets/libbtbb/archive/2017-03-R2.tar.gz -O libbtbb-2017-03-R2.tar.gz
- Download Ubertooth
wget https://github.com/greatscottgadgets/ubertooth/releases/download/2017-03-R2/ubertooth-2017-03-R2.tar.xz
- Steps to compile and install
libbtbb
to /usr/local/lib:
tar xvzf libbtbb-2017-03-R2.tar.gz
cd libbtbb-2017-03-R2
mkdir build && cd build
cmake ..
make
sudo make install
- Steps to compile and install ubertooth to /usr/local:
tar xvJf ubertooth-2017-03-R2.tar.xz
cd ubertooth-2017-03-R2/host/
mkdir build && cd build
cmake ..
make
sudo make install
- Steps to compile and install ubertooth kismet plugin (use install or userinstall (or both)):
cd ubertooth-2017-03-R2/host/kismet/plugin-ubertooth/
KIS_SRC_DIR=/mnt/work/src/releases/kismet-2016-07-R1 make
sudo KIS_SRC_DIR=/mnt/work/src/releases/kismet-2016-07-R1 make install
KIS_SRC_DIR=/mnt/work/src/releases/kismet-2016-07-R1 make userinstall
After successfully completing above steps kismet and ubertooth binaries are available.
Session configuration
To enable automated running and collecting some configuration needs to be done.
- First install and configure tmux to run as a systemd daemon (note that it is not advisable to run wget on an untrusted url with root...):
apt-get install tmux
wget https://github.com/mgdegroot/uber-selfie/raw/master/config/tmux%40.service -O /etc/systemd/system/[email protected]
systemctl daemon-reload
systemctl enable [email protected]
systemctl start [email protected]
No errors should occur and a tmux session for user 'sniffer` should be running now, and will be running after a reboot.
- Get and configure the kismet systemd service:
wget https://raw.githubusercontent.com/mgdegroot/uber-selfie/master/config/kismet.service -O /etc/systemd/system/kismet.service
systemctl daemon-reload
systemctl enable kismet.service
The kismet daemon could be started already but it might be better to configure and verify it first, which is the next step.
- kismet session setup script
- kismet systemd service file TODO: describe steps