-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathnetool.sh
executable file
·3322 lines (2363 loc) · 102 KB
/
netool.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
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/sh
##################################################
# [NETWORK TOOLS V4.6] #
# ScriptBash to view quick info about related #
# network connections and quick scans local host #
# By: Pedro Ubuntu (r00t-3xp10it) #
##########################################inicio##
#
# THIS SCRIPT WAS MADE TO WORK ON A UNIX SYSTEM
# REPORT ANY BUGS FOUND TO MY WIKI
# http://sourceforge.net/projects/netoolsh/
# C0den4me:Single_byte_XOR
# D1str0:Kali
#
########
# Resize terminal windows size befor running the tool (gnome terminal)
# Special thanks to h4x0r Milton@Barra for this little piece of heaven! :D
resize -s 93 92 > /dev/null
# ----------------------------------
# CONFIGURATIONS OF THE SCRIPT
# ----------------------------------
#####################################################################################################
# Path to instalations and variaveis do script #
# if you want to change the paths to frameworks look at /opensource/toolkit_config #
#####################################################################################################
ver="4.6" # toolkit current develop version #
H0m3=`echo ~` # current user HOME path #
confSSL="installed" # instalation path to sslstrip #
about="changelog.nt" # instalation path to intro screen #
usera=`who | cut -d' ' -f1 | sort | uniq` # grab local PC login username #
loca=`locate -b -n 1 "opensource" | cut -d '.' -f1` # opensource folder install path #
distr=`cat $H0m3/opensource/netool.sh | egrep -m 1 "D1str0" | cut -d ':' -f2` # grab netool distro #
lo=`cat $H0m3/opensource/toolkit_config | egrep -m 1 "SET_CHANGELOG" | cut -d '=' -f2` #
phpins=`cat $H0m3/opensource/toolkit_config | egrep -m 1 "PHP5_INSTALL_PATH" | cut -d '=' -f2` #
tWd=`cat $H0m3/opensource/toolkit_config | egrep -m 1 "TEMP_FOLDER" | cut -d '=' -f2` #
find=`cat $H0m3/opensource/toolkit_config | egrep -m 1 "ZENMAP_INSTALL_PATH" | cut -d '=' -f2` #
apache=`cat $H0m3/opensource/toolkit_config | egrep -m 1 "APACHE_INSTALL_PATH" | cut -d '=' -f2` #
priv8=`cat $H0m3/opensource/toolkit_config | egrep -m 1 "ROOTSECTOR_INSTALL_PATH" | cut -d '=' -f2` #
find3=`cat $H0m3/opensource/toolkit_config | egrep -m 1 "MACCHANGER_INSTALL_PATH" | cut -d '=' -f2` #
find4=`cat $H0m3/opensource/toolkit_config | egrep -m 1 "METASPLOIT_INSTALL_PATH" | cut -d '=' -f2` #
confE=`cat $H0m3/opensource/toolkit_config | egrep -m 1 "ETTERCONF_INSTALL_PATH" | cut -d '=' -f2` #
confP=`cat $H0m3/opensource/toolkit_config | egrep -m 1 "ETTERSERV_INSTALL_PATH" | cut -d '=' -f2` #
find2=`cat $H0m3/opensource/toolkit_config | egrep -m 1 "ETTERCAP_INSTALL_PATH" | cut -d '=' -f2` #
confD=`cat $H0m3/opensource/toolkit_config | egrep -m 1 "ETTERDNS_INSTALL_PATH" | cut -d '=' -f2` #
confW=`cat $H0m3/opensource/toolkit_config | egrep -m 1 "DRIFTNET_INSTALL_PATH" | cut -d '=' -f2` #
#####################################################################################################
# ----------------------------------------
# Colorise shell Script output leters
# ----------------------------------------
Colors() {
Escape="\033";
white="${Escape}[0m";
RedF="${Escape}[31m";
GreenF="${Escape}[32m";
YellowF="${Escape}[33m";
BlueF="${Escape}[34m";
CyanF="${Escape}[36m";
Reset="${Escape}[0m";
}
# -------------------------------------------
# Check for dependencies installed
# -------------------------------------------
# check if user is root
if [ $(id -u) != "0" ]; then
Colors;
cat << !
┌┐┌┌─┐┌┬┐ ┌┬┐┌─┐┌─┐┬ ┌─┐
│││├┤ │ │ │ ││ ││ └─┐
┘└┘└─┘ ┴ ┴ └─┘└─┘┴─┘└─┘$ver
!
echo ${RedF}peterubuntu10[at]sourceforge[dot]net ${Reset};
echo "[MITM Pentesting OpenSource toolkit]"
sleep 1
echo ${YellowF}[!]${RedF}:${YellowF}[Check Dependencies]: ${Reset};
sleep 2
echo ${BlueF}[*]${RedF}:${BlueF}[Check User]:${RedF}$USER ${Reset};
sleep 1
echo ${RedF}[x]:[not root]${white}:you need to be ${GreenF}[root]${white} to run this script.${Reset};
echo ""
sleep 1
exit
else
Colors;
cat << !
┌┐┌┌─┐┌┬┐ ┌┬┐┌─┐┌─┐┬ ┌─┐
│││├┤ │ │ │ ││ ││ └─┐
┘└┘└─┘ ┴ ┴ └─┘└─┘┴─┘└─┘$ver
!
echo ${RedF}peterubuntu10[at]sourceforge[dot]net ${Reset};
echo "[MITM Pentesting OpenSource toolkit]"
sleep 1
echo ${YellowF}[!]${RedF}:${YellowF}[Check Dependencies]: ${Reset};
sleep 2
echo ${BlueF}[*]${RedF}:${BlueF}[Check User]:${GreenF}$USER ${Reset};
sleep 1
fi
# check if Nmap installation exists
if [ -d $find ]; then
Colors;
echo ${BlueF}[*]${RedF}:${BlueF}[Nmap]:${white}installation found!${Reset};
else
Colors;
echo ${RedF}[x]:[warning]:this script require Nmap installed to work ${Reset};
echo ${GreenF}[!]${RedF}:${GreenF}[please wait]: Downloading from network... ${Reset};
sleep 3
apt-get install nmap
apt-get install zenmap
fi
sleep 1
# check if ettercap installation exists
if [ -d $find2 ]; then
Colors;
echo ${BlueF}[*]${RedF}:${BlueF}[Ettercap]:${white}installation found!${Reset};
else
Colors;
echo ${RedF}[x]:[warning]:this script required ettercap installed to work${Reset};
echo ${GreenF}[!]${RedF}:${GreenF}[please wait]: Downloading from network... ${Reset};
sleep 3
sudo apt-get install ettercap-text-only ettercap-graphical
fi
sleep 1
# check if macchanger installation exists
if [ -e $find3 ]; then
Colors;
echo ${BlueF}[*]${RedF}:${BlueF}[Macchanger]:${white}instalation found!${Reset};
sleep 2
else
echo ""
Colors;
echo ${RedF}[x]:[warning]this script required Macchanger instaled to work${Reset};
echo ${GreenF}[!]${RedF}:${GreenF}[please wait]: Downloading from network... ${Reset};
echo ${GreenF}[!]${RedF}:${white}press ${CyanF}{CTRL+C}${white} to stop installation ${Reset};
sleep 4
# installing macchanger from network
echo ""
apt-get install macchanger macchanger-gtk
echo ${YellowF}[+]${RedF}:${YellowF}macchanger {instaled} restarting Script...${Reset};
sleep 3
exit
fi
# ---------------------------------------
# Test For Internet Connection
# ---------------------------------------
# ping google
ping -c 1 google.com > /dev/null 2>&1
if [ "$?" != 0 ]
then
echo ${BlueF}[*]${RedF}:${BlueF}[Internet Connection]${RedF}:[ FAIL ]${Reset};
echo ${RedF}[x]:[ WARNING ]:${YellowF}This Script Needs An Active Internet Connection${Reset};
sleep 4
clear
else
echo ${BlueF}[*]${RedF}:${BlueF}[Internet Connection]${RedF}:${GreenF}[ CONNECTED! ]${Reset};
sleep 2
fi
# ----------------------------------
# print changelog screen info
# ----------------------------------
Colors;
if [ "$lo" = "YES" ]; then
if [ -e ~/opensource/modules/changelog.nt ]; then
# start Intro.nt (intro screen wellcome page)
cd ~/opensource/modules
cat Intro.nt | zenity --title "-:[ VERSION $ver CHANGELOG ]:-" --text-info --width 700 --height 640 > /dev/null 2>&1
rm -f changelog.nt
cd ~/
else
echo ""
fi
fi
# -----------------------------------
# changelog screen info
# -----------------------------------
sh_ABOUT () {
cd ~/opensource/modules
# start Intro.nt (intro screen wellcome page)
cat Intro.nt | zenity --title "-:[ VERSION $ver CHANGELOG ]:-" --text-info --width 700 --height 640 > /dev/null 2>&1
# return to main menu
cd ~/
sh_MAIN
clear
}
# ----------------------------------
# customize settings within netool toolkit
# ----------------------------------
sh_toolconf () {
Colors;
echo ${BlueF}[*]${RedF}:${BlueF}[editing]:${white}toolkit_config 'file' ${Reset};
echo ${RedF}[x]:'in' some ocasions you will need to restart ${Reset};
echo ${RedF}[x]:the toolkit 'for' the changes take effect. ${Reset};
cd ~/opensource
xterm -T "toolkit_config" -geometry 75x38 -e "nano toolkit_config"
clear
}
# ----------------------------------
# bash trap ctrl-c and call ctrl_c()
# ----------------------------------
trap ctrl_c INT
ctrl_c() {
Colors;
echo ${RedF}[x]:${YellowF} You have pressed ${RedF}[CTRL+C] ${Reset};
echo ${RedF}[x]:${YellowF} Please Wait, cleanning ... ${Reset};
sleep 2
sh_clean
}
# ----------------------------------
# END OF CONFIGURATIONS
# ----------------------------------
#################################################################################
# SCRIPT FUNCTIONS #
#################################################################################
# -----------------------------------
# Show my local connection and services
# -----------------------------------
sh_port () {
Colors;
echo ${YellowF}" _"
echo ${YellowF}' |' This module shows Local connections and services ${Reset};
echo ${YellowF}' |_' Running inside our pc using {netstat} Command ${Reset};
echo ""
# chose to run or to leave to main menu
read -p "[+]:{run|quit}(choise):" pass
if test "$pass" = "run"
then
Colors;
echo ${BlueF}[*]${RedF}:${GreenF}[ Active network connections ]${Reset};
echo "" > ~/opensource/logs/Local.log
echo ":[ MAJOR STATS ]:" >> ~/opensource/logs/Local.log
netstat -s | grep "total packets received" | awk '{print}' >> ~/opensource/logs/Local.log
netstat -s | grep "incoming packets discarded" | awk '{print}' >> ~/opensource/logs/Local.log
netstat -s | grep "ICMP messages received" | awk '{print}' >> ~/opensource/logs/Local.log
netstat -s | grep "ICMP messages send" | awk '{print}' >> ~/opensource/logs/Local.log
netstat -s | grep "active connections openings" | awk '{print}' >> ~/opensource/logs/Local.log
netstat -s | grep "passive connections openings" | awk '{print}' >> ~/opensource/logs/Local.log
netstat -s | grep "connections estabished" | awk '{print}' >> ~/opensource/logs/Local.log
netstat -s | grep "bad segments received." | awk '{print}' >> ~/opensource/logs/Local.log
# arp scan
echo "" >> ~/opensource/logs/Local.log
echo ":[ ARP SCAN ]:" >> ~/opensource/logs/Local.log
arp -vn >> ~/opensource/logs/Local.log
# NETSTAT + LSOF
echo "" >> ~/opensource/logs/Local.log
echo ":[ NETSTAT ]:" >> ~/opensource/logs/Local.log
netstat -anptuw >> ~/opensource/logs/Local.log
echo "" >> ~/opensource/logs/Local.log
echo ":[ LSOF ]:" >> ~/opensource/logs/Local.log
lsof -i -P >> ~/opensource/logs/Local.log
# display results onscreen
cat ~/opensource/logs/Local.log | zenity --title "LOCAL NETWORK STATS" --text-info --width 730 --height 600 > /dev/null 2>&1
clear
else
echo ${RedF}[x]:[ABORTED]:[${YellowF} QUIT ${RedF}] ${Reset};
sleep 2
clear
fi
}
# ----------------------------------
# Ping a target address or domain name
# ----------------------------------
sh_ping () {
Colors;
echo ${YellowF}' _'${Reset};
echo ${YellowF}' |' This module pings a target to discover is IP addr ${Reset};
echo ${YellowF}' |_' Or simple to see If the target domain is alive. ${Reset};
echo ""
# chose to run or to leave to main menu
read -p "[+]:{run|quit}(choise):" pass
if test "$pass" = "run"
then
# ping target domain and store log under /opensource/logs folder
target=$(zenity --title="DOMAIN OR IP ADDR" --text "example: www.linux.org\nexample: 192.168.1.68" --width 300 --entry) > /dev/null 2>&1
echo ${BlueF}[*]${RedF}:${BlueF}[Please wait]${RedF}:${GreenF}[ RUNING SCAN ] ${Reset};
ping -c 1 $target | grep "PING" | awk '{print $1,$2,$3}' > ~/opensource/logs/Ping.log
ping -c 3 $target | grep "packets transmitted" | awk '{print $1,$2,$3,$4,$5,$6,$7,$8}' >> ~/opensource/logs/Ping.log
cat ~/opensource/logs/Ping.log | zenity --title "PING TARGET HOST/DOMAIN" --text-info --width 450 --height 130 > /dev/null 2>&1
sleep 1
sh_2menu
else
Colors;
echo ${RedF}[x]:[ABORTED]:[${YellowF} QUIT ${RedF}] ${Reset};
sleep 2
sh_2menu
fi
}
# ----------------------------------
# Show my ip address mac address and arp cache
# ----------------------------------
sh_ip () {
Colors;
echo ${YellowF}' _'${Reset};
echo ${YellowF}' |' This module shows the ip-address, mac-address ${Reset};
echo ${YellowF}' |_' Hostname and arp cache of interface:${GreenF}[ $inter ] ${Reset};
echo ""
# chose to run or to leave to main menu
read -p "[+]:{run|quit}(choise):" pass
if test "$pass" = "run"
then
# store in logfile
dft=`cat /etc/hostname`
echo ${BlueF}[*]${RedF}:${BlueF}[Please wait]${RedF}:${GreenF}[ RUNING SCANS ] ${Reset};
echo "" > ~/opensource/logs/IPSETTINGS.log
echo ":[ HOSTNAME ]:" >> ~/opensource/logs/IPSETTINGS.log
echo "$dft.lan" >> ~/opensource/logs/IPSETTINGS.log
echo "" >> ~/opensource/logs/IPSETTINGS.log
echo ":[ IP ADDRESS ]:" >> ~/opensource/logs/IPSETTINGS.log
ifconfig $inter | grep -w "inet" | cut -d ':' -f2 | cut -d 'B' -f1 >> ~/opensource/logs/IPSETTINGS.log
echo "" >> ~/opensource/logs/IPSETTINGS.log
echo ":[ MAC ADDRESS ]:" >> ~/opensource/logs/IPSETTINGS.log
ifconfig $inter | egrep -w "HW" | awk '{print $7}' >> ~/opensource/logs/IPSETTINGS.log
echo "" >> ~/opensource/logs/IPSETTINGS.log
echo ":[ NET MASK ]:" >> ~/opensource/logs/IPSETTINGS.log
ifconfig $inter | egrep -w "Masc" | awk '{print $4}' | cut -d ':' -f2 >> ~/opensource/logs/IPSETTINGS.log
echo "" >> ~/opensource/logs/IPSETTINGS.log
echo ":[ GATEWAY ]:" >> ~/opensource/logs/IPSETTINGS.log
ip route | grep "static" | awk {'print $3'} >> ~/opensource/logs/IPSETTINGS.log
echo "" >> ~/opensource/logs/IPSETTINGS.log
echo ":[ IP RANGE ]:" >> ~/opensource/logs/IPSETTINGS.log
ip route | grep "kernel" | awk {'print $1'} >> ~/opensource/logs/IPSETTINGS.log
echo "" >> ~/opensource/logs/IPSETTINGS.log
echo ":[ ARP CACHE ]:" >> ~/opensource/logs/IPSETTINGS.log
arp -a -v | grep ".lan" | cut -d '(' -f2 | cut -d ')' -f1 >> ~/opensource/logs/IPSETTINGS.log
echo "" >> ~/opensource/logs/IPSETTINGS.log
# display results onscreen
cat ~/opensource/logs/IPSETTINGS.log | zenity --title "LOCAL IP SETTINGS" --text-info --width 270 --height 400 > /dev/null 2>&1
clear
sleep 1
sh_2menu
else
Colors;
echo ${RedF}[x]:[ABORTED]:[${YellowF} QUIT ${RedF}] ${Reset};
sleep 2
sh_2menu
fi
}
# ----------------------------------
# change my hostname
# ----------------------------------
sh_hostname () {
Colors;
inf=`cat /etc/hostname`
echo ${YellowF}' _'${Reset};
echo ${YellowF}' |' This module will change your current Hostname ${Reset};
echo ${YellowF}' |' FROM [${GreenF} $inf.lan ${YellowF}] TO [${GreenF} another.lan ${YellowF}] ${Reset};
echo ${YellowF}' |_'${RedF} LOGFILE:${white} opensource/logs/HostName.log ${Reset};
echo ""
# chose to run or to leave to main menu
read -p "[+]:{run|quit}(choise):" pass
if test "$pass" = "run"
then
Colors;
#append new hostname
new=$(zenity --title="INPUT NEW HOSTNAME" --text "example: haxor" --width 300 --entry) > /dev/null 2>&1
echo ${BlueF}[*]${RedF}:${BlueF}[ APPEND NEW HOSTNAME ]${RedF}'->'${GreenF}[ $new ]${Reset};
echo "$new" > /etc/hostname
# restarting network
echo ${BlueF}[*]${RedF}:${GreenF}[ RESTART NETWORK SERVICE ]${Reset};
service network-manager restart > /dev/null 2>&1
sleep 15
# display current hostname
iupd=`cat /etc/hostname`
echo ":[ CURRENT HOSTNAME ]:[ $iupd.lan ]" > ~/opensource/logs/HostName.log
echo ":[ OLD HOSTNAME ]:[ $inf.lan ]" >> ~/opensource/logs/HostName.log
cat ~/opensource/logs/HostName.log | zenity --title "CHANGE HOSTNAME" --text-info --width 450 --heigth 150 > /dev/null 2>&1
sh_2menu
else
Colors;
echo ${RedF}[x]:[ABORTED]:[${YellowF} QUIT ${RedF}] ${Reset};
sleep 2
clear
sh_2menu
fi
}
# ----------------------------------
# Search for live hosts in the local network
# ----------------------------------
sh_range () {
Colors;
echo ${YellowF}' _'${Reset};
echo ${YellowF}' |' This module scans Local lan For Live Hosts. ${Reset};
echo ${YellowF}' |_' using nmap flag -sn [no port discovery] ${Reset};
echo ""
# chose to run or to leave to main menu
read -p "[+]:{run|quit}(choise):" pass
if test "$pass" = "run"
then
# grab ip range
IP_RANGE=`ip route | grep "kernel" | awk {'print $1'}`
IP=`ifconfig $inter | egrep -w "inet" | cut -d ':' -f2 | cut -d 'B' -f1`
PORT=$(zenity --title="PORTS TO SEARCH" --text "example: 80,139,445 OR 1-1000" --width 300 --entry) > /dev/null 2>&1
echo ${BlueF}[*]${RedF}:${BlueF}[Please wait]${RedF}:${GreenF}[ RUNING SCAN ] ${Reset};
nmap -sn $IP_RANGE -p $PORT -oN $H0m3/opensource/logs/Locallan.log | zenity --progress --pulsate --title "SCANNING LOCAL NETWORK" --text="INTERFACE: $inter\nIP ADDRESS: $IP\nIP RANGE: $IP_RANGE" --percentage=0 --auto-close --width 300 > /dev/null 2>&1
cat $H0m3/opensource/logs/Locallan.log | zenity --title "LOCAL LAN SCAN" --text-info --width 480 --height 500 > /dev/null 2>&1
chown $usera $H0m3/opensource/logs/Locallan.log > /dev/null 2>&1
rm $H0m3/opensource/logs/rep.log > /dev/null 2>&1
sleep 1
sh_dsjy # store scans in database?
else
Colors;
echo ${RedF}[x]:[ABORTED]:[${YellowF} QUIT ${RedF}] ${Reset};
sleep 2
sh_2menu
fi
}
sh_dsjy () {
Colors;
# store scans in database?
dbt=$(zenity --list --title "T00LKIT DATABASE" --text "Store recent scan on t00lkit database?" --radiolist --column "Pick" --column "Option" TRUE "Append scan to DataBase" FALSE "Clear Database and Append scan" FALSE "Clear Database and manually input" --width 330 --height 220) > /dev/null 2>&1
if [ "$dbt" = "Append scan to DataBase" ]; then
dtr=`date`
fill=`cat $H0m3/opensource/logs/Locallan.log`
echo "" >> $H0m3/opensource/modules/database.db
echo "" >> $H0m3/opensource/modules/database.db
echo "|[ $dtr ]|" >> $H0m3/opensource/modules/database.db
echo "$fill" >> $H0m3/opensource/modules/database.db
zenity --info --title="T00LKIT DATABASE" --text "Scan Appended to DataBase" --width 300 > /dev/null 2>&1
chown $usera $H0m3/opensource/modules/database.db > /dev/null 2>&1
sh_2menu
elif [ "$dbt" = "Clear Database and Append scan" ]; then
dtr=`date`
fill=`cat $H0m3/opensource/logs/Locallan.log`
echo "" > $H0m3/opensource/modules/database.db
echo "|[ $dtr ]|" >> $H0m3/opensource/modules/database.db
echo "$fill" >> $H0m3/opensource/modules/database.db
zenity --info --title="T00LKIT DATABASE" --text "Database clean and\nnew scan Appended" --width 300 > /dev/null 2>&1
chown $usera $H0m3/opensource/modules/database.db > /dev/null 2>&1
sh_2menu
elif [ "$dbt" = "Clear Database and manually input" ]; then
dtr=`date`
mad=$(zenity --title="INPUT TARGET TO DATABASE" --text "You can input TARGET-IP, NOTES , ETC..." --entry --width 300) > /dev/null 2>&1
echo "" > $H0m3/opensource/modules/database.db
echo "|[ $dtr ]|" >> $H0m3/opensource/modules/database.db
echo "$mad" >> $H0m3/opensource/modules/database.db
zenity --info --title="T00LKIT DATABASE" --text "Database clean with\nnew Append" --width 300 > /dev/null 2>&1
chown $usera $H0m3/opensource/modules/database.db > /dev/null 2>&1
sh_2menu
else
Colors;
echo ${RedF}[x]:[ABORTED]:[${YellowF} QUIT ${RedF}] ${Reset};
sleep 2
sh_2menu
fi
}
# ----------------------------------
# Scan List of ip address targets
# ----------------------------------
sh_nlist () {
Colors;
echo ${YellowF}' _'${Reset};
echo ${YellowF}' |' This module scans a list of targets stored inside ${Reset};
echo ${YellowF}' |' [${GreenF} opensource/files/list.txt ] ${YellowF}just input the${Reset};
echo ${YellowF}' |' targets to scan one-per-line inside list.txt 'file'${Reset};
echo ${YellowF}' |_'${RedF} LOGFILE:${white} opensource/logs/ListReport.log ${Reset};
echo ""
# chose to run or to leave to main menu
read -p "[+]:{run|quit}(choise):" pass
if test "$pass" = "run"
then
Colors;
# scanning list of IP addresses
PORT=$(zenity --title="PORTS TO SEARCH" --text "example: 80,139,445 OR 1-1000" --width 300 --entry) > /dev/null 2>&1
echo ${BlueF}[*]${RedF}:${BlueF}[Please wait]${RedF}:${GreenF}[ RUNING SCAN ] ${Reset};
nmap -sS -Pn -O -iL $H0m3/opensource/files/list.txt -p $PORT --script vuln --open --reason -oN ~/opensource/logs/ListReport.log | zenity --progress --pulsate --title "SCANING LIST OF TARGETS" --text="INPUTFILE: list.txt\nLOGFILE: ListReport.log" --width 300 --percentage=0 --auto-close > /dev/null 2>&1
cat ~/opensource/logs/ListReport.log | zenity --title "LIST OF TARGETS REPORT" --text-info --width 700 --height 500 > /dev/null 2>&1
sleep 1
sh_2menu
else
Colors;
echo ${RedF}[x]:[ABORTED]:[${YellowF} QUIT ${RedF}] ${Reset};
sleep 2
sh_2menu
fi
}
# -----------------------------------
# Scan remote hosts for open ports and vulns
# -----------------------------------
sh_Smoke () {
Colors;
echo ${YellowF}' _'${Reset};
echo ${YellowF}' |' This module scans a target using Nmap script engine [nse]${Reset};
echo ${YellowF}' |' pre-defined --script vuln, We can scan open ports In 2 ways ${Reset};
echo ${YellowF}' |' [${GreenF} 80,135,445 ${YellowF}] OR [${GreenF} 1-1000 ${YellowF}] ${Reset};
echo ${YellowF}' |_'${RedF} LOGFILE:${white} opensource/logs/AGressive.log ${Reset};
echo ""
# chose to run or to leave to main menu
read -p "[+]:{run|quit}(choise):" pass
if test "$pass" = "run"
then
ipscan=$(zenity --title="TARGET IP ADDR" --text "example: 192.168.1.69" --width 300 --entry) > /dev/null 2>&1
PORT=$(zenity --title="PORTS TO SEARCH" --text "example: 80,139,445 OR 1-1000" --width 300 --entry) > /dev/null 2>&1
echo ${BlueF}[*]${RedF}:${BlueF}[Please wait]${RedF}:${GreenF}[ RUNING SCANS ] ${Reset};
echo "" > $H0m3/opensource/logs/Agressive.log
nmap -sS -O -p $PORT --open --reason --script vuln -oN $H0m3/opensource/logs/Agressive.log $ipscan | zenity --progress --pulsate --title "NMAP AGRESSIVE SCAN" --text="LOGFILE: AGressive.log\nTARGET: $ipscan PORT: $PORT" --percentage=0 --auto-close --width 300 > /dev/null 2>&1
cat $H0m3/opensource/logs/Agressive.log | zenity --title "AGRESSIVE SCAN REPORT" --text-info --width 700 --height 500 > /dev/null 2>&1
chown $usera $H0m3/opensource/logs/Agressive.log > /dev/null 2>&1
sleep 1
sh_flls
else
Colors;
echo ${RedF}[x]:[ABORTED]:[${YellowF} QUIT ${RedF}] ${Reset};
sleep 2
sh_2menu
fi
}
sh_flls () {
Colors;
# store scans in database?
dbt=$(zenity --list --title "T00LKIT DATABASE" --text "Store recent scan on t00lkit database?" --radiolist --column "Pick" --column "Option" TRUE "Append scan to DataBase" FALSE "Clear Database and Append scan" FALSE "Clear Database and manually input" --width 330 --height 230) > /dev/null 2>&1
if [ "$dbt" = "Append scan to DataBase" ]; then
dtr=`date`
fill=`cat $H0m3/opensource/logs/Agressive.log`
echo "" >> $H0m3/opensource/modules/database.db
echo "" >> $H0m3/opensource/modules/database.db
echo "|[ $dtr ]|" >> $H0m3/opensource/modules/database.db
echo "$fill" >> $H0m3/opensource/modules/database.db
zenity --info --title="T00LKIT DATABASE" --text "Scan Appended to DataBase" --width 300 > /dev/null 2>&1
chown $usera $H0m3/opensource/modules/database.db > /dev/null 2>&1
sh_2menu
elif [ "$dbt" = "Clear Database and Append scan" ]; then
dtr=`date`
fill=`cat $H0m3/opensource/logs/Agressive.log`
echo "" > $H0m3/opensource/modules/database.db
echo "|[ $dtr ]|" >> $H0m3/opensource/modules/database.db
echo "$fill" >> $H0m3/opensource/modules/database.db
zenity --info --title="T00LKIT DATABASE" --text "Database clean and\nnew scan Appended" --width 300 > /dev/null 2>&1
chown $usera $H0m3/opensource/modules/database.db > /dev/null 2>&1
sh_2menu
elif [ "$dbt" = "Clear Database and manually input" ]; then
dtr=`date`
mad=$(zenity --title="INPUT TARGET TO DATABASE" --text "You can input TARGET-IP, NOTES , ETC..." --entry --width 300) > /dev/null 2>&1
echo "" > $H0m3/opensource/modules/database.db
echo "|[ $dtr ]|" >> $H0m3/opensource/modules/database.db
echo "$mad" >> $H0m3/opensource/modules/database.db
zenity --info --title="T00LKIT DATABASE" --text "Database clean with\nnew Append" --width 300 > /dev/null 2>&1
chown $usera $H0m3/opensource/modules/database.db > /dev/null 2>&1
sh_2menu
else
Colors;
echo ${RedF}[x]:[ABORTED]:[${YellowF} QUIT ${RedF}] ${Reset};
sleep 2
sh_2menu
fi
}
# -----------------------------------
# Scan evading IDS
# -----------------------------------
sh_stealth () {
Colors;
echo ${YellowF}' _'${Reset};
echo ${YellowF}' |' This module scans a target evading IDS detection${Reset};
echo ${YellowF}' |' We can scan ports In 2 ways [${GreenF} 80,135,445 ${YellowF}] OR [${GreenF} 1-1000 ${YellowF}]${Reset};
echo ${YellowF}' |_'${RedF} LOGFILE:${white} opensource/logs/stealth.log ${Reset};
echo ""
# chose to run or to leave to main menu
read -p "[+]:{run|quit}(choise):" pass
if test "$pass" = "run"
then
ipscan=$(zenity --title="TARGET IP ADDR" --text "example: 192.168.1.69" --width 300 --entry) > /dev/null 2>&1
PORT=$(zenity --title="PORTS TO SEARCH" --text "example: 80,139,445 OR 1-1000" --width 300 --entry) > /dev/null 2>&1
echo ${BlueF}[*]${RedF}:${BlueF}[Please wait]${RedF}:${GreenF}[ RUNING SCANS ] ${Reset};
echo "" > $H0m3/opensource/logs/stealth.log
nmap -sT -Pn -p $PORT --open --reason -oN $H0m3/opensource/logs/stealth.log $ipscan | zenity --progress --pulsate --title "NMAP STEALTH SCAN (IDS)" --text="LOGFILE: stealth.log\nTARGET: $ipscan PORT: $PORT" --percentage=0 --auto-close --width 300 > /dev/null 2>&1
cat $H0m3/opensource/logs/stealth.log | zenity --title "STEALTH SCAN (IDS)" --text-info --width 700 --height 500 > /dev/null 2>&1
chown $usera $H0m3/opensource/logs/stealth.log > /dev/null 2>&1
sleep 1
sh_flls2
else
Colors;
echo ${RedF}[x]:[ABORTED]:[${YellowF} QUIT ${RedF}] ${Reset};
sleep 2
sh_2menu
fi
}
sh_flls2 () {
Colors;
# store scans in database?
dbt=$(zenity --list --title "T00LKIT DATABASE" --text "Store recent scan on t00lkit database?" --radiolist --column "Pick" --column "Option" TRUE "Append scan to DataBase" FALSE "Clear Database and Append scan" FALSE "Clear Database and manually input" --width 330 --height 220) > /dev/null 2>&1
if [ "$dbt" = "Append scan to DataBase" ]; then
dtr=`date`
fill=`cat $H0m3/opensource/logs/stealth.log`
echo "" >> $H0m3/opensource/modules/database.db
echo "" >> $H0m3/opensource/modules/database.db
echo "|[ $dtr ]|" >> $H0m3/opensource/modules/database.db
echo "$fill" >> $H0m3/opensource/modules/database.db
zenity --info --title="T00LKIT DATABASE" --text "Scan Appended to DataBase" --width 300 > /dev/null 2>&1
chown $usera $H0m3/opensource/modules/database.db > /dev/null 2>&1
sh_2menu
elif [ "$dbt" = "Clear Database and Append scan" ]; then
dtr=`date`
fill=`cat $H0m3/opensource/logs/stealth.log`
echo "" > $H0m3/opensource/modules/database.db
echo "|[ $dtr ]|" >> $H0m3/opensource/modules/database.db
echo "$fill" >> $H0m3/opensource/modules/database.db
zenity --info --title="T00LKIT DATABASE" --text "Database clean and\nnew scan Appended" --width 300 > /dev/null 2>&1
chown $usera $H0m3/opensource/modules/database.db > /dev/null 2>&1
sh_2menu
elif [ "$dbt" = "Clear Database and manually input" ]; then
dtr=`date`
mad=$(zenity --title="INPUT TARGET TO DATABASE" --text "You can input TARGET-IP, NOTES , ETC..." --entry --width 300) > /dev/null 2>&1
echo "" > $H0m3/opensource/modules/database.db
echo "|[ $dtr ]|" >> $H0m3/opensource/modules/database.db
echo "$mad" >> $H0m3/opensource/modules/database.db
zenity --info --title="T00LKIT DATABASE" --text "Database clean with\nnew Append" --width 300 > /dev/null 2>&1
chown $usera $H0m3/opensource/modules/database.db > /dev/null 2>&1
sh_2menu
else
Colors;
echo ${RedF}[x]:[ABORTED]:[${YellowF} QUIT ${RedF}] ${Reset};
sleep 2
sh_2menu
fi
}
# -----------------------------------
# find the geolocation of target machine
# -----------------------------------
sh_geo () {
Colors;
echo ${YellowF}' _'${Reset};
echo ${YellowF}' |' This module uses Nmap to scan a target in search${Reset};
echo ${YellowF}' |' of is geo-location and whois db records 'more info'${Reset};
echo ${YellowF}' |' about NSE scripts here:${GreenF}[ http://nmap.org/nsedoc/ ] ${Reset};
echo ${YellowF}' |_'${RedF} LOGFILE:${white} opensource/logs/geobytes.log ${Reset};
echo ""
# chose to run or to leave to main menu
read -p "[+]:{run|quit}(choise):" pass
if test "$pass" = "run"
then
Colors;
nmapco=$(zenity --title="DOMAIN OR IP ADDR" --text "example: www.pot.com\nexample: 192.168.1.68" --width 300 --entry) > /dev/null 2>&1
echo ${BlueF}[*]${RedF}:${BlueF}[Please wait]${RedF}:${GreenF}[ SCANNING GEO-LOCATION ] ${Reset};
nmap -sn --script ip-geolocation-geobytes.nse,whois $nmapco -oN ~/opensource/logs/geobytes.log | zenity --progress --pulsate --title "SCANNING GEO-LOCATION" --text="TARGET: $nmapco" --percentage=0 --auto-close --width 300 > /dev/null 2>&1
cat ~/opensource/logs/geobytes.log | zenity --title "TARGET GEO-LOCATION REPORT" --text-info --width 530 --height 300 > /dev/null 2>&1
sleep 1
sh_gcct
else
Colors;
echo ${RedF}[x]:[ABORTED]:[${YellowF} QUIT ${RedF}] ${Reset};
sleep 2
sh_2menu
fi
}
sh_gcct () {
Colors;
# store scans in database?
dbt=$(zenity --list --title "T00LKIT DATABASE" --text "Store recent scan on t00lkit database?" --radiolist --column "Pick" --column "Option" TRUE "Append scan to DataBase" FALSE "Clear Database and Append scan" FALSE "Clear Database and manually input" --width 330 --height 220) > /dev/null 2>&1
if [ "$dbt" = "Append scan to DataBase" ]; then
dtr=`date`
fill=`cat $H0m3/opensource/logs/geobytes.log`
echo "" >> $H0m3/opensource/modules/database.db
echo "" >> $H0m3/opensource/modules/database.db
echo "|[ $dtr ]|" >> $H0m3/opensource/modules/database.db
echo "$fill" >> $H0m3/opensource/modules/database.db
zenity --info --title="T00LKIT DATABASE" --text "Scan Appended to DataBase" --width 300 > /dev/null 2>&1
sh_2menu
elif [ "$dbt" = "Clear Database and Append scan" ]; then
dtr=`date`
fill=`cat $H0m3/opensource/logs/geobytes.log`
echo "" > $H0m3/opensource/modules/database.db
echo "|[ $dtr ]|" >> $H0m3/opensource/modules/database.db
echo "$fill" >> $H0m3/opensource/modules/database.db
zenity --info --title="T00LKIT DATABASE" --text "Database clean and\nnew scan Appended" --width 300 > /dev/null 2>&1
sh_2menu
elif [ "$dbt" = "Clear Database and manually input" ]; then
dtr=`date`
mad=$(zenity --title="INPUT TARGET TO DATABASE" --text "You can input TARGET-IP, NOTES , ETC..." --entry --width 300) > /dev/null 2>&1
echo "" > $H0m3/opensource/modules/database.db
echo "|[ $dtr ]|" >> $H0m3/opensource/modules/database.db
echo "$mad" >> $H0m3/opensource/modules/database.db
zenity --info --title="T00LKIT DATABASE" --text "Database clean with\nnew Append" --width 300 > /dev/null 2>&1
sh_2menu
else
Colors;
echo ${RedF}[x]:[ABORTED]:[${YellowF} QUIT ${RedF}] ${Reset};
sleep 2
sh_2menu
fi
}
# -----------------------------------
# ping-of-dead (D0S)
# -----------------------------------
sh_dead () {
Colors;
echo ${YellowF}' _'${Reset};
echo ${YellowF}' |' This module uses ICMP '(ping)' packets to D0S ${Reset};
echo ${YellowF}' |_' a target host on [${GreenF} WAN ${YellowF}] or [${GreenF} LAN ${YellowF}] networks ${Reset};
echo ""
echo ${BlueF}[+]:${white}[RUNNING ICMP D0S] ${Reset};
pingdead=$(zenity --title="DOMAIN OR IP ADDR" --text "example: www.pot.com\nexample: 192.94.34.100" --width 300 --entry) > /dev/null 2>&1
size=$(zenity --scale --title "ICMP Denial-Of-Service" --text "CHOSE ICMP PACKET SIZE" --min-value=1 --max-value=6000 --value=1 --step 1) > /dev/null 2>&1
howmany=$(zenity --scale --title "ICMP Denial-Of-Service" --text "HOW MANY PACKETS TO SEND" --min-value=10 --max-value=60000 --value=10 --step 1) > /dev/null 2>&1
echo ${BlueF}[*]${RedF}:${BlueF}[Please wait]:${white}Checking:${GreenF}[ $pingdead ] ${Reset};
# ping target to see if we is online
ping -c 1 $pingdead > /dev/null 2>&1