-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstrategy.sh
More file actions
executable file
·515 lines (372 loc) · 10.6 KB
/
Copy pathstrategy.sh
File metadata and controls
executable file
·515 lines (372 loc) · 10.6 KB
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
#!/bin/bash
#######################################################################
# Global Variables #
##########################
long='============================================================================================================================='
medium='====================================================================================='
file="/tmp/robots.txt"
file2="/tmp/robots2.txt"
#################################
# End of Global Variables #
########################################################################################################################
#######################################################################
# function f_recondomain #
##########################
f_recondomain(){
clear
echo "Joe McCray's Pentester Candidate Program "
echo " Week 3 - Linux and Linux shell scripting"
echo " by Nick Sanzotta"
echo " Option 1 running OSINT Web Domain "
echo $long
echo -n "Enter a domain: "
read domain
# Check for no reponse
if [ -z domain ]; then
echo
echo "You did not enter a domain."
exit
fi
echo
echo
echo "Ready to run OSINT on $domain? "
read -p "Press <enter> to continue."
echo "Running $domain against the following databases. "
echo $long
firefox &
sleep 4
echo "www.manta.com"
firefox -new-tab https://www.google.com/?gws_rd=ssl#q=$domain+site:manta.com
echo "www.urlvoid.com"
sleep 3
firefox -new-tab http://www.urlvoid.com/scan/$domain/ &
sleep 3
echo "www.xssed.com"
firefox -new-tab http://www.xssed.com/search?key=$domain &
sleep 3
echo "www.archive.org"
firefox -new-tab http://web.archive.org/web/*/$domain &
sleep 3
echo "www.netcraft.com"
firefox -new-tab http://toolbar.netcraft.com/site_report?url=$domain &
sleep 2
echo "www.intodns.com"
firefox -new-tab http://www.intodns.com/$domain &
sleep 2
echo "whois.domaintools.com"
firefox -new-tab http://whois.domaintools.com/$domain &
read -p "Press <enter> to quit: "
}
#################################
# End of function f_recondomain #
######################################################################################################################
#######################################################################
# function f_robots #
#####################
f_robots(){
clear
rm -f $file 2>/dev/null
rm -f $file2 2>/dev/null
clear
echo "Joe McCray's Pentester Candidate Program "
echo " Week 3 - Linux and Linux shell scripting"
echo " by Nick Sanzotta"
echo " Option 2 Robots.txt"
echo $long
echo
echo "Usage: example.com"
echo "Do not use: www.example.com"
echo
echo -n "Enter a domain: "
read domain
# Check for no response
if [ -z $domain ]; then
echo
echo "You did not enter a domain."
exit
fi
wget -O /tmp/robots.txt http://$domain/robots.txt 2>/dev/null &
sleep 5
#clean up robots.txt
rm -f /tmp/robots2.txt
sleep 1
cat "/tmp/robots.txt" | grep 'Disallow' | cut -d ' ' -f2 > "/tmp/robots2.txt" &
firefox &
sleep 5
for i in `cat $file2`;do firefox -new-tab http://$domain$i; sleep 5; done
#for i in `cat $file2`;do echo $i;done
}
###########################
# End of function f_robots#
########################################################################################################################
#######################################################################
# function f_subdomain#
#######################
f_subdomain(){
clear
echo "Joe McCray's Pentester Candidate Program "
echo " Week 3 - Linux and Linux shell scripting"
echo " by Nick Sanzotta"
echo " Option 3 finding subdomains"
echo $long
echo -n "Enter a domain: "
read domain
# Check for no reponse
if [ -z domain ]; then
echo
echo "You did not enter a domain."
exit
fi
echo "1. Running blind crawl on: $domain "
perl /home/strategicsec/toolz/blindcrawl.pl -d $domain &&
echo $long
read -p "Press <enter> to continue with fierce or ctrl-z to quit"
echo "2. Running fierce on: $domain "
perl /home/strategicsec/toolz/fierce2/fierce -dns $domain --template /home/strategicsec/toolz/fierce2/tt &
}
#################################
# End of function f_subdomain #
########################################################################################################################
#######################################################################
# function f_people #
#####################
f_people(){
clear
echo "Joe McCray's Pentester Candidate Program "
echo " Week 3 - Linux and Linux shell scripting"
echo " by Nick Sanzotta"
echo " Option 4 running OSINT on a person of interest"
echo $long
echo -n "Enter your target's First name:"
read fname
if [ -z $fname ]; then
echo
echo "You did not enter a firt name."
exit
fi
echo
echo -n "Enter your target's Last name:"
read lname
if [ -z $lname ]; then
echo
echo "You did not enter a last name."
exit
fi
echo
echo "Ready to run OSINT on $fname $lname."
echo
read -p "Press <enter> to continue."
echo "Running $fname $lname against the following databases"
firefox &
sleep 4
echo "www.411.com"
firefox -new-tab http://www.411.com/name/$fname-$lname/ &
sleep 3
echo "www.cvgadget"
firefox -new-tab http://www.cvgadget.com/person/$fname/$lname &
sleep 3
echo "www.pipl.com"
firefox -new-tab https://pipl.com/search/?q=$fname+$lname &
sleep 3
echo "www.zabasearch.com"
firefox -new-tab http://www.zabasearch.com/people/$fname+$lname/ &
}
############################
# End of function f_people #
########################################################################################################################
#######################################################################
# function f_lbd #
##################
f_lbd(){
clear
echo "Joe McCray's Pentester Candidate Program "
echo " Week 3 - Linux and Linux shell scripting"
echo " by Nick Sanzotta"
echo " Option 5 Load Balancer Detection"
echo $long
echo
echo
echo "Usage: example.com"
echo "Do not use: www.example.com"
echo
echo -n "Enter a domain: "
read domain
# Check for no response
if [ -z $domain ]; then
echo
echo "You did not enter a domain."
exit
fi
echo
echo "Running halberd on:$domain "
halberd $domain -v &&
echo "Running lbd on:$domain "
/bin/bash /home/strategicsec/toolz/lbd-0.1.sh $domain
}
#########################
# End of function f_lbd #
########################################################################################################################
#######################################################################
# function f_ipsd#
#################
f_ipsd(){
clear
echo "Joe McCray's Pentester Candidate Program "
echo " Week 3 - Linux and Linux shell scripting"
echo " by Nick Sanzotta"
echo " Option 6 Intrusion Prevention Detection "
echo $long
echo
echo
echo "Usage: example.com"
echo "Do not use: www.example.com"
echo
echo -n "Enter a domain: "
read domain
# Check for no response
if [ -z $domain ]; then
echo
echo "You did not enter a domain."
exit
fi
echo ##################################
echo # Intrusion Prevention Detection #
echo ##################################
echo
echo
echo "Starting osstmm on: $domain over standard HTTP"
echo $long
echo
echo
osstmm-afd -P HTTP -t $domain -v &&
echo
echo
echo "This scan has completed."
}
#########################
# End of function f_lbd #
########################################################################################################################
#######################################################################
# function f_ipsd_tls#
######################
f_ipsd_tls(){
clear
echo "Joe McCray's Pentester Candidate Program "
echo " Week 3 - Linux and Linux shell scripting"
echo " by Nick Sanzotta"
echo " Option 7 Intrusion Prevention Detection over TLS "
echo $long
echo
echo
echo "Usage: example.com"
echo "Do not use: www.example.com"
echo
echo -n "Enter a domain: "
read domain
# Check for no response
if [ -z $domain ]; then
echo
echo "You did not enter a domain."
exit
fi
read -p "Press <enter> to run OSSTMM over SSL/TLS or press ctr-z to cancel"
echo
echo
echo
echo $long
# Overwriting ssl_proxy.sh with our $domain variable
echo -e "#!/bin/bash \n \nopenssl s_client -quiet -connect $domain:443 2>/dev/null" > /home/strategicsec/toolz/ssl_proxy.sh &
sleep 2
echo
echo
echo $long
# Displaying xinetd status on stdout
service xinetd status &
sleep 5
echo
echo
echo
echo "Running OSSTMM over TLS on 127.0.0.1 TCP Port 8888"
echo $long
osstmm-afd -P HTTP -t 127.0.0.1 -p 8888 -v &&
sleep 5
# Restoring ssl_proxy.sh with its orginal vaule www.strategicsec.com
echo -e "#!/bin/bash \n \nopenssl s_client -quiet -connect www.strategicsec.com:443 2>/dev/null >" > /home/strategicsec/toolz/ssl_proxy.sh
}
#############################
# End of function f_lbd_tls #
########################################################################################################################
#######################################################################
# function f_list_scan #
########################
f_list_scan(){
clear
echo "Joe McCray's Pentester Candidate Program "
echo " Week 3 - Linux and Linux shell scripting"
echo " by Nick Sanzotta"
echo " Option 8 List Scan and CNAME query"
echo $long
echo
echo "Usage: 192.168.1.1/24"
echo "Enter your IP range in CIDR formation"
read ip
# Check for no response
if [ -z $ip ]; then
echo
echo "You did not enter a IP."
exit
fi
echo
read -p "Press <enter> to run a list scan on $ip or press ctrl-z to cancel"
echo
echo
sudo nmap -sL $ip &&
sleep 5
echo $long
read -p "Press <enter> to continue and run a CNAME query on $ip or press ctrl-z to cancel"
echo
echo
sudo nmap -p 443,444,8443,8080,8088 --script=ssl-cert --open $ip
}
###############################
# End of function f_list_scan #
########################################################################################################################
#######################################################################
# Main Menu #
#############
f_main(){
clear
echo "Joe McCray's Pentester Candidate Program "
echo " Week 3 - Linux and Linux shell scripting"
echo " by Nick Sanzotta"
echo $long
echo "1.OSINT Web Domain"
echo "2.Domain's robots.txt"
echo "3.Find subdomains"
echo "4.OSINT People"
echo "5.Load Balancer Detection"
echo "6.IPS Dectection"
echo "7.IPS Dectection over TLS"
echo "8.List Scan & CNAME query"
echo $long
echo
echo -n "Enter your Choice: "
echo
read choice
echo $choice
case $choice in
1) f_recondomain;;
2) f_robots;;
3) f_subdomain;;
4) f_people;;
5) f_lbd;;
6) f_ipsd;;
7) f_ipsd_tls;;
8) f_list_scan;;
*) echo; echo "Invalid choice"; echo
esac
}
while true; do f_main; done
###################
# End of Main Menu#
########################################################################################################################