-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathubertooth_install.sh
executable file
·162 lines (142 loc) · 4.46 KB
/
ubertooth_install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
#!/bin/bash
#
# Ubertooth install script for Kali Linux 2.0.0
#
# by Raul Siles
# Copyright (c) 2015 DinoSec SL (www.dinosec.com)
#
# Version: 2015-10-R1
# Date: 2015-10-31
#
# Ubertooth and libbtbb versions: 2015-10-R1
# Kali Linux version: 2.0.0
# Wireshark version: 1.12.6
# Kismet version: 2013-03-R1b
#
# Versions
VERSION=2015-10-R1
KALI_VERSION=2.0.0
UBER_VERSION=2015-10-R1
WIRESHARK_VERSION=1.12.6
KISMET_VERSION=2013-03-R1b
LIBBTBB_URL=https://github.com/greatscottgadgets/libbtbb/archive/$UBER_VERSION.tar.gz
LIBBTBB_FILENAME=libbtbb-$UBER_VERSION.tar.gz
LIBBTBB_DIR=libbtbb-$UBER_VERSION
LIBBTBB_BACK=../..
UBERTOOTH_URL=https://github.com/greatscottgadgets/ubertooth/releases/download/$UBER_VERSION/ubertooth-$UBER_VERSION.tar.xz
UBERTOOTH_FILENAME=ubertooth-$UBER_VERSION.tar.xz
UBERTOOTH_DIR_HOST=ubertooth-$UBER_VERSION/host
UBERTOOTH_DIR=ubertooth-$UBER_VERSION
UBERTOOTH_BACK=../../..
KISMET_URL=https://kismetwireless.net/code/kismet-$KISMET_VERSION.tar.xz
KISMET_FILENAME=kismet-$KISMET_VERSION.tar.xz
KISMET_DIR=kismet-$KISMET_VERSION
KISMET_CONF_FILE=/usr/local/etc/kismet.conf
KISMET_BACK=..
WIRESHARK_PLUGINS_DIR=/usr/lib/x86_64-linux-gnu/wireshark/plugins/$WIRESHARK_VERSION
# ASCII Art:
# http://patorjk.com/software/taag/
# Based on figlet
echo
echo " _ _ _ _ _ _ _____ _ _ _ "
echo " | | | | | | | | | | | |_ _| | | | | |"
echo " | | | | |__ ___ _ __| |_ ___ ___ | |_| |__ | | _ __ ___| |_ __ _| | |"
echo " | | | | _ \ / _ \ ^__| __/ _ \ / _ \| __| _ \ | || ^_ \/ __| __/ _^ | | |"
echo " | |_| | |_) | __/ | | || (_) | (_) | |_| | | | _| || | | \__ \ || (_| | | |"
echo " \___/|_.__/ \___|_| \__\___/ \___/ \__|_| |_| \___/_| |_|___/\__\__,_|_|_|"
echo
echo
echo " - Script to install Ubertooth $UBER_VERSION in Kali Linux $KALI_VERSION -"
echo
echo " Version: $VERSION"
echo " By Raul Siles (DinoSec - www.dinosec.com)"
echo
echo " Tools Versions:"
echo " - Ubertooth & libbtbb: $UBER_VERSION"
echo " - Kali Linux: $KALI_VERSION"
echo " - Wireshark: $WIRESHARK_VERSION"
echo " - Kismet: $KISMET_VERSION"
echo
echo " (*** Internet access is required ***)"
echo " (*** This script will run for a few minutes. Be patient... ***)"
echo
echo " Press any key to continue (or Ctrl+C):"
read key
echo "[*] Installing Ubertooth dependencies..."
echo
sudo apt-get -y install cmake libusb-1.0-0-dev make gcc g++ libbluetooth-dev \
pkg-config libpcap-dev python-numpy python-pyside python-qt4
echo
echo "[*] Building the Bluetooth baseband library (libbtbb)..."
wget $LIBBTBB_URL -O $LIBBTBB_FILENAME
tar xf $LIBBTBB_FILENAME
cd $LIBBTBB_DIR
mkdir build
cd build
cmake ..
make
sudo make install
cd $LIBBTBB_BACK
echo
echo "[*] Installing Ubertooth tools..."
echo
wget $UBERTOOTH_URL -O $UBERTOOTH_FILENAME
tar xf $UBERTOOTH_FILENAME
cd $UBERTOOTH_DIR_HOST
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig
cd $UBERTOOTH_BACK
echo
echo "[*] Building Kismet and the Ubertooth Kismet plugin..."
echo
sudo apt-get -y install libpcap0.8-dev libcap-dev pkg-config build-essential libnl-3-dev libnl-genl-3-dev libncurses5-dev libpcre3-dev libpcap-dev libcap-dev
wget $KISMET_URL
tar xf $KISMET_FILENAME
cd $KISMET_DIR
ln -s ../$UBERTOOTH_DIR/host/kismet/plugin-ubertooth .
./configure
make dep && make && make plugins
sudo make suidinstall
sudo make plugins-install
cd $KISMET_BACK
echo
echo "[*] Adding 'pcapbtbb' to the 'logtypes=...' line in kismet.conf..."
#
# Kali Linux 2.0.0
# /etc/kismet/kismet.conf <-- Not used
# /usr/local/etc/kismet.conf <-- Used when manually compiled
#
sudo cp $KISMET_CONF_FILE $KISMET_CONF_FILE.previous
sed -i 's/\(pcapdump,gpsxml,netxml,nettxt,alert\)/\1,pcapbtbb/g' $KISMET_CONF_FILE
#OR:
#sed -i 's/logtypes=pcapdump/logtypes=pcapbtbb,pcpadump/g' $KISMET_CONF_FILE
#
echo
echo "[*] Building the Ubertooth BTBB Wireshark plugin..."
echo
sudo apt-get -y install wireshark wireshark-dev libwireshark-dev cmake
cd $LIBBTBB_DIR/wireshark/plugins/btbb
mkdir build
cd build
cmake -DCMAKE_INSTALL_LIBDIR=$WIRESHARK_PLUGINS_DIR ..
make
sudo make install
cd ../../../../..
echo
echo "[*] Building the Ubertooth BT BR/EDR Wireshark plugin..."
echo
sudo apt-get -y install wireshark wireshark-dev libwireshark-dev cmake
cd $LIBBTBB_DIR/wireshark/plugins/btbredr
mkdir build
cd build
cmake -DCMAKE_INSTALL_LIBDIR=$WIRESHARK_PLUGINS_DIR ..
make
sudo make install
cd ../../../../..
echo
echo "[*] End of the Ubertooth install script. Congratulations! ;)"
echo