-
Notifications
You must be signed in to change notification settings - Fork 17
/
install.sh
421 lines (358 loc) · 12.1 KB
/
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
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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
#!/bin/bash
## -------------- ##
## INSTALL SYSTEM ##
## -------------- ##
## Export environment
## ------------------
export PYTHONWARNINGS=ignore
## Configure APT sources
## ---------------------
add-apt-repository -y main
add-apt-repository -y restricted
add-apt-repository -y universe
add-apt-repository -y multiverse
## Move to temp directory
## ----------------------
cd /tmp/
## Remove `zsys`
## -------------
apt-get -y purge --auto-remove zsys >/dev/null 2>&1
## Keep system safe
## ----------------
apt-get -y update && apt-get -y upgrade && apt-get -y dist-upgrade
apt-get -y remove && apt-get -y autoremove
apt-get -y clean && apt-get -y autoclean
## Install `kernel`
## ----------------
apt-get -y install linux-generic
## Install `dejavu` font
## ---------------------
apt-get -y install fonts-dejavu
## Disable error reporting
## -----------------------
sed -i "s/enabled=1/enabled=0/" /etc/default/apport
## Remove `thunderbird`
## --------------------
apt-get -y purge --auto-remove thunderbird
## Remove `libreoffice`
## --------------------
apt-get -y purge --auto-remove libreoffice*
## Remove all games
## ----------------
apt-get -y purge --auto-remove aisleriot gnome-initial-setup gnome-mahjongg gnome-mines gnome-sudoku hitori
## Install `gnome` extras
## ----------------------
apt-get -y install gnome-firmware gnome-tweak-tool
## Install system libraries
## ------------------------
apt-get -y install libbz2-dev libcppunit-dev libcurl4-openssl-dev libffi-dev libfmt-dev libgdbm-dev libglib2.0-dev libglib2.0-dev-bin libgmp-dev libgspell-1-dev libgtkmm-3.0-dev libgtksourceviewmm-3.0-dev liblog4cpp5-dev libncurses5-dev libnss3-dev liborc-0.4-dev libosmocore-dev libreadline-dev libspdlog-dev libsqlite3-dev libssl-dev libtool libuchardet-dev libxml2 libxml++2.6-dev libxml2-dev libxslt1-dev zlib1g-dev
## Install `python`
## ----------------
apt-get -y install python3-flask python3-future python3-geoip python3-httplib2 python3-numpy python3-paramiko python3-pip python3-psutil python3-pycurl python3-requests python3-scapy python3-scipy python3-setuptools python3-urllib3 python3-virtualenv python3-wheel
## Install `ruby`
## -------------
apt-get -y install ruby ruby-dev
## Install `apt`
## -------------
apt-get -y install apt-transport-https apt-utils
## Install common packages
## -----------------------
apt-get -y install apache2 asciinema autoconf autopsy binutils binwalk build-essential cmake curl debootstrap default-jre dirmngr dkms doxygen easytag filezilla g++ gcc gconf2 ghex git gnuradio gnuradio-dev gpg gr-osmosdr hexedit httrack jq kate keepassxc macchanger make mtools net-tools openvpn pidgin pkg-config proxychains screen screenfetch secure-delete simplescreenrecorder software-properties-common squashfs-tools subversion swig synaptic tree tor torbrowser-launcher vim wget xorriso
## Install files roller
## --------------------
apt-get -y install p7zip-full p7zip-rar rar unrar
## Install `evolution`
## -------------------
apt-get -y install evolution evolution-ews
## Install `shutter`
## -----------------
add-apt-repository -y ppa:linuxuprising/shutter
apt-get -y update && apt-get -y install shutter
## Keep system safe
## ----------------
apt-get -y update && apt-get -y upgrade && apt-get -y dist-upgrade
apt-get -y remove && apt-get -y autoremove
apt-get -y clean && apt-get -y autoclean
## Clone `system` repository
## -------------------------
git clone https://github.com/neoslab/blackbuntu
## Clone `packages` repository
## ---------------------------
git clone https://github.com/neoslab/packages
## Generate DEB packages
## ---------------------
basetree="/tmp/packages"
for basedir in "$basetree"/*;
do
for deb in "$basedir"/*;
do
if test -d "$deb";
then
dpkg-deb --build --root-owner-group $deb
fi
done
done
## Create folders tree
## --------------------
mkdir -p /opt/blackbuntu
mkdir -p /opt/blackbuntu/{cracking,crypto,exploitation,forensics,hardening,information-gathering,networking,reverse-engineering,sniffing-spoofing,stress-testing,utilities,vulnerability-analysis,web-applications,wireless}
## Install cracking tools
## -----------------------
apt-get -y install brutespray cewl cmospwd crunch hashcat hydra john medusa ncrack ophcrack patator
packages="/tmp/packages/cracking"
for deb in "$packages"/*;
do
if test -f "$deb";
then
dpkg -i $deb
fi
done
## Install exploitation tools
## --------------------------
apt-get -y install websploit yersinia
packages="/tmp/packages/exploitation"
for deb in "$packages"/*;
do
if test -f "$deb";
then
dpkg -i $deb
fi
done
## Install forensics tools
## -----------------------
apt-get -y install chntpw dc3dd extundelete foremost galleta guymager p0f
packages="/tmp/packages/forensics"
for deb in "$packages"/*;
do
if test -f "$deb";
then
dpkg -i $deb
fi
done
## Install hardening tools
## -----------------------
apt-get -y install apktool arduino lynis
packages="/tmp/packages/hardening"
for deb in "$packages"/*;
do
if test -f "$deb";
then
dpkg -i $deb
fi
done
## Install information gathering tools
## -----------------------------------
apt-get -y install arp-scan braa dmitry dnsenum dnsmap dnsrecon dnstracer dnswalk masscan nikto nmap parsero recon-ng smbmap sntop sslsplit traceroute whois
packages="/tmp/packages/information-gathering"
for deb in "$packages"/*;
do
if test -f "$deb";
then
dpkg -i $deb
fi
done
## Install networking tools
## -----------------------
apt-get -y install cryptcat dns2tcp httptunnel netcat
packages="/tmp/packages/networking"
for deb in "$packages"/*;
do
if test -f "$deb";
then
dpkg -i $deb
fi
done
## Install reverse engineering tools
## ---------------------------------
apt-get -y install edb-debugger valgrind yara
packages="/tmp/packages/reverse-engineering"
for deb in "$packages"/*;
do
if test -f "$deb";
then
dpkg -i $deb
fi
done
## Install sniffing & spoofing tools
## ---------------------------------
apt-get -y install ettercap-common ettercap-graphical wireshark
packages="/tmp/packages/sniffing-spoofing"
for deb in "$packages"/*;
do
if test -f "$deb";
then
dpkg -i $deb
fi
done
## Install stress testing tools
## ----------------------------
apt-get -y install dhcpig hping3 mdk3 slowhttptest t50 termineter
packages="/tmp/packages/stress-testing"
for deb in "$packages"/*;
do
if test -f "$deb";
then
dpkg -i $deb
fi
done
## Install utilities tools
## -----------------------
apt-get -y install polenum
packages="/tmp/packages/utilities"
for deb in "$packages"/*;
do
if test -f "$deb";
then
dpkg -i $deb
fi
done
## Install vulnerability analysis tools
## ------------------------------------
apt-get -y install doona sqlmap
packages="/tmp/packages/vulnerability-analysis"
for deb in "$packages"/*;
do
if test -f "$deb";
then
dpkg -i $deb
fi
done
## Install web applications tools
## ------------------------------
apt-get -y install dirb gobuster wfuzz whatweb
packages="/tmp/packages/web-applications"
for deb in "$packages"/*;
do
if test -f "$deb";
then
dpkg -i $deb
fi
done
## Install wireless tools
## ----------------------
apt-get -y install aircrack-ng cowpatty kismet mfcuk mfoc multimon-ng pixiewps reaver wifite
packages="/tmp/packages/wireless"
for deb in "$packages"/*;
do
if test -f "$deb";
then
dpkg -i $deb
fi
done
## -------------- ##
## INSTALL EXTRAS ##
## -------------- ##
## Install `burpsuite`
## https://portswigger.net/burp
## ----------------------------
wget --progress=dot -O "/tmp/burpsuite.jar" "https://portswigger.net/burp/releases/download?product=community&type=Jar"
mkdir -p /opt/blackbuntu/exploitation/burpsuite
mv /tmp/burpsuite.jar /opt/blackbuntu/exploitation/burpsuite
## Install `electrum`
## https://electrum.org
## --------------------
wget --progress=dot -O "/tmp/electrum.AppImage" "https://download.electrum.org/4.1.5/electrum-4.1.5-x86_64.AppImage"
mkdir -p /opt/blackbuntu/crypto/electrum
mv /tmp/electrum.AppImage /opt/blackbuntu/crypto/electrum/
chmod +x /opt/blackbuntu/crypto/electrum/electrum.AppImage
## Install `maltego`
## https://maltego.com
## -------------------
wget --progress=dot -O "/tmp/Maltego.v4.2.19.13940.deb" "https://maltego-downloads.s3.us-east-2.amazonaws.com/linux/Maltego.v4.2.19.13940.deb"
dpkg -i /tmp/Maltego.v4.2.19.13940.deb
## Install `monero`
## https://www.getmonero.org
## -------------------------
wget --progress=dot -O "/tmp/monero-gui-linux-x64-v0.17.3.1.tar.bz2" "https://downloads.getmonero.org/gui/monero-gui-linux-x64-v0.17.3.1.tar.bz2"
tar -xf /tmp/monero-gui-linux-x64-v0.17.3.1.tar.bz2
mv /tmp/monero-gui-v0.17.3.1 /opt/blackbuntu/crypto/monero
chmod +x /opt/blackbuntu/crypto/monero/monero-wallet-gui
## Install `wpscan`
## https://wpscan.com
## ------------------
gem install wpscan
## ---------------- ##
## CONFIGURE SYSTEM ##
## ---------------- ##
## Keep system safe
## ----------------
apt-get -y update && apt-get -y upgrade && apt-get -y dist-upgrade
apt-get -y remove && apt-get -y autoremove
apt-get -y clean && apt-get -y autoclean
## Setup user `bashrc`
## -------------------
rm -f /etc/skel/.bashrc
cp /tmp/blackbuntu/system/etc/skel/bashrc /etc/skel/.bashrc
## Setup root `bashrc`
## -------------------
rm -f /root/.bashrc
cp /tmp/blackbuntu/system/root/bashrc /root/.bashrc
## Replace `dconf`
## --------------
mkdir -p /etc/skel/.config
rm -rf /etc/skel/.config/dconf
cp -r /tmp/blackbuntu/system/etc/skel/config/dconf /etc/skel/.config/
## Configure backgrounds
## ---------------------
rm -rf /usr/share/backgrounds/*
cp /tmp/blackbuntu/system/usr/share/backgrounds/* /usr/share/backgrounds/
rm -f /usr/share/gnome-background-properties/*
cp /tmp/blackbuntu/system/usr/share/gnome-background-properties/* /usr/share/gnome-background-properties/
## Configure utilities
## -------------------
cp /tmp/blackbuntu/system/usr/local/bin/* /usr/local/bin/
chmod +x /usr/local/bin/blackbuntu-*
## Replace `pixmaps`
## ----------------
rm -f /usr/share/ubiquity/pixmaps/cd_in_tray.png
rm -f /usr/share/ubiquity/pixmaps/ubuntu_installed.png
cp /tmp/blackbuntu/system/usr/share/ubiquity/pixmaps/cd_in_tray.png /usr/share/ubiquity/pixmaps/
cp /tmp/blackbuntu/system/usr/share/ubiquity/pixmaps/ubuntu_installed.png /usr/share/ubiquity/pixmaps/
## Replace `ubiquity-slideshow`
## ---------------------------
rm -rf /usr/share/ubiquity-slideshow
cp -r /tmp/blackbuntu/system/usr/share/ubiquity-slideshow /usr/share/
## Configure `plymouth`
## --------------------
rm -f /usr/share/plymouth/ubuntu-logo.png
cp /tmp/blackbuntu/system/usr/share/plymouth/ubuntu-logo.png /usr/share/plymouth/
rm -f /usr/share/plymouth/themes/spinner/watermark.png
cp /tmp/blackbuntu/system/usr/share/plymouth/themes/spinner/watermark.png /usr/share/plymouth/themes/spinner/
## Update `initframs`
## ------------------
update-initramfs -u
## Import icons
## ------------
cp -r /tmp/blackbuntu/system/usr/share/icons/* /usr/share/icons/
## Import applications desktop
## ---------------------------
cp /tmp/blackbuntu/system/usr/share/applications/* /usr/share/applications/
## Edit system conf
## ----------------
sed -i "s/#DefaultTimeoutStartSec=90s/DefaultTimeoutStartSec=5s/" /etc/systemd/system.conf
sed -i "s/#DefaultTimeoutStopSec=90s/DefaultTimeoutStopSec=5s/" /etc/systemd/system.conf
## Remove launchers
## ----------------
rm -f /usr/share/applications/arduino.desktop
rm -f /usr/share/applications/edb.desktop
rm -f /usr/share/applications/ettercap.desktop
rm -f /usr/share/applications/guymager.desktop
rm -f /usr/share/applications/kismet.desktop
rm -f /usr/share/applications/lstopo.desktop
rm -f /usr/share/applications/lynis.desktop
rm -f /usr/share/applications/maltego_config.desktop
rm -f /usr/share/applications/maltego.desktop
rm -f /usr/share/applications/ophcrack.desktop
rm -f /usr/share/applications/torbrowser-settings.desktop
rm -f /usr/share/applications/ubiquity.desktop
rm -f /usr/share/applications/wireshark.desktop
## Configure `gdm`
## ---------------
blackbuntu-gdm
## Clean `tmp` directory
## ---------------------
rm -rf /tmp/*
## Clean `bash` history
## --------------------
rm -f ~/.bash_history
rm -f /root/.bash_history