-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathPwnBox-Kali.sh
1590 lines (1277 loc) · 56.5 KB
/
PwnBox-Kali.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
#########################################################
# *** BlackSnufkin PwnBox-Kali *** #
# Version 3.2 #
# Autemated the process of installing and update #
# #
# New Kali-Linux VM #
# #
# #
# *** Updated: 30/12/21 *** #
#########################################################
exec 5> >(logger -t $0)
#exec 5> Debug.log
BASH_XTRACEFD="5"
PS4='$LINENO: '
set -x
export DEBIAN_FRONTEND=noninteractive
# status indicators
greenplus='\e[1;33m[++]\e[0m'
greenminus='\e[1;33m[--]\e[0m'
redminus='\e[1;31m[--]\e[0m'
redexclaim='\e[1;31m[!!]\e[0m'
redstar='\e[1;31m[**]\e[0m'
blinkexclaim='\e[1;31m[\e[5;31m!!\e[0m\e[1;31m]\e[0m'
fourblinkexclaim='\e[1;31m[\e[5;31m!!!!\e[0m\e[1;31m]\e[0m'
finduser=$(logname)
detected_env=""
Fix_SourceList(){
check_space=$(cat /etc/apt/sources.list | grep -c "# deb-src http://.*/kali kali-rolling.*")
check_nospace=$(cat /etc/apt/sources.list | grep -c "#deb-src http://.*/kali kali-rolling.*")
get_current_mirror=$(cat /etc/apt/sources.list | grep "deb-src http://.*/kali kali-rolling.*" | cut -d "/" -f3)
if [[ $check_space = 0 && $check_nospace = 0 ]]; then
echo -e "\n$greenminus # deb-src or #deb-sec not found - skipping"
elif [ $check_space = 1 ]; then
echo -e "\n$greenplus # deb-src with space found in sources.list uncommenting and enabling deb-src"
sed 's/\# deb-src http\:\/\/.*\/kali kali-rolling.*/\deb-src http\:\/\/'$get_current_mirror'\/kali kali-rolling main contrib non\-free''/' -i /etc/apt/sources.list
echo -e "\n$greenplus new /etc/apt/sources.list written with deb-src enabled"
elif [ $check_nospace = 1 ]; then
echo -e "\n$greenplus #deb-src without space found in sources.list uncommenting and enabling deb-src"
sed 's/\#deb-src http\:\/\/.*\/kali kali-rolling.*/\deb-src http\:\/\/'$get_current_mirror'\/kali kali-rolling main contrib non\-free''/' -i /etc/apt/sources.list
echo -e "\n$greenplus new /etc/apt/sources.list written with deb-src enabled"
fi
}
Install_pkg () {
REQUIRED_PKG="$1"
echo -e "\n$greenplus Checking PKG: $REQUIRED_PKG"
dpkg --status $REQUIRED_PKG &> /dev/null
if [ $? -eq 0 ]; then
echo -e "\n$greenplus PKG Status: Installed"
echo -e "\n$redstar Skiping..."
else
echo -e "\n$redexclaim PKG Status: Not Installed.\n$redstar Installing: $REQUIRED_PKG.\n"
if ! (apt-get install -y $REQUIRED_PKG) then
echo -e "\n$redexclaim Error while donwloading $REQUIRED_PKG, \n$redstar trying again in 30 seconds\n";sleep 30;apt-get install -y $REQUIRED_PKG
else
echo -e "\n$greenplus $REQUIRED_PKG Installed Successfully\n";
fi
sleep 1
fi
}
GetTool () {
if [ "$#" -eq 1 ]; then
name=$(echo $1 | awk -F '/' '{print $5}' | awk -F'.' '{print $1}')
echo -e "\n$greenplus Downloading: $name \n$greenplus Location: $PWD/$name \n"
if ! (git clone $1 ) then
echo -e "$redexclaim Error while donwloading $name, \n$redstar trying again in 30 seconds";sleep 30;git clone $1 $2
else
echo -e "\n$greenplus $name donwloaded successfully\n";
fi
else
name=$(echo $1 | awk -F '/' '{print $5}' | awk -F'.' '{print $1}')
echo -e "\n$greenplus Downloading: $name \n$greenplus Alternate Name: $2 \n$greenplus Location: $PWD/$2 \n"
if ! (git clone $1 $2) then
echo -e "$redexclaim Error while donwloading $name, \n$redstar trying again in 30 seconds";sleep 30;git clone $1 $2
else
echo -e "\n$greenplus $2 Donwloaded Successfully\n";
fi
fi
}
check_reboot () {
if [ -f /var/run/reboot-required ];then
echo -e "\n$blinkexclaim Reboot required \n$blinkexclaim Rebooting in 10 Seconds";sleep 10;reboot -f
else
echo -e "\n$greenplus No reboot required"
true
fi
}
Update () {
apt update && apt full-upgrade -y && apt autoremove -y
}
FixUpdate () {
apt update --fix-missing && apt full-upgrade -y && apt autoremove -y
}
Fix_hushlogin() {
echo -e "\n$greenplus Checking for .hushlogin"
if [ $finduser = "root" ]
then
if [ -f /root/.hushlogin ]
then
echo -e "\n$greenminus /$finduser/.hushlogin exists - skipping"
else
echo -e "\n$greenplus Creating file /$finduser/.hushlogin"
touch /$finduser/.hughlogin
fi
else
if [ -f /home/$finduser/.hushlogin ]
then
echo -e "\n$greenminus /home/$finduser/.hushlogin exists - skipping"
else
echo -e "\n$greenplus Creating file /home/$finduser/.hushlogin"
touch /home/$finduser/.hushlogin
fi
fi
}
disable_power_gnome() {
# CODE CONTRIBUTION : pswalia2u - https://github.com/pswalia2u
Fix_hushlogin
echo -e "\n$greenplus Gnome detected - Disabling Power Savings"
# ac power
sudo -i -u $finduser gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type nothing # Disables automatic suspend on charging)
echo -e "$greenplus org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type nothing"
sudo -i -u $finduser gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0 # Disables Inactive AC Timeout
echo -e " $greenplus org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0"
# battery power
sudo -i -u $finduser gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type nothing # Disables automatic suspend on battery)
echo -e "$greenplus org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type nothing"
sudo -i -u $finduser gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0 # Disables Inactive Battery Timeout
echo -e "$greenplus org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0"
# power button
sudo -i -u $finduser gsettings set org.gnome.settings-daemon.plugins.power power-button-action nothing # Power button does nothing
echo -e "$greenplus org.gnome.settings-daemon.plugins.power power-button-action nothing"
# idle brightness
sudo -i -u $finduser gsettings set org.gnome.settings-daemon.plugins.power idle-brightness 0 # Disables Idle Brightness
echo -e "$greenplus org.gnome.settings-daemon.plugins.power idle-brightness 0"
# screensaver activation
sudo -i -u $finduser gsettings set org.gnome.desktop.session idle-delay 0 # Disables Idle Activation of screensaver
echo -e "$greenplus org.gnome.desktop.session idle-delay 0"
# screensaver lock
sudo -i -u $finduser gsettings set org.gnome.desktop.screensaver lock-enabled false # Disables Locking
echo -e "$greenplus org.gnome.desktop.screensaver lock-enabled false\n"
}
# 06.18.2021 - disable_power_xfce rev 1.2.9 replaces fix_xfce_power fix_xfce_user and fix_xfce_root functions
disable_power_xfce() {
Fix_hushlogin
raw_xfce="https://raw.githubusercontent.com/Dewalt-arch/pimpmyi3-config/main/xfce4/xfce4-power-manager.xml"
if [ $finduser = "root" ]
then
echo -e "\n$greenplus XFCE Detected - disabling xfce power management \n"
eval wget -q --show-progress --progress=bar:force:noscroll $raw_xfce -O /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml
echo -e "\n$greenplus XFCE power management disabled for user: $finduser \n"
else
echo -e "\n$greenplus XFCE Detected - disabling xfce power management \n"
eval wget -q --show-progress --progress=bar:force:noscroll $raw_xfce -O /home/$finduser/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml
echo -e "\n$greenplus XFCE power management disabled for user: $finduser \n"
fi
}
disable_power_checkde() {
detect_xfce=$(ps -e | grep -c -E '^.* xfce4-session$')
detect_gnome=$(ps -e | grep -c -E '^.* gnome-session-*')
[ $detect_gnome -ne 0 ] && detected_env="GNOME"
[ $detect_xfce -ne 0 ] && detected_env="XFCE"
echo -e "\n$greenplus Detected Environment: $detected_env"
[ $detected_env = "GNOME" ] && disable_power_gnome
[ $detected_env = "XFCE" ] && disable_power_xfce
[ $detected_env = "" ] && echo -e"\n $redexclaim Unable to determine desktop environment"
}
Update_and_install () {
Fix_SourceList
Update
echo -e "\n$greenplus Starting to install dependencies"
pkgs=("dkms" "build-essential" "linux-headers-amd64" "gufw" "golang" "xrdp" "docker-compose" "lcab" "checkinstall" "autoconf" "automake" "python2-dev" "autotools-dev" "m4" "python3-venv" "gnome-terminal" "plank" "cargo" "docker.io" "tor" "torbrowser-launcher" "lolcat" "xautomation" "guake" "starkiller" "open-vm-tools" "open-vm-tools-desktop" "fuse3" "libssl-dev" "libxml2-dev" "libxslt1-dev" "libffi-dev" "python3-pip" "bettercap" "npm" "python3.9-dev" "libpcap-dev" "adb" "gcc-mingw-w64" "libc6-dev" "python3.9-venv" "python3-pyqt5" "libssl-dev" "figlet" "toilet" "powershell" "libpcap0.8" "mingw-w64-tools" "mingw-w64-common" "libffi-dev" "g++-mingw-w64" "upx-ucl" "seclists" "osslsigncode" "nim" "jq" "ruby-full" "libxml2" "ruby-dev" "libgmp-dev" "zlib1g-dev" "libssl-dev" "python-setuptools" "libldns-dev" "python3-dnspython" "rename" "xargs" "snapd" "tree")
for i in "${pkgs[@]}"; do Install_pkg "$i"; done
apt remove proxychains4 spiderfoot -y
# pimpmykali
cd $HOME
GetTool https://github.com/Dewalt-arch/pimpmykali.git
cd pimpmykali
./pimpmykali.sh --upgrade; \
./pimpmykali.sh --root; \
cd $HOME
rm -rf pimpmykali
FixUpdate && check_reboot
}
SpinUp_Workspace () {
echo -e "\n$greenplus Creating Workspace"
sleep 0.5
echo -e "$greenplus Creating Folder: /root/HTB"
mkdir /root/HTB
sleep 0.5
echo -e "$greenplus Creating Folder: /root/OpenVPN"
mkdir /root/OpenVPN
sleep 0.5
echo -e "$greenplus Creating Folder: /root/PT-Projects"
mkdir /root/PT-Projects/
sleep 0.5
echo -e "$greenplus Creating Folder: /root/PT-Projects/Obsidian_Vault"
mkdir /root/PT-Projects/Obsidian_Vault
sleep 0.5
echo -e "$greenplus Creating Folder: /opt/RedTeam-ToolKit"
mkdir /opt/RedTeam-ToolKit
sleep 0.5
# Recon
echo -e "$greenplus Creating Folder: /opt/RedTeam-ToolKit/Recon"
mkdir /opt/RedTeam-ToolKit/Recon
sleep 0.5
# C2
echo -e "$greenplus Creating Folder: /opt/RedTeam-ToolKit/C2"
mkdir /opt/RedTeam-ToolKit/C2
sleep 0.5
# Web
echo -e "$greenplus Creating Folder: /opt/RedTeam-ToolKit/Web"
mkdir /opt/RedTeam-ToolKit/Web
sleep 0.5
# Wifi
echo -e "$greenplus Creating Folder: /opt/RedTeam-ToolKit/Wifi"
mkdir /opt/RedTeam-ToolKit/Wifi
sleep 0.5
# Mobile
#echo -e "$greenplus Creating Folder: /opt/RedTeam-ToolKit/Mobile"
#mkdir /opt/RedTeam-ToolKit/Mobile
#sleep 0.5
# Network
echo -e "$greenplus Creating Folder: /opt/RedTeam-ToolKit/Network"
mkdir /opt/RedTeam-ToolKit/Network
sleep 0.5
# Tunneling
echo -e "$greenplus Creating Folder: /opt/RedTeam-ToolKit/Tunneling"
mkdir /opt/RedTeam-ToolKit/Tunneling
sleep 0.5
# Payload Development
echo -e "$greenplus Creating Folder: /opt/RedTeam-ToolKit/Payload_Dev"
mkdir /opt/RedTeam-ToolKit/Payload_Dev
sleep 0.5
# Initial_Access
echo -e "$greenplus Creating Folder: /opt/RedTeam-ToolKit/Initial_Access"
mkdir /opt/RedTeam-ToolKit/Initial_Access
sleep 0.5
echo -e "$greenplus Creating Folder: /opt/RedTeam-ToolKit/Initial_Access/Phishing"
mkdir /opt/RedTeam-ToolKit/Initial_Access/Phishing
sleep 0.5
echo -e "$greenplus Creating Folder: /opt/RedTeam-ToolKit/Initial_Access/BruteForce"
mkdir /opt/RedTeam-ToolKit/Initial_Access/BruteForce
sleep 0.5
# Active Directory
echo -e "$greenplus Creating Folder: /opt/RedTeam-ToolKit/Active-Directory"
mkdir /opt/RedTeam-ToolKit/Active_Directory
sleep 0.5
echo -e "$greenplus Creating Folder: /opt/RedTeam-ToolKit/Active-Directory/Enumeration"
mkdir /opt/RedTeam-ToolKit/Active_Directory/Enumeration
sleep 0.5
echo -e "$greenplus Creating Folder: /opt/RedTeam-ToolKit/Active-Directory/Credential_Dumping"
mkdir /opt/RedTeam-ToolKit/Active_Directory/Credential_Dumping
sleep 0.5
echo -e "$greenplus Creating Folder: /opt/RedTeam-ToolKit/Active-Directory/Offensive-Tools"
mkdir /opt/RedTeam-ToolKit/Active_Directory/Offensive-Tools
sleep 0.5
# General
echo -e "$greenplus Creating Folder: /opt/RedTeam-ToolKit/Resources"
mkdir /opt/RedTeam-ToolKit/Resources
sleep 0.5
cp ./Resources/.zshrc $HOME
cp ./Resources/.bashrc $HOME
mv ./Resources/replace.py /opt/RedTeam-ToolKit/Resources
chmod +x /opt/RedTeam-ToolKit/Resources/replace.py
ln -s /opt/RedTeam-ToolKit/Resources/replace.py /usr/bin/replace-line
echo -e "\n$greenplus Setting Wallpapers"
cp ./Wallpapers/wallpaper1.jpg /usr/share/backgrounds
cp -R ./Wallpapers/* /root/Pictures/
cp /root/Pictures/loginscreen.jpg /usr/share/desktop-base/kali-theme/login
mv /usr/share/desktop-base/kali-theme/login/background /usr/share/desktop-base/kali-theme/login/background.original
mv /usr/share/desktop-base/kali-theme/login/loginscreen.jpg /usr/share/desktop-base/kali-theme/login/background
xfconf-query --channel xfce4-desktop --property /backdrop/screen0/monitorVirtual1/workspace0/last-image --set /root/Pictures/wallpaper1.jpg
# Pwnbox
GetTool https://github.com/theGuildHall/pwnbox.git
mv pwnbox /opt/
rm /opt/pwnbox/banner
rm /opt/pwnbox/banner.sh
cp ./Resources/banner /opt/pwnbox/
cp ./Resources/banner.sh /opt/pwnbox/
cp ./Resources/net.sh /opt/pwnbox/
cp ./Resources/Microsoft.PowerShell_profile.ps1 $HOME/.config/powershell/Microsoft.PowerShell_profile.ps1
chmod +x /opt/pwnbox/banner.sh
chmod +x /opt/pwnbox/net.sh
cd /opt/pwnbox
cp /opt/pwnbox/htb.jpg /usr/share/backgrounds/
echo -e "\n$greenplus Setting HackTheBox theme"
cp -R /opt/pwnbox/Material-Black-Lime-Numix-FLAT/ /usr/share/icons/
cp -R /opt/pwnbox/htb /usr/share/icons/
mkdir /usr/share/themes/HackTheBox && cp /opt/pwnbox/index.theme /usr/share/themes/HackTheBox
xfconf-query -c xsettings -p /Net/IconThemeName -s Material-Black-Lime-Numix-FLAT
xfconf-query -c xfwm4 -p /general/show_dock_shadow -s false
}
Pycharm () {
finduser=$(logname)
echo -e "\n$greenplus Installing Pycharm"
cd $HOME/Downloads
wget -q --show-progress --progress=bar:force:noscroll https://download.jetbrains.com/python/pycharm-community-2021.2.2.tar.gz
tar xvzf $HOME/Downloads/pycharm-community*.tar.gz -C /tmp/ &> /dev/null
chown -R $finduser:$finduser /tmp/pycharm*
mv /tmp/pycharm-community* /opt/pycharm-community
ln -s /opt/pycharm-community/bin/pycharm.sh /usr/local/bin/pycharm
ln -s /opt/pycharm-community/bin/inspect.sh /usr/local/bin/inspect
rm -r pycharm-community-2021.2.2.tar.gz
echo -e "$greenplus Pycharm successfully installed"
}
SublimeText () {
echo -e "\n$greenplus Installing Sublime Text 3"
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | apt-key add -
apt-get install apt-transport-https
bash -c 'echo "deb https://download.sublimetext.com/ apt/stable/" | tee /etc/apt/sources.list.d/sublime-text.list'
apt-get update
apt-get install sublime-text
echo -e "$greenplus Sublime Text 3 successfully installed"
}
Obsdian () {
echo -e "\n$greenplus Installing Obsidian"
cd /tmp
set -euo pipefail
icon_url="https://cdn.discordapp.com/icons/686053708261228577/1361e62fed2fee55c7885103c864e2a8.png"
dl_url="https://github.com/obsidianmd/obsidian-releases/releases/download/v0.12.19/Obsidian-0.12.19.AppImage"
curl --location --output Obsidian.AppImage "$dl_url"
curl --location --output obsidian.png "$icon_url"
mkdir --parents /usr/share/obsidian
mv Obsidian.AppImage /usr/share/obsidian
chmod u+x /usr/share/obsidian/Obsidian.AppImage
mv obsidian.png /usr/share/obsidian
ln -s /usr/share/obsidian/obsidian.png /usr/share/pixmaps
echo "[Desktop Entry]
Type=Application
Name=Obsidian
Exec=/usr/share/obsidian/Obsidian.AppImage --no-sandbox
Icon=obsidian
Terminal=false" > /usr/share/applications/obsidian.desktop
update-desktop-database /usr/share/applications
echo -e "$greenplus Obsdian successfully installed"
}
Chrome () {
cd $HOME/Downloads
echo -e "\n$greenplus Installing Chrome"
wget -q --show-progress --progress=bar:force:noscroll https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i ./google-chrome*.deb &> /dev/null
apt-get install -f -y
rm google-chrome-stable_current_amd64.deb
replace-line 'deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main' 3 /etc/apt/sources.list.d/google-chrome.list
replace-line '# exec -a "$0" "$HERE/chrome" "$@" --user-data-dir --test-type --no-sandbox' 49 /opt/google/chrome/google-chrome
echo 'exec -a "$0" "$HERE/chrome" "$@" --no-sandbox' >> /opt/google/chrome/google-chrome
echo -e "$greenplus Chrome successfully installed"
}
Utils-Tools (){
echo -e "\n$greenplus Installing Utils-Tools"
Pycharm
SublimeText
Obsdian
Chrome
sleep 0.5
echo -e "\n$greenplus Utils-Tools successfully installed"
sleep 0.5
}
##################################################################
# RedTeam-ToolKit
##################################################################
Recon-Tools () {
# Rustscan
echo -e "\n$greenplus Downloading & Installing Recon Tools"
RECON_DIR=/opt/RedTeam-ToolKit/Recon
cd $RECON_DIR
GetTool https://github.com/RustScan/RustScan.git
cd RustScan
cargo build --release
echo 'command = ["-sC","-sV","-O","-Pn","-f","--mtu 24","-D RND:10","-g 53","-sS"]' >> ~/.rustscan.toml
echo 'batch_size = 65535' >> ~/.rustscan.toml
echo 'timeout = 3500' >> ~/.rustscan.toml
echo 'ulimit = 7000' >> ~/.rustscan.toml
echo -e "\n$greenplus RustScan successfully installed"
#SpiderFoot
echo -e "\n$greenplus Installing SpiderFoot"
cd $RECON_DIR
wget -q --show-progress --progress=bar:force:noscroll https://github.com/smicallef/spiderfoot/archive/v3.5.tar.gz
tar zxvf v3.5.tar.gz > /dev/null
rm -rf v3.5.tar.gz
mv spiderfoot-3.5 SpiderFoot
cd SpiderFoot
echo -e "$greenplus starting to install spiderfoot requirements "
pip3 install --no-cache-dir -r requirements.txt --quiet
echo -e "\n$greenplus spiderfoot successfully installed"
# witnessme
echo -e "\n$greenplus Intalling witnessme"
echo -e "$greenplus starting to install witnessme requirements "
pip3 install pipx --quiet
pipx ensurepath
pipx install witnessme
echo -e "\n$greenplus witnessme successfully installed"
# GoMapEnum
cd $RECON_DIR
GetTool https://github.com/nodauf/GoMapEnum.git
echo -e "\n$greenplus GoMapEnum successfully installed"
# pagodo
cd $RECON_DIR
GetTool https://github.com/opsdisk/pagodo.git
cd pagodo
echo -e "$greenplus starting to install pagodo requirements "
pip3 install --no-cache-dir -r requirements.txt --quiet
python3 ghdb_scraper.py -s -j -i
echo -e "\n$greenplus pagodo successfully installed"
# CrossLinked
cd $RECON_DIR
GetTool https://github.com/m8r0wn/crosslinked.git
cd crosslinked
echo -e "$greenplus starting to install crosslinked requirements "
pip3 install --no-cache-dir -r requirements.txt --quiet
echo -e "\n$greenplus crosslinked successfully installed"
# LinkedInt
cd $RECON_DIR
GetTool https://github.com/vysecurity/LinkedInt.git
cd LinkedInt
pip3 install --no-cache-dir -r requirements.txt --quiet
echo -e "\n$greenplus LinkedInt successfully installed"
# o365enum
cd $RECON_DIR
GetTool https://github.com/gremwell/o365enum.git
echo -e "\n$greenplus o365enum successfully installed"
#dnsrecon
cd $RECON_DIR
GetTool https://github.com/darkoperator/dnsrecon.git
echo -e "\n$greenplus dnsrecon successfully installed"
# Nmap Utils & NSE Scripts
echo -e "\n$greenplus Installing New Nmap NSE Scripts"
eval wget -q --show-progress --progress=bar:force:noscroll https://raw.githubusercontent.com/onomastus/pentest-tools/master/fixed-http-shellshock.nse -O /usr/share/nmap/scripts/http-shellshock.nse
echo -e "\n$greenplus /usr/share/nmap/script as updated"
echo -e "\n$greenplus New Nmap NSE Scripts successfully installed"
cd /usr/share/nmap/scripts
GetTool https://github.com/vulnersCom/nmap-vulners.git
cp nmap-vulners/*.nse /usr/share/nmap/scripts
cp nmap-vulners/http-vulners-regex.json /usr/share/nmap/nselib/data/
cp nmap-vulners/http-vulners-paths.txt /usr/share/nmap/nselib/data/
rm -rf nmap-vulners
echo -e "\n$greenplus nmap-vulners successfully installed"
cd $RECON_DIR
mkdir Nmap-Utils
cd Nmap-Utils
GetTool https://github.com/scipag/vulscan.git scipag_vulscan
mkdir /usr/share/nmap/scripts/vulscan
ln -s $PWD/scipag_vulscan /usr/share/nmap/scripts/vulscan
echo -e "\n$greenplus Downloading cve.csv"
wget -q --show-progress --progress=bar:force:noscroll https://www.computec.ch/projekte/vulscan/download/cve.csv -O /usr/share/nmap/scripts/vulscan/cve.csv
echo -e "\n$greenplus Downloading exploitdb.csv"
wget -q --show-progress --progress=bar:force:noscroll https://www.computec.ch/projekte/vulscan/download/exploitdb.csv -O /usr/share/nmap/scripts/vulscan/exploitdb.csv
echo -e "\n$greenplus Downloading openvas.csv"
wget -q --show-progress --progress=bar:force:noscroll https://www.computec.ch/projekte/vulscan/download/openvas.csv -O /usr/share/nmap/scripts/vulscan/openvas.csv
echo -e "\n$greenplus Downloading osvdb.csv"
wget -q --show-progress --progress=bar:force:noscroll https://www.computec.ch/projekte/vulscan/download/osvdb.csv -O /usr/share/nmap/scripts/vulscan/osvdb.csv
echo -e "\n$greenplus Downloading scipvuldb.csv"
wget -q --show-progress --progress=bar:force:noscroll https://www.computec.ch/projekte/vulscan/download/scipvuldb.csv -O /usr/share/nmap/scripts/vulscan/scipvuldb.csv
echo -e "\n$greenplus Downloading securityfocus.csv"
wget -q --show-progress --progress=bar:force:noscroll https://www.computec.ch/projekte/vulscan/download/securityfocus.csv -O /usr/share/nmap/scripts/vulscan/securityfocus.csv
echo -e "\n$greenplus Downloading securitytracker.csv"
wget -q --show-progress --progress=bar:force:noscroll https://www.computec.ch/projekte/vulscan/download/securitytracker.csv -O /usr/share/nmap/scripts/vulscan/securitytracker.csv
echo -e "\n$greenplus Downloading xforce.csv"
wget -q --show-progress --progress=bar:force:noscroll https://www.computec.ch/projekte/vulscan/download/xforce.csv -O /usr/share/nmap/scripts/vulscan/xforce.csv
echo -e "\n$greenplus vulscan successfully installed"
# NSE
cd $RECON_DIR/Nmap-Utils
GetTool https://github.com/s4n7h0/NSE.git
cd NSE
cp *.nse /usr/share/nmap/scripts
# NSE-scripts
cd $RECON_DIR/Nmap-Utils
GetTool https://github.com/psc4re/NSE-scripts.git
cd NSE-scripts
cp *.nse /usr/share/nmap/scripts
cd $RECON_DIR/Nmap-Utils
rm /usr/share/nmap/scripts/ssl-enum-ciphers.nse
rm -rf /opt/RedTeam-ToolKit/Recon/Nmap-Utils/NSE-scripts
rm -rf /opt/RedTeam-ToolKit/Recon/Nmap-Utils/NSE
nmap --script-updatedb
echo -e "\n$greenplus Nmap NSE-scripts successfully installed"
# ultimate-nmap-parser
cd $RECON_DIR/Nmap-Utils
GetTool https://github.com/Shifty0g/ultimate-nmap-parser/
cd ultimate-nmap-parser/
chmod +x ultimate-nmap-parser.sh
echo -e "\n$greenplus ultimate-nmap-parser successfully installed"
sleep 0.5
echo -e "\n\n\n\n$greenplus Recon Tools successfully installed"
echo -e "\n\n"
tree -d $RECON_DIR -L 1
sleep 1
echo -e "\n\n\n\n"
}
C2-Tools (){
echo -e "\n$greenplus Downloading & Installing Command & Control Tools"
C2_DIR=/opt/RedTeam-ToolKit/C2
# Evil-winrm
cd $C2_DIR
GetTool https://github.com/Hackplayers/evil-winrm.git
gem install rubyntlm winrm winrm-fs stringio logger fileutils
echo -e "\n$greenplus Evil-winrm successfully installed"
# dnscat
cd $C2_DIR
GetTool https://github.com/iagox86/dnscat2.git
cd dnscat2/server/
bundle install
echo -e "\n$greenplus dnscat2 successfully installed"
# Pwncat
cd $C2_DIR
echo -e "\n$greenplus Installing Pwncat"
python3 -m venv /opt/RedTeam-ToolKit/C2/pwncat
/opt/RedTeam-ToolKit/C2/pwncat/bin/pip install git+https://github.com/calebstewart/pwncat
ln -s /opt/RedTeam-ToolKit/C2/pwncat/bin/pwncat /usr/local/bin
echo -e "\n$greenplus Pwncat successfully installed"
# DeathStar-Empire
cd $C2_DIR
echo -e "\n$greenplus Installing DeathStar-Empire"
echo -e "$greenplus starting to install DeathStar-Empire requirements "
pip3 install poetry --quiet
GetTool https://github.com/byt3bl33d3r/DeathStar
cd DeathStar
poetry install
echo -e "\n$greenplus DeathStar-Empire successfully installed"
sleep 0.5
echo -e "\n\n\n\n$greenplus Command & Control Tools successfully installed"
echo -e "\n\n"
tree -d $C2_DIR -L 1
sleep 1
echo -e "\n\n\n\n"
}
Web-Tools (){
# Web Tools
echo -e "\n$greenplus Downloading & Installing Web-Tools"
WEB_DIR=/opt/RedTeam-ToolKit/Web
# Duplicut
cd /opt/RedTeam-ToolKit/Resources
GetTool https://github.com/nil0x42/duplicut.git
cd duplicut/ && make &> /dev/null
cp duplicut /usr/bin
echo -e "\n$greenplus duplicut successfully installed"
# OneListForAll
cd $WEB_DIR
GetTool https://github.com/six2dez/OneListForAll.git
cd OneListForAll
./olfa.sh
echo -e "\n$greenplus OneListForAll successfully installed"
# reconftw
cd $WEB_DIR
GetTool https://github.com/six2dez/reconftw.git
cd reconftw
mkdir ReconFTW-Tools
replace-line 'tools=/opt/RedTeam-ToolKit/Web/reconftw/ReconFTW-Tools' 6 reconftw.cfg
replace-line 'export GOROOT=/usr/lib/go' 15 reconftw.cfg
#replace-line 'export GOPATH=$HOME/go' 16 reconftw.cfg
#replace-line 'export PATH=$GOPATH/bin:$GOROOT/bin:$HOME/.local/bin:$PATH' 17 reconftw.cfg
#sed -i -e '15,17s/^/# /' reconftw.cfg
pip3 install -r requirements.txt --quiet
./install.sh
echo -e "\n$greenplus ReconFTW successfully installed"
# nuclei-templates
cd $WEB_DIR
mkdir /opt/RedTeam-ToolKit/Web/Nuclei-Util
# Nuclei-Templates
echo -e "\n$greenplus Donwloading Nuclei-Templates"
cd $WEB_DIR/Nuclei-Util/
(GetTool https://github.com/ARPSyndicate/kenzer-templates.git)
(GetTool https://github.com/panch0r3d/nuclei-templates.git Nuclei-Templates1)
(GetTool https://github.com/medbsq/ncl.git)
(GetTool https://github.com/notnotnotveg/nuclei-custom-templates.git)
(GetTool https://github.com/foulenzer/foulenzer-templates.git)
(GetTool https://github.com/clarkvoss/Nuclei-Templates.git Nuclei-Templates2)
(GetTool https://github.com/z3bd/nuclei-templates.git Nuclei-Templates3)
echo -e "\n$greenplus Nuclei-Templates successfully installed"
# 4-ZERO-3
cd $WEB_DIR
GetTool https://github.com/Dheerajmadhukar/4-ZERO-3.git
echo -e "\n$greenplus 4-ZERO-3 successfully installed"
sleep 0.5
echo -e "\n\n\n\n$greenplus Web-Tools successfully installed"
echo -e "\n\n"
tree -d $WEB_DIR -L 1
sleep 1
echo -e "\n\n\n\n"
hash -r
}
Wifi-Tools (){
#Wifi Tools
echo -e "\n$greenplus Downloading & Installing Wifi-Tools"
WIFI_DIR=/opt/RedTeam-ToolKit/Wifi
# OWT
cd $WIFI_DIR
GetTool https://github.com/clu3bot/OWT.git
echo -e "\n$greenplus OWT successfully installed"
# airgeddon
cd $WIFI_DIR
echo -e "\n$greenplus Installing airgeddon"
if ! (git clone --depth 1 https://github.com/v1s1t0r1sh3r3/airgeddon.git) then
echo -e "$redexclaim Error while donwloading, trying again in 30 seconds";sleep 30;git clone --depth 1 https://github.com/v1s1t0r1sh3r3/airgeddon.git
else
echo -e "\n$greenplus airgeddon successfully installed"
fi
# websploit
cd $WIFI_DIR
GetTool https://github.com/websploit/websploit.git
cd websploit
python3 setup.py install &> /dev/null
echo -e "\n$greenplus websploit successfully installed"
# Wifipumpkin3
cd $WIFI_DIR
GetTool https://github.com/P0cL4bs/wifipumpkin3.git
cd wifipumpkin3
python3 -c "from PyQt5.QtCore import QSettings; print('PyQt5 for wifipumpkin3 ')"
python3 setup.py install &> /dev/null
echo -e "\n$greenplus wifipumpkin3 successfully installed"
sleep 0.5
echo -e "\n\n\n\n$greenplus Wifi-Tools successfully installed"
echo -e "\n\n"
tree -d $WIFI_DIR -L 1
sleep 1
echo -e "\n\n\n\n"
}
Mobile-Tools (){
# Mobile-Tools
echo -e "\n$greenplus Downloading & Installing Mobile-Tools"
MOBILE_DIR=/opt/RedTeam-ToolKit/Mobile
# MobSF
cd $MOBILE_DIR
GetTool https://github.com/MobSF/Mobile-Security-Framework-MobSF.git
cd Mobile-Security-Framework-MobSF
docker build -t mobsf .
echo 'docker run -it --rm -p 8000:8000 mobsf' >> /usr/bin/mobsf-start
chmod +x /usr/bin/mobsf-start
echo -e "\n$greenplus Mobile-Security-Framework-MobSF successfully installed"
# Phonesploit
cd $MOBILE_DIR
GetTool https://github.com/aerosol-can/PhoneSploit.git
cd PhoneSploit
echo -e "$greenplus starting to install Phonesploit requirements "
pip3 install colorama --quiet
echo -e "\n$greenplus Phonesploit successfully installed"
# SSL pining
cd $MOBILE_DIR
GetTool https://github.com/moxie0/AndroidPinning.git
echo -e "\n$greenplus AndroidPinning successfully installed"
sleep 0.5
echo -e "\n\n\n\n$greenplus Mobile-Tools successfully installed"
echo -e "\n\n"
tree -d $MOBILE_DIR -L 1
sleep 1
echo -e "\n\n\n\n"
}
Network-Tools () {
# Networking Tools
echo -e "\n$greenplus Downloading & Installing Network-Tools"
NETWORK_DIR=/opt/RedTeam-ToolKit/Network
# PCredz
cd $NETWORK_DIR
GetTool https://github.com/lgandx/PCredz.git
echo -e "\n$greenplus PCredz successfully installed"
# mitm6
cd $NETWORK_DIR
echo -e "$greenplus starting to install mitm6 requirements "
pip3 install Cython --quiet && pip3 install python-libpcap --quiet
GetTool https://github.com/fox-it/mitm6.git
echo -e "\n$greenplus mitm6 successfully installed"
# Nmap Visulize Network
cd $NETWORK_DIR
GetTool https://github.com/tedsluis/nmap.git Nmap_Network-visualization
cd Nmap_Network-visualization
wget -q --show-progress -progress=bar:force:noscroll https://gojs.net/latest/release/go.js
echo -e "\n$greenplus Nmap_Network-visualization successfully installed"
# BruteSharkCli
cd $NETWORK_DIR
mkdir BruteShark
cd BruteShark
echo -e "\n$greenplus Downloading BruteSharkCli\n"
wget -q --show-progress -progress=bar:force:noscroll https://github.com/odedshimon/BruteShark/releases/latest/download/BruteSharkCli -O BruteSharkCli
chmod +x BruteSharkCli
echo -e "\n$greenplus BruteSharkCli successfully installed"
sleep 0.5
echo -e "\n\n\n\n$greenplus Network-Tools successfully installed"
echo -e "\n\n"
tree -d $NETWORK_DIR -L 1
sleep 1
echo -e "\n\n\n\n"
}
Tunneling-Tools (){
echo -e "\n$greenplus Downloading & Installing Tunneling-Tools"
TUNNLING_DIR=/opt/RedTeam-ToolKit/Tunneling
# Proxychains
cd $TUNNLING_DIR
echo -e "\n$greenplus Installing proxychains-ng "
GetTool https://github.com/rofl0r/proxychains-ng.git
cd proxychains-ng
./configure --prefix=/usr --sysconfdir=/etc
make &> /dev/null
make install-config &> /dev/null
ln -s $PWD/proxychains4 /usr/bin/proxychains
replace-line "socks5 127.0.0.1 1080" 159 /etc/proxychains.conf
echo "# sock4 127.0.0.1 9050" >> /etc/proxychains.conf
echo -e "\n$greenplus proxychains-ng successfully installed"
# Chisel
cd $TUNNLING_DIR
echo -e "\n$greenplus Installing Chisel"
mkdir Chisel
cd $TUNNLING_DIR/Chisel
wget -q --show-progress --progress=bar:force:noscroll https://github.com/jpillora/chisel/releases/download/v1.7.7/chisel_1.7.7_windows_amd64.gz -O chisel_Windows.gz
gunzip chisel_Windows.gz &> /dev/null
mv chisel_Windows chisel.exe
wget -q --show-progress --progress=bar:force:noscroll https://github.com/jpillora/chisel/releases/download/v1.7.6/chisel_1.7.7_linux_amd64.gz -O chisel.gz
gunzip chisel.gz &> /dev/null
echo -e "\n$greenplus chisel successfully installed"
# PingTunnel
cd $TUNNLING_DIR
echo -e "\n$greenplus Installing pingtunnel"
mkdir pingtunnel && cd pingtunnel
wget -q --show-progress --progress=bar:force:noscroll https://github.com/esrrhs/pingtunnel/releases/download/2.6/pingtunnel_windows_amd64.zip -O pingtunnel_windows.zip
unzip pingtunnel_windows.zip &> /dev/null
wget -q --show-progress --progress=bar:force:noscroll https://github.com/esrrhs/pingtunnel/releases/download/2.6/pingtunnel_linux_amd64.zip -O pingtunnel_linux.zip
unzip pingtunnel_linux.zip &> /dev/null
rm pingtunnel_linux.zip
rm pingtunnel_windows.zip
echo -e "\n$greenplus pingtunnel successfully installed"
# Ptunnel-ng
cd $TUNNLING_DIR
GetTool https://github.com/lnslbrty/ptunnel-ng.git
cd ptunnel-ng
wget -q --show-progress --progress=bar:force:noscroll https://github.com/lnslbrty/ptunnel-ng/releases/download/v1.42/ptunnel-ng-x64.exe -O ptunnel-ng.exe
./autogen.sh &> /dev/null
echo -e "\n$greenplus ptunnel-ng successfully installed"
sleep 0.5
echo -e "\n\n\n\n$greenplus Tunneling-Tools successfully installed"
echo -e "\n\n"
tree -d $TUNNLING_DIR -L 1
sleep 1
echo -e "\n\n\n\n"
}
Payloads-Tools (){
echo -e "\n$greenplus Downloading & Installing Payloads-Development Tools"
PAYLOAD_DEV_DIR=/opt/RedTeam-ToolKit/Payload_Dev
# Invoke-Stealth
cd $PAYLOAD_DEV_DIR
GetTool https://github.com/JoelGMSec/Invoke-Stealth.git
echo -e "\n$greenplus Invoke-Stealth successfully installed"
# PEozer
cd $PAYLOAD_DEV_DIR
GetTool https://github.com/phra/PEzor.git
cd PEzor
replace-line '(grep -q _prefix_PEzor_ ~/.zshrc || echo "export PATH=\$PATH:~/go/bin/:$INSTALL_DIR:$INSTALL_DIR/deps/donut/:$INSTALL_DIR/deps/wclang/_prefix_PEzor_/bin/") >> ~/.zshrc &&' 52 install.sh
./install.sh
source $HOME/.zshrc
./PEzor.sh -h
echo -e "\n$greenplus PEzor successfully installed"
# darkarmour
cd $PAYLOAD_DEV_DIR
GetTool https://github.com/bats3c/darkarmour.git
echo -e "\n$greenplus darkarmour successfully installed"
# ScareCrow
cd $PAYLOAD_DEV_DIR
GetTool https://github.com/optiv/ScareCrow.git
cd ScareCrow
go get github.com/fatih/color
go get github.com/yeka/zip
go get github.com/josephspurrier/goversioninfo
apt install openssl osslsigncode mingw-w64 -y
go build ScareCrow.go
echo -e "\n$greenplus ScareCrow successfully installed"
# donloader
cd $PAYLOAD_DEV_DIR
GetTool https://github.com/blinkenl1ghts/donloader.git
cd donloader
go install mvdan.cc/garble@latest
GO111MODULE=off go get -u golang.org/x/sys/...
GOOS=windows GO111MODULE=on go get -u github.com/C-Sto/BananaPhone
GOOS=windows GO111MODULE=on go get -u github.com/Binject/debug
GOOS=windows GO111MODULE=off go get -u github.com/C-Sto/BananaPhone
GOOS=windows GO111MODULE=off go get -u github.com/Binject/debug
GO111MODULE=off go get -u github.com/awgh/rawreader
go build -o "bin/donloader" .
echo -e "\n$greenplus donloader successfully installed"
# Chimera
cd $PAYLOAD_DEV_DIR
GetTool https://github.com/tokyoneon/Chimera.git
echo -e "\n$greenplus Chimera successfully installed"
# Phantom-Evasion
cd $PAYLOAD_DEV_DIR
GetTool https://github.com/oddcod3/Phantom-Evasion.git
cd Phantom-Evasion
chmod +x phantom-evasion.py
python3 phantom-evasion.py --setup
echo -e "\n$greenplus Phantom-Evasion successfully installed"
# NimHollow
cd $PAYLOAD_DEV_DIR
echo -e "\n$greenplus Installing NimHollow"
git clone --recurse-submodules https://github.com/snovvcrash/NimHollow && cd NimHollow
git submodule update --init --recursive
nimble install winim nimcrypto
pip3 install -r requirements.txt --quiet
echo -e "\n$greenplus NimHollow successfully installed"
# Shhhloader
cd $PAYLOAD_DEV_DIR
echo -e "\n$greenplus Installing Shhhloader"
GetTool https://github.com/icyguider/Shhhloader
echo -e "\n$greenplus Shhhloader successfully installed"
# Nimcrypt2
cd $PAYLOAD_DEV_DIR
echo -e "\n$greenplus Installing Nimcrypt2"
GetTool https://github.com/icyguider/Nimcrypt2.git
nimble install docopt ptr_math strenc
cd Nimcrypt2
nim c -d=release --cc:gcc --embedsrc=on --hints=on --app=console --cpu=amd64 --out=nimcrypt nimcrypt.nim
echo -e "\n$greenplus Nimcrypt2 successfully installed"
sleep 0.5