This repository has been archived by the owner on Aug 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathubuntu-installer.sh
575 lines (494 loc) · 16.2 KB
/
ubuntu-installer.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
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
# secret directory
secret=arsenal
cd
mkdir $secret
cd $secret
echo -e "\n${YELLOW}[+] folder 'secret' created${NC}"
sudo sh -c 'echo "\nDefaults timestamp_timeout=-1">>/etc/sudoers'
# update system
echo -e "\n${YELLOW}[!] update and upgrade system${NC}"
sudo apt-get update
sudo apt-get dist-upgrade -y
##### Repo #####
# install from apt-get
echo -e "\n${YELLOW}\n[!] install tools with apt-get${NC}"
sudo apt-get install -yq \
adb \
apache2 \
apropos \
arp-scan \
baobab \
curl \
default-jdk \
default-jre \
dhex \
dnsmasq \
ettercap-text-only \
evince \
fastboot \
filezilla \
flameshot \
git \
hashcat \
hexedit \
hexyl \
hostapd \
hping3 \
htop \
iperf3 \
iw \
jq \
libimage-exiftool-perl \
libreoffice \
libreoffice-l10n-es \
locate \
macchanger \
mariadb-client \
mariadb-server \
mycli \
nbtscan \
netcat \
netdiscover \
nmap \
openvpn \
php \
prips \
proxychains4 \
python3-dev \
python3-pip \
ruby-full \
s3fs \
screen \
simplescreenrecorder \
smbclient \
snapd \
tcpdump \
terminator \
tmux \
tor \
torsocks \
traceroute \
tree \
trickle \
unrar \
vim \
wipe \
wireless-tools \
wireshark-qt \
whois \
xclip \
zeal;
# aircrack-ng
sudo apt install -y aircrack-ng mdk4
##### Ruby ######
echo -e "\n${YELLOW}[!] install from gems${NC}"
sudo gem install \
wpscan \
bundle \
evil-winrm \
pedump;
##### Python #####
sudo pip3 install \
apkid \
autopep8 \
beautifulsoup4 \
cloudscraper \
diagrams \
dnspython \
dnstwist \
exrex \
fastapi \
Faker \
festin \
getsploit \
glances \
grip \
intensio-obfuscator \
myjwt \
name-that-hash \
nfstream \
nudepy \
pipreqs \
pproxy \
proxy.py \
pyautogui \
pyinstaller \
pyserv \
python-telegram-bot \
python-whois \
requests \
s3recon \
scapy \
search-that-hash \
shadowsocks \
shodan \
slowloris \
smtp-user-enum \
sqlmap \
ssh-mitm \
sshuttle \
wafw00f;
##### Snap #####
sudo snap install \
amass \
beekeeper-studio \
binwalk-spirotot \
brave \
chromium \
drawio \
john-the-ripper \
jwt-hack \
leafpad \
lolcat \
mycli \
postman \
scrcpy \
vlc;
sudo snap install code --classic
sudo snap install go --classic
sudo snap install netbeans --classic
sudo snap install node --classic
#sudo snap install intellij-idea-community --classic
#sudo snap install pycharm-community --classic
# install chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
rm -rf google-chrome-stable_current_amd64.deb
# Go tools
curl https://raw.githubusercontent.com/vay3t/hax0rpi/master/post-snap-install.sh | bash
##### Git #####
git clone https://github.com/maurosoria/dirsearch
git clone https://github.com/lgandx/Responder
git clone https://github.com/drwetter/testssl.sh
git clone --recursive https://github.com/evgeni/qifi.git
git clone https://github.com/trustedsec/unicorn
git clone https://github.com/L-codes/Neo-reGeorg
git clone https://github.com/defparam/smuggler
git clone https://github.com/blackarrowsec/mssqlproxy
git clone https://github.com/volatilityfoundation/volatility3
git clone https://github.com/WHK102/htrash
git clone https://github.com/PowerShellMafia/PowerSploit
git clone https://github.com/samratashok/nishang
git clone https://github.com/danielbohannon/Invoke-Obfuscation
git clone https://github.com/nnposter/nndefaccts
git clone https://github.com/CISOfy/lynis
git clone https://github.com/s4vitar/rpcenum
git clone https://github.com/magnumripper/JohnTheRipper john
git clone https://github.com/cujanovic/Open-Redirect-Payloads
git clone https://github.com/trustedsec/hate_crack
git clone https://github.com/Mr-Un1k0d3r/DKMC
git clone https://github.com/cytopia/pwncat
git clone https://github.com/m4ll0k/Atlas
git clone https://github.com/OsandaMalith/IPObfuscator
git clone https://github.com/chrispetrou/EnumSNMP
##### Wget #####
wget https://github.com/byt3bl33d3r/CrackMapExec/releases/download/v5.1.1dev/cmedb-ubuntu-latest.zip
wget https://github.com/byt3bl33d3r/CrackMapExec/releases/download/v5.1.1dev/cme-ubuntu-latest.4.zip
wget https://snapshots.mitmproxy.org/6.0.2/mitmproxy-6.0.2-linux.tar.gz
wget https://github.com/EgeBalci/amber/releases/download/v3.1/amber_linux_amd64_3.1.zip
wget https://github.com/BloodHoundAD/BloodHound/releases/download/4.0.2/BloodHound-linux-x64.zip
wget https://github.com/Studio3T/robomongo/releases/download/v1.4.3/robo3t-1.4.3-linux-x86_64-48f7dfd.tar.gz
wget https://github.com/projectdiscovery/nuclei/releases/download/v2.3.4/nuclei_2.3.4_linux_amd64.tar.gz
wget https://github.com/projectdiscovery/proxify/releases/download/v0.0.3/proxify_0.0.3_linux_amd64.tar.gz
wget https://github.com/projectdiscovery/httpx/releases/download/v1.0.5/httpx_1.0.5_linux_amd64.tar.gz
wget https://github.com/projectdiscovery/subfinder/releases/download/v2.4.7/subfinder_2.4.7_linux_amd64.tar.gz
wget https://github.com/icsharpcode/AvaloniaILSpy/releases/download/v7.0-rc1/linux-x64.zip
wget https://github.com/s4n7h0/Halcyon-IDE/releases/download/v2.0.2/Halcyon_IDE_v2.0.2.jar
wget https://github.com/angryip/ipscan/releases/download/3.7.6/ipscan_3.7.6_amd64.deb
wget https://github.com/subhra74/snowflake/releases/download/v1.0.4/snowflake-1.0.4-setup-amd64.deb
##### Install from URL #####
# joplin
wget -O - https://raw.githubusercontent.com/laurent22/joplin/dev/Joplin_install_and_update.sh | bash
# gitjacker
curl -s "https://raw.githubusercontent.com/liamg/gitjacker/master/scripts/install.sh" | sudo bash
##### npm #####
sudo npm install -g yarn
sudo npm install -g elasticdump
#sudo npm install -g curlconverter
sudo npm install -g qrcode-terminal
sudo npm install -g s3rver
sudo npm install -g apk-mitm
sudo yarn global add wappalyzer
##### Git install #####
# snmpwn
git clone https://github.com/hatlord/snmpwn.git
cd snmpwn
sudo bundle install
cd && cd $secret
# enum4linux-ng
git clone https://github.com/cddmp/enum4linux-ng
cd enum4linux-ng
sudo python3 setup.py install
cd && cd $secret
# Sherlock
git clone https://github.com/sherlock-project/sherlock.git
cd sherlock
python3 -m pip install -r requirements.txt
cd && cd $secret
# Photon
git clone https://github.com/s0md3v/Photon.git
cd Photon
sudo pip3 install -r requirements.txt
cd && cd $secret
# Impacket
git clone https://github.com/SecureAuthCorp/impacket
cd impacket
sudo python3 setup.py install
cd && cd $secret
# Sublist3r
git clone https://github.com/aboul3la/Sublist3r
cd Sublist3r
sudo pip3 install -r requirements.txt
cd && cd $secret
# spiderfoot
git clone https://github.com/smicallef/spiderfoot.git
cd spiderfoot
sudo pip3 install -r requirements.txt
cd && cd $secret
# theHarvester
git clone https://github.com/laramies/theHarvester
cd theHarvester
sudo pip3 install -r requirements.txt
cd && cd $secret
# git-dumper
git clone https://github.com/arthaud/git-dumper
cd git-dumper
sudo pip3 install -r requirements.txt
cd && cd $secret
# wesng
git clone https://github.com/bitsadmin/wesng
cd wesng
sudo python3 setup.py install
cd && cd $secret
# RsaCtfTool
git clone https://github.com/Ganapati/RsaCtfTool
cd RsaCtfTool
sudo apt-get install libgmp3-dev libmpc-dev -y
pip3 install -r requirements.txt
cd && cd $secret
# uncompyle6
git clone https://github.com/rocky/python-uncompyle6
cd python-uncompyle6
sudo python3 setup.py install
cd && cd $secret
# smbmap
git clone https://github.com/ShawnDEvans/smbmap
cd smbmap
python3 -m pip install -r requirements.txt
cd && cd $secret
# salamandra
sudo apt-get install rtl-sdr -y
git clone https://github.com/eldraco/Salamandra
# crowbar
git clone https://github.com/galkan/crowbar
cd crowbar/
pip3 install -r requirements.txt
cd && cd $secret
# SSRFmap
git clone https://github.com/swisskyrepo/SSRFmap
cd SSRFmap/
sudo pip3 install -r requirements.txt
cd && cd $secret
# s3viewer
git clone https://github.com/SharonBrizinov/s3viewer
cd s3viewer
python3 -m pip install -r packaging/requirements.txt
cd && cd $secret
# dotdotslash
git clone https://github.com/jcesarstef/dotdotslash
cd dotdotslash
sudo pip3 install -r requirements.txt
cd && cd $secret
# ntlm_theft
git clone https://github.com/Greenwolf/ntlm_theft
cd ntlm_theft
sudo pip3 install xlsxwriter
cd && cd $secret
# jwtcrack
git clone https://github.com/Sjord/jwtcrack
cd jwtcrack
sudo pip3 install -r requirements.txt
cd && cd $secret
# ccat
git clone https://github.com/cisco-config-analysis-tool/ccat
cd ccat
sudo pip3 install -r requirements.txt
cd && cd $secret
# wss
git clone https://github.com/WHK102/wss
cd wss
sudo pip3 install -r requirements.txt
cd && cd $secret
# fing
mkdir finggg
cd finggg
wget https://www.fing.com/images/uploads/general/CLI_Linux_Debian_5.5.2.zip
unzip CLI_Linux_Debian_5.5.2.zip
sudo dpkg -i fing-5.5.2-amd64.deb
cd ..
rm -rf finggg
cd && cd $secret
# searchsploit
sudo git clone https://github.com/offensive-security/exploitdb.git /opt/exploitdb
sudo ln -sf /opt/exploitdb/searchsploit /usr/local/bin/searchsploit
# metasploit
wget "https://apt.metasploit.com/$(curl -s https://apt.metasploit.com/ | grep 'amd64.deb' | tail -1 | cut -d '"' -f 2)"
sudo dpkg -i metasploit*.deb
rm metasploit*.deb
cd && cd $secret
# cewl
echo -e "\n${YELLOW}[!] install cewl${NC}"
git clone https://github.com/digininja/CeWL
cd CeWL
bundle install
cd && cd $secret
# intruder payloads
git clone https://github.com/1N3/IntruderPayloads
cd IntruderPayloads
./install.sh
cd && cd $secret
# eaphammer
git clone https://github.com/s0lst1c3/eaphammer
# hcxtools
git clone https://github.com/ZerBea/hcxtools
cd hcxtools
make
sudo make install
cd && cd $secret
# onesixtyone
git clone https://github.com/trailofbits/onesixtyone
cd onesixtyone
make
sudo make install
cd && cd $secret
# 3proxy
git clone https://github.com/z3apa3a/3proxy
cd 3proxy
ln -s Makefile.Linux Makefile
make
sudo make install
cd && cd $secret
# Radamsa
sudo apt-get install gcc make git wget
git clone https://gitlab.com/akihe/radamsa.git && cd radamsa && make && sudo make install
cd && cd $secret
# Sublime text
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt-get install apt-transport-https -y
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install sublime-text -y
# oletools
git clone https://github.com/decalage2/oletools
cd oletools
sudo python3 setup.py install
cd && cd $secret
# PCredz
git clone https://github.com/lgandx/PCredz
apt install python3-pip -y && sudo apt-get install libpcap-dev -y && pip3 install Cython && pip3 install python-libpcap
# Hydra
sudo apt-get install -y libssl-dev libssh-dev libidn11-dev libpcre3-dev \
libgtk2.0-dev libmysqlclient-dev libpq-dev libsvn-dev \
firebird-dev libmemcached-dev libgpg-error-dev \
libgcrypt11-dev libgcrypt20-dev
git clone https://github.com/vanhauser-thc/thc-hydra
cd thc-hydra
./configure
make
sudo make install
cd && cd $secret
##### Download git release and more
function websocat_install(){
echo "Installing latest version of websocat"
latest_version=$(curl -s https://github.com/vi/websocat/releases/ | grep "websocat_" | head -1 | cut -d'/' -f6)
curl -L "https://github.com/vi/websocat/releases/download/$latest_version/websocat_$(echo $latest_version | sed 's/v//')_newer_amd64.deb" --output "websocat_$(echo $latest_version | sed 's/v//')_newer_amd64.deb"
sudo dpkg -i "websocat_$(echo $latest_version | sed 's/v//')_newer_amd64.deb"
rm "websocat_$(echo $latest_version | sed 's/v//')_newer_amd64.deb"
}
function bat_install(){
echo "Installing latest version of bat"
latest_version=$(curl -s https://github.com/sharkdp/bat/releases | grep "bat_" | head -1 | cut -d'/' -f6)
curl -L "https://github.com/sharkdp/bat/releases/download/$latest_version/bat_$(echo $latest_version | sed 's/v//')_amd64.deb" --output "bat_$(echo $latest_version | sed 's/v//')_amd64.deb"
sudo dpkg -i "bat_$(echo $latest_version | sed 's/v//')_amd64.deb"
rm "bat_$(echo $latest_version | sed 's/v//')_amd64.deb"
}
function jdgui_install(){
echo "Installing latest version of JD-GUI"
latest_version=$(curl -s https://github.com/java-decompiler/jd-gui/releases | grep "jd-gui-" | head -1 | cut -d'/' -f6)
curl -L "https://github.com/java-decompiler/jd-gui/releases/download/$latest_version/jd-gui-$(echo $latest_version | sed 's/v//').deb" --output "jd-gui-$(echo $latest_version | sed 's/v//').deb"
sudo dpkg -i "jd-gui-$(echo $latest_version | sed 's/v//').deb"
rm "jd-gui-$(echo $latest_version | sed 's/v//').deb"
}
function starkiller_install(){
echo "Installing latest version of Starkiller"
latest_version=$(curl -s https://github.com/BC-SECURITY/Starkiller/releases | grep "starkiller-" | head -1 | cut -d'/' -f6)
curl -L "https://github.com/BC-SECURITY/Starkiller/releases/download/$latest_version/starkiller-$(echo $latest_version | sed 's/v//').AppImage" --output "starkiller-$(echo $latest_version | sed 's/v//').AppImage"
chmod +x "starkiller-$(echo $latest_version | sed 's/v//').AppImage"
}
function burp_download(){
echo "Downloading latest version of Burpsuite Community"
latest_version=$(curl "https://portswigger.net/burp/releases/data?previousLastId=-1&lastId=-1&pageSize=10" -s | jq ".ResultSet.Results[].builds" | grep -A5 '"community"' | grep -A4 '"Linux"' | grep Version | cut -d '"' -f 4 | sort -n | tail -1)
curl -L "https://portswigger.net/burp/releases/download?product=community&version=$latest_version&type=Linux" --output burp.sh
chmod +x burp.sh
}
function hashcat_download(){
echo "Downloading latest version of hashcat"
latest_version=$(curl -s https://github.com/hashcat/hashcat/releases | grep "hashcat-" | head -1 | cut -d'/' -f6)
curl -L "https://github.com/hashcat/hashcat/releases/download/$latest_version/hashcat-$(echo $latest_version | sed 's/v//').7z" --output "hashcat-$(echo $latest_version | sed 's/v//').7z"
7z x "hashcat-$(echo $latest_version | sed 's/v//').7z"
rm "hashcat-$(echo $latest_version | sed 's/v//').7z"
}
function frp_download(){
echo "Downloading latest version of fast reverse proxy"
latest_version=$(curl -s https://github.com/fatedier/frp/releases | grep "frp_" | head -1 | cut -d'/' -f6)
curl -L "https://github.com/fatedier/frp/releases/download/$latest_version/frp_$(echo $latest_version | sed 's/v//')_linux_amd64.tar.gz" --output "frp_$(echo $latest_version | sed 's/v//')_linux_amd64.tar.gz"
tar xzvf "frp_$(echo $latest_version | sed 's/v//')_linux_amd64.tar.gz"
rm "frp_$(echo $latest_version | sed 's/v//')_linux_amd64.tar.gz"
}
function powershell_installer(){
echo "Installing latest version of powershell"
latest_version="$(curl -s https://github.com/PowerShell/PowerShell/releases | grep powershell_ | cut -d "/" -f6 | grep -E "^v" | head -1)"
curl -L "https://github.com/PowerShell/PowerShell/releases/download/$latest_version/powershell_$(echo $latest_version | sed 's/v//')-1.ubuntu.20.04_amd64.deb" --output "powershell_$(echo $latest_version | sed 's/v//')-1.ubuntu.20.04_amd64.deb"
sudo dpkg -i "powershell_$(echo $latest_version | sed 's/v//')-1.ubuntu.20.04_amd64.deb"
sudo apt install -f
rm "powershell_$(echo $latest_version | sed 's/v//')-1.ubuntu.20.04_amd64.deb"
}
# run functions
websocat_install
bat_install
jdgui_install
starkiller_install
burp_download
hashcat_download
frp_download
# Install empire
powershell_installer
sudo pip3 install poetry
git clone --recursive https://github.com/BC-SECURITY/Empire.git
cd Empire
sudo ./setup/install.sh
sudo poetry install
cd && cd $secret
# disable service
echo -e "\n${YELLOW}[!] disable services${NC}"
sudo systemctl disable apache2
sudo systemctl disable bluetooth
sudo systemctl disable dnsmasq
sudo systemctl disable mariadb
sudo systemctl disable postgresql
sudo systemctl disable tor
#install_rustbuster() {
# echo "Installing latest version of Rustbuster"
# latest_version=`curl -s https://github.com/phra/rustbuster/releases | grep "rustbuster-v" | head -n1 | cut -d'/' -f6`
# echo "Latest release: $latest_version"
# mkdir -p /opt/rustbuster
# wget -qP /opt/rustbuster https://github.com/phra/rustbuster/releases/download/$latest_version/rustbuster-$latest_version-x86_64-unknown-linux-gnu
# ln -fs /opt/rustbuster/rustbuster-$latest_version-x86_64-unknown-linux-gnu /opt/rustbuster/rustbuster
# chmod +x /opt/rustbuster/rustbuster
# echo "Done! Try running"
# echo "/opt/rustbuster/rustbuster -h"
#}
#install_rustbuster
sudo sed -i '$ d' /etc/sudoers