forked from mdnt2mdnt/kali-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwireless.sh
executable file
·279 lines (230 loc) · 9.11 KB
/
wireless.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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
#!/usr/bin/env bash
#
. helper.sh
install_wifi_dependencies(){
print_status "Installing WiFi tools and dependecies"
apt_super_upgrade
sudo apt-get install -y build-essential make patch openssl libssl-dev zlib1g zlib1g-dev libssh2-1-dev \
gettext libpcap0.8 libpcap0.8-dev python-scapy python-dev cracklib-runtime tshark ethtool iw libpcap-dev \
aircrack-ng sqlite3 libsqlite3-dev libssl-dev kali-linux-wireless
}
install_patched_wireless_db(){
print_status "Installing dependencies for building wireless-db"
apt-get install -y python-m2crypto libgcrypt20 libgcrypt20-dev git gcc libnl-genl-3-dev
print_status "Cloning repos.."
cd /tmp
git clone https://github.com/0x90/crda-ct
git clone https://github.com/0x90/wireless-regdb
print_status "Building and installing dependencies for building wireless-db"
cd wireless-regdb/
make && cp regulatory.bin /lib/crda/regulatory.bin
print_status "Copying certs.."
cp root.key.pub.pem ../crda-ct/pubkeys/
cp /lib/crda/pubkeys/[email protected] ../crda-ct/pubkeys/
print_status "Building and installing CRDA"
cd ../crda-ct
make && make install
print_status "Cleanup.."
cd /tmp
rm -rf crda-ct
rm -rf wireless-db
}
# https://forums.kali.org/showthread.php?25715-How-to-install-Wifite-mod-pixiewps-and-reaver-wps-fork-t6x-to-nethunter
install_wifite_fork(){
apt-get install libsqlite3-dev libpcap-dev -y
cd /tmp
git clone https://github.com/derv82/wifite.git
git clone https://github.com/aanarchyy/wifite-mod-pixiewps.git
git clone https://github.com/t6x/reaver-wps-fork-t6x.git
git clone https://github.com/wiire/pixiewps.git
cd pixiewps/src/
make && make install
cd /tmp/reaver-wps-fork-t6x/src/
./configure && make && make install
cp /tmp/wifite/wifite.py /usr/bin/wifite-old
chmod +x /usr/bin/wifite-old
cp /tmp/wifite-mod-pixiewps/wifite-ng /usr/bin/wifite-ng
chmod +x /usr/bin/wifite-ng
cd /tmp
rm -rf wifite
rm -rf wifite-mod-pixiewps
rm -rf reaver-wps-fork-t6x
rm -rf pixiewps
}
install_lorcon(){
echo "Installing Lorcon"
cd /tmp
git clone https://github.com/0x90/lorcon
cd lorcon
./configure --prefix=/usr && make && make install
# install pylorcon
echo "Install pylorcon2"
cd pylorcon2
python setup.py build && python setup.py install
# to make lorcon available to metasploit
echo "Install ruby lorcon"
cd ../ruby-lorcon/
ruby extconf.rb
make && make install
}
install_pyrit(){
apt-get install nvidia-cuda-toolkit nvidia-opencl-icd
echo "Step 3.a: Install Pyrit prerequisites"
apt-get install python2.7-dev python2.7-libpcap libpcap-dev
echo "Step 3.b: Remove existing installation of Pyrit"
apt-get remove pyrit
echo "Step 2: Download Pyrit and Cpyrit"
cd /usr/src
wget https://pyrit.googlecode.com/files/pyrit-0.4.0.tar.gz
wget https://pyrit.googlecode.com/files/cpyrit-cuda-0.4.0.tar.gz
}
install_horst(){
# http://br1.einfach.org/tech/horst/
apt-get install libncurses5-dev libnl-genl-3-dev -y
cd /tmp
git clone git://br1.einfach.org/horst
cd horst
make && cp horst /usr/bin
rm -rf /tmp/horst
}
install_penetrator(){
apt-get install libpcap-dev libssl-dev -y
cd /tmp
git clone https://github.com/xXx-stalin-666-money-xXx/penetrator-wps.git
cd penetrator-wps/
./install.sh
cp penetrator /usr/bin
}
install_aircrack_svn(){
if [ -d /opt/aircrack-ng-svn ]; then
cd /opt/aircrack-ng-svn
svn up
else
svn co http://svn.aircrack-ng.org/trunk/ /opt/aircrack-ng-svn
cd /opt/aircrack-ng-svn
fi
make && make install
airodump-ng-oui-update
print_good "Downloaded svn version of aircrack-ng to /opt/aircrack-ng-svn and overwrote package with it."
}
install_radius_wpe(){
#Checking for free-radius and it not found installing it with the wpe patch. This code is totally stollen from the easy-creds install file. :-D
if [ ! -e /usr/bin/radiusd ] && [ ! -e /usr/sbin/radiusd ] && [ ! -e /usr/local/sbin/radiusd ] && [ ! -e /usr/local/bin/radiusd ]; then
print_notification "Free-radius is not installed, will attempt to install..."
mkdir /tmp/freeradius
print_notification "Downloading freeradius server 2.1.11 and the wpe patch..."
wget ftp://ftp.freeradius.org/pub/radius/old/freeradius-server-2.1.11.tar.bz2 -O /tmp/freeradius/freeradius-server-2.1.11.tar.bz2
wget http://www.opensecurityresearch.com/files/freeradius-wpe-2.1.11.patch -O /tmp/freeradius/freeradius-wpe-2.1.11.patch
cd /tmp/freeradius
tar -jxvf freeradius-server-2.1.11.tar.bz2
mv freeradius-wpe-2.1.11.patch /tmp/ec-install/freeradius-server-2.1.11/freeradius-wpe-2.1.11.patch
cd freeradius-server-2.1.11
patch -p1 < freeradius-wpe-2.1.11.patch
print_notification "Installing the patched freeradius server..."
./configure && make && make install
cd /usr/local/etc/raddb/certs/
./bootstrap
rm -r /tmp/freeradius
print_good "The patched freeradius server has been installed"
else
print_good "I found free-radius installed on your system"
fi
}
install_hotspotd(){
cd /tmp
git clone https://github.com/0x90/hotspotd
cd hotspotd
sudo python2 setup.py install
}
install_wifi(){
install_wifi_dependencies
if ask "Install patched wireless-db?" Y; then
install_patched_wireless_db
fi
if ask "Install horst (Wireless L2 sniffer)?" Y; then
install_horst
fi
if ask "Install Lorcon library with python and ruby bindings?" Y; then
install_lorcon
fi
# Fresh version of wifite is available via apt-get
if ask "Install wifite-fork + pixie-wps from source?" N; then
install_wifite_fork
fi
if ask "Install pyrit from source?" N; then
install_pyrit
fi
if ask "Install aircrack-ng from SVN?" N; then
install_aircrack_svn
fi
if ask "Install freeradius server 2.1.11 with WPE patch?" N; then
install_radius_wpe
fi
if ask "Install hotspotd?" N; then
install_hotspotd
fi
}
install_bluetooth(){
print_status "Installing dependencies for bluetooth hacking"
apt-get install cmake libusb-1.0-0-dev make gcc g++ pkg-config libpcap-dev \
python-numpy python-pyside python-qt4 build-essential libpcap-dev
print_status "Installing BlueMaho, redfang, spooftooph, obexfs, bluewho, btscanner and others"
# wget "https://wiki.thc.org/BlueMaho?action=AttachFile&do=get&target=bluemaho_v090417.tgz"
apt-get install -y anyremote redfang spooftooph python-bluez obexfs bluepot bluewho btscanner \
bluez-utils bluelog libbluetooth-dev spectools bluemaho
apt-get install -y libopenobex1:i386 libopenobex1-dev:i386 libbluetooth-dev:i386
if ask "Install ubertooth hacking tools?" Y; then
print_status "Installing pyusb-1.0.0b1"
pip install https://github.com/walac/pyusb/archive/1.0.0b1.tar.gz
print_status "Installing libbtbb from sources"
wget https://github.com/greatscottgadgets/libbtbb/archive/2014-02-R2.tar.gz -O libbtbb-2014-02-R2.tar.gz
tar xf libbtbb-2014-02-R2.tar.gz
cd libbtbb-2014-02-R2
mkdir build
cd build
cmake .. && make && make install
print_status "Installing ubertooth"
wget https://github.com/greatscottgadgets/ubertooth/archive/2014-02-R2.tar.gz -O ubertooth-2014-02-R2.tar.gz
tar xf ubertooth-2014-02-R2.tar.gz
cd ubertooth-2014-02-R2/host
mkdir build
cd build
cmake .. && make && make install
if ask "Install bluetooth hacking tools?" Y; then
print_status "Installing dependencies for bluetooth hacking"
sudo apt-get install libpcap0.8-dev libcap-dev pkg-config build-essential libnl-dev libncurses-dev libpcre3-dev libpcap-dev libcap-dev
wget https://kismetwireless.net/code/kismet-2013-03-R1b.tar.xz
tar xf kismet-2013-03-R1b.tar.xz
cd kismet-2013-03-R1b
ln -s ../ubertooth-2014-02-R2/host/kismet/plugin-ubertooth .
./configure && make && make plugins && make suidinstall && make plugins-install
# echo Add "pcapbtbb" to the "logtypes=..." line in kismet.conf
fi
if ask "Install bluetooth hacking tools?" Y; then
print_status "Installing dependencies for bluetooth hacking"
apt-get install wireshark wireshark-dev libwireshark3 libwireshark-dev
cd libbtbb-2014-02-R2/wireshark/plugins/btbb
mkdir build
cd build
cmake -DCMAKE_INSTALL_LIBDIR=/usr/lib/x86_64-linux-gnu/wireshark/libwireshark3/plugins ..
make && make install
fi
fi
}
install_sdr(){
apt-get install -y kali-linux-sdr
}
install_wireless(){
if ask "Install WiFi hacking tools?" Y; then
install_wifi
fi
if ask "Install Bluetooth hacking tools + Kismet + BTBB from source?" N; then
install_bluetooth
fi
if ask "Install SDR tools?" Y; then
install_sdr
fi
}
if [ "${0##*/}" = "wireless.sh" ]; then
install_wireless
fi