-
Notifications
You must be signed in to change notification settings - Fork 22
/
install.sh
329 lines (261 loc) · 10.7 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
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
: '
+--------------------+
| Tool name |
+--------------------+
| docker-ce |
| rlwrap |
| code |
| gobuster |
| openjdk-11-jdk |
| gdb |
| ffuf |
| seclists |
| telnet |
| cmake |
| mingw-w64 |
| crowbar |
| mariadb-client |
| rustscan |
| pip2 |
| pip3 |
| evil-winrm |
| feroxbuster |
| autorecon |
| updog |
| sherlock |
| empire |
| msfpc |
| sudo_killer |
| les |
| wesng |
| wes |
| powerless |
| seatbelt |
| powerview |
| rsg |
| windapsearch |
| linenum.sh |
| lse.sh |
| winpeas |
| linpeas |
| volatility |
| nishang |
| ghidra |
| sysinternals suite |
| juicypotato |
| roguepotato |
| pwntools |
| z3-solver |
| randcrack |
| ms17-010 |
| sambacry |
| ghostcat |
| postfix shellshock |
| xploit_installer |
| windows-binaries |
| static-binaries |
+--------------------+
'
# Install manually:
# Wappalyzer (https://addons.mozilla.org/en-US/firefox/addon/wappalyzer/)
# Cookie Quick Manager (https://addons.mozilla.org/en-US/firefox/addon/cookie-quick-manager/)
# FoxyProxy Standard (https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard/)
# Install keys
## Add Docker keys
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
echo 'deb [arch=amd64] https://download.docker.com/linux/debian buster stable' | tee /etc/apt/sources.list.d/docker.list
## Add VSCode keys
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" | tee /etc/apt/sources.list.d/vscode.list
# Update
apt-get update -y && apt-get dist-upgrade -y
# Update searchsploit
searchsploit -u
# Install packages
packagelist=(
docker-ce
rlwrap
code
gobuster
openjdk-11-jdk
gdb
ffuf
seclists
telnet
cmake
mingw-w64
crowbar
mariadb-client
)
apt-get install -y ${packagelist[@]}
# Configure auto-startup for Docker
systemctl enable docker
systemctl start docker
usermod -aG docker kali
# Install https://github.com/RustScan/RustScan
docker pull rustscan/rustscan:2.0.0
echo "alias rustscan='docker run -it --network=host --rm --name rustscan rustscan/rustscan:2.0.0'" | tee -a /home/kali/.zshrc /root/.zshrc
# Install pip2 and pip3
curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
python2 /tmp/get-pip.py
python3 /tmp/get-pip.py
# Tools
mkdir /home/kali/Desktop/tools
cd /home/kali/Desktop/tools
# Important directories
ln -s /usr/share/seclists /home/kali/Desktop/tools/seclists
ln -s /usr/share/wordlists /home/kali/Desktop/tools/wordlists
ln -s /usr/share/nmap/scripts/ /home/kali/Desktop/tools/nmap-scripts
ln -s /usr/share/webshells /home/kali/Desktop/tools/webshells
# Install evil-winrm
gem install evil-winrm
# Install feroxbuster
curl -sL https://raw.githubusercontent.com/epi052/feroxbuster/master/install-nix.sh | bash
mv feroxbuster /usr/bin/feroxbuster
# Install AutoRecon
python3 -m pip install git+https://github.com/Tib3rius/AutoRecon.git
# Install nmapAutomator
git clone https://github.com/21y4d/nmapAutomator
# Install Updog
python3 -m pip install updog
# Install Sherlock
git clone https://github.com/rasta-mouse/Sherlock
# Install Empire
git clone https://github.com/EmpireProject/Empire
# Install msfpc
git clone https://github.com/g0tmi1k/msfpc
# Install SUDO_KILLER
git clone https://github.com/TH3xACE/SUDO_KILLER
# Install les
git clone https://github.com/mzet-/linux-exploit-suggester
# Install wesng
git clone https://github.com/bitsadmin/wesng
# Install WES
git clone https://github.com/AonCyberLabs/Windows-Exploit-Suggester
pip2 install xlrd==1.1.0
# Install Powerless
git clone https://github.com/M4ximuss/Powerless
# Install Seatbelt
mkdir Seatbelt
wget https://raw.githubusercontent.com/r3motecontrol/Ghostpack-CompiledBinaries/master/Seatbelt.exe -O Seatbelt/Seatbelt.exe
# Install Powerview
mkdir powerview
curl https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Recon/PowerView.ps1 > powerview/powerview.ps1
# Install rsg - Reverse Shell Generator
git clone https://github.com/mthbernardes/rsg
# Install windapsearch
git clone https://github.com/ropnop/windapsearch
# Install LinEnum.sh
git clone https://github.com/rebootuser/LinEnum
# Install Linux Smart Enumeraetion
git clone https://github.com/diego-treitos/linux-smart-enumeration
# Install winPEAS and linPEAS
git clone https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite
# Install volatility
git clone https://github.com/volatilityfoundation/volatility3.git
# Install impacket for python2
git clone https://github.com/SecureAuthCorp/impacket.git
cd impacket
python2 -m pip install setuptools
python2 -m pip install .
cd ..
# Install nishang
git clone https://github.com/samratashok/nishang
# Install Ghidra
curl https://ghidra-sre.org/ghidra_9.2_PUBLIC_20201113.zip > ghidra.zip
unzip ghidra.zip && rm ghidra.zip
mv ghidra_9.2_PUBLIC ghidra
# Download Sysinternals Suite
curl https://download.sysinternals.com/files/SysinternalsSuite.zip > sysinternals.zip
unzip sysinternals.zip -d sysinternals && rm sysinternals.zip
# Install pspy
mkdir pspy
curl -s https://api.github.com/repos/DominicBreuker/pspy/releases/latest | grep "browser_download_url.*pspy32\"" | cut -d : -f 2,3 | tr -d \" | wget -qi - -O pspy/pspy32
curl -s https://api.github.com/repos/DominicBreuker/pspy/releases/latest | grep "browser_download_url.*pspy64\"" | cut -d : -f 2,3 | tr -d \" | wget -qi - -O pspy/pspy64
# Install potatoes
mkdir potatoes
curl -s https://api.github.com/repos/ohpe/juicy-potato/releases/latest | grep "browser_download_url.*exe" | cut -d : -f 2,3 | tr -d \" | wget -qi - -O potatoes/juicypotato.exe
curl -s https://api.github.com/repos/antonioCoco/RoguePotato/releases/latest | grep "browser_download_url.*RoguePotato.zip\"" | cut -d : -f 2,3 | tr -d \" | wget -qi - -O potatoes/RoguePotato.zip && unzip potatoes/RoguePotato.zip -d potatoes && rm potatoes/RoguePotato.zip
# Install pwntools
python2 -m pip install pwntools
python3 -m pip install pwntools
# Install z3 solver
python2 -m pip install z3-solver
python3 -m pip install z3-solver
# Install randcrack
python2 -m pip install randcrack
python3 -m pip install randcrack
# Exploits
mkdir /home/kali/Desktop/exploits
cd /home/kali/Desktop/exploits
# MS17-010 (Eternal Blue) exploit
mkdir eternalblue
curl https://raw.githubusercontent.com/helviojunior/MS17-010/master/send_and_execute.py > eternalblue/ms17-010.py
curl https://raw.githubusercontent.com/worawit/MS17-010/master/mysmb.py > eternalblue/mysmb.py
curl https://raw.githubusercontent.com/worawit/MS17-010/master/checker.py > eternalblue/pipefinder.py
# mRemoteNG Password Decrypter
mkdir mremoteng
curl https://raw.githubusercontent.com/kmahyyg/mremoteng-decrypt/master/mremoteng_decrypt.py > mremoteng/decrypt.py
# CVE-2017-7494 SambaCry
git clone https://github.com/joxeankoret/CVE-2017-7494 sambacry
# CVE-2020-1938 Ghostcat
git clone https://github.com/dacade/CVE-2020-1938 ghostcat
# Postfix Shellshock
mkdir postfix_shellshock
curl https://gist.githubusercontent.com/claudijd/33771b6c17bc2e4bc59c/raw/4458302d966b640e0098bef7ad2d057ac06c4e27/exploit.py > postfix_shellshock/exploit.py
# xploit_installer
mkdir xploit_installer
curl https://raw.githubusercontent.com/wwong99/pentest-notes/master/scripts/xploit_installer.py > xploit_installer/xploit_installer.py
# Useful static binaries
mkdir /home/kali/Desktop/binaries
cd /home/kali/Desktop/binaries
ln -s /usr/share/windows-resources/ windows-binaries
git clone https://github.com/andrew-d/static-binaries
# Unzip rockyou.txt
gunzip /usr/share/wordlists/rockyou.txt
mkdir /home/kali/Desktop/web
cd /home/kali/Desktop/web
ln -s /home/kali/Desktop/tools/Empire/data/module_source/credentials/Invoke-Kerberoast.ps1 Invoke-Kerberoast.ps1
ln -s /home/kali/Desktop/tools/nishang/Gather/Invoke-Mimikatz.ps1 Invoke-Mimikatz.ps1
ln -s /home/kali/Desktop/tools/nishang/Shells/Invoke-PowerShellTcp.ps1 Invoke-PowerShellTcp.ps1
ln -s /home/kali/Desktop/tools/Powerless/Powerless.bat powerless.bat
ln -s /home/kali/Desktop/tools/powerview/powerview.ps1 powerview.ps1
ln -s /home/kali/Desktop/tools/privilege-escalation-awesome-scripts-suite/winPEAS/winPEASbat/winPEAS.bat winpeas.bat
ln -s /home/kali/Desktop/tools/privilege-escalation-awesome-scripts-suite/winPEAS/winPEASexe/winPEAS/bin/Obfuscated\ Releases/winPEASx86.exe winpeasx86.exe
ln -s /home/kali/Desktop/tools/privilege-escalation-awesome-scripts-suite/winPEAS/winPEASexe/winPEAS/bin/Obfuscated\ Releases/winPEASx64.exe winpeasx64.exe
ln -s /home/kali/Desktop/tools/privilege-escalation-awesome-scripts-suite/winPEAS/winPEASexe/winPEAS/bin/Obfuscated\ Releases/winPEASany.exe winpeasany.exe
ln -s /home/kali/Desktop/tools/Sherlock/Sherlock.ps1 sherlock.ps1
ln -s /home/kali/Desktop/tools/Seatbelt/Seatbelt.exe seatbelt.exe
ln -s /home/kali/Desktop/tools/LinEnum/LinEnum.sh linenum.sh
ln -s /home/kali/Desktop/tools/linux-smart-enumeration/lse.sh lse.sh
ln -s /home/kali/Desktop/tools/privilege-escalation-awesome-scripts-suite/linPEAS/linpeas.sh linpeas.sh
ln -s /home/kali/Desktop/tools/pspy/pspy32 pspy32
ln -s /home/kali/Desktop/tools/pspy/pspy64 pspy64
ln -s /home/kali/Desktop/tools/potatoes/juicypotato.exe juicypotato.exe
ln -s /home/kali/Desktop/tools/potatoes/RoguePotato.exe roguepotato.exe
ln -s /home/kali/Desktop/tools/sysinternals sysinternals
ln -s /home/kali/Desktop/binaries/windows-binaries/binaries/nc.exe nc.exe
ln -s /home/kali/Desktop/binaries/windows-binaries/binaries/whoami.exe whoami.exe
ln -s /home/kali/Desktop/binaries/windows-binaries/binaries/plink.exe plink.exe
ln -s /home/kali/Desktop/binaries/windows-binaries/mimikatz/x64/mimikatz.exe mimikatz64.exe
ln -s /home/kali/Desktop/binaries/windows-binaries/mimikatz/Win32/mimikatz.exe mimikatz32.exe
ln -s /home/kali/Desktop/binaries/windows-binaries/mimikatz/Win32/mimilove.exe mimilove.exe
# Command Shortcuts
tee -a ~/.zshrc << END
superscan() {
echo "rustscan --accessible -a \$1 -r 1-65535 -- -sT -sV -sC -Pn"
rustscan --accessible -a "\$1" -r 1-65535 -- -sT -sV -sC -Pn
}
END
# Free RWX for all!
chmod -R 777 /home/kali/Desktop/tools
chmod -R 777 /home/kali/Desktop/exploits
chmod -R 777 /home/kali/Desktop/web
chmod -R 777 /home/kali/Desktop/binaries
cd /home/kali/Desktop
echo "Relog to refresh group membership"