-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup-kali.sh
executable file
·169 lines (130 loc) · 6.73 KB
/
setup-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
#!/bin/bash
set -eo pipefail
IFS=$'\n\t'
##### (Cosmetic) Colour output
RED="\033[01;31m" # Issues/Errors
GREEN="\033[01;32m" # Success
YELLOW="\033[01;33m" # Warnings/Information
BLUE="\033[01;34m" # Heading
RESET="\033[00m" # Normal
echo -e "${YELLOW}[${RED}!${YELLOW}] If you haven't, change your root password immediately!${RESET}"
echo -e "${YELLOW}[*] Sleeping 10 seconds to allow for you to stop this and go do it now!${RESET}"
sleep 10
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Updating base image${RESET}"
apt-get update
apt-get -y full-upgrade
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Installing extended kali toolset${RESET}"
apt-get install -y kali-linux-all
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Linking new target${RESET}"
ln -sn /opt/pentest-utils/new-target.sh /usr/bin/new-target
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Linking .gdbinit${RESET}"
ln -sn /opt/pentest-utils/.gdbinit ~/.gdbinit
for stager in dirb nmap unicornscan gobuster; do
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Linking staged ${stager} script${RESET}"
ln -sn "/opt/pentest-utils/staged-scanners/${stager}-staged.sh" "/usr/bin/${stager}-staged"
done
for enumerator in cups ftp http smb; do
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Linking ${enumerator} enumeration script${RESET}"
ln -sn "/opt/pentest-utils/enumerators/${enumerator}-enumerator.sh" "/usr/bin/${enumerator}-enumerator"
done
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Linking pattern create, pattern offset, and payload_lengths into /usr/bin${RESET}"
ln -sn /usr/share/metasploit-framework/tools/pattern_create.rb /usr/bin/pattern_create
ln -sn /usr/share/metasploit-framework/tools/pattern_offset.rb /usr/bin/pattern_offset
ln -sn /usr/share/metasploit-framework/tools/modules/payload_lengths.rb /usr/bin/payload_lengths
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Cloning gotree${RESET}"
cd /opt || exit 1
git clone https://github.com/kkirsche/gotree.git
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Cloning Linux Exploit Suggester${RESET}"
cd /opt || exit 1
git clone https://github.com/PenturaLabs/Linux_Exploit_Suggester
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Cloning LinEnum${RESET}"
cd /opt || exit 1
git clone https://github.com/rebootuser/LinEnum.git
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Cloning linuxprivchecker${RESET}"
cd /opt || exit 1
git clone https://github.com/sleventyeleven/linuxprivchecker.git
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Cloning Windows Exploit Suggester${RESET}"
cd /opt || exit 1
git clone https://github.com/GDSSecurity/Windows-Exploit-Suggester.git
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Cloning Powershell Empire${RESET}"
cd /opt || exit 1
git clone 'https://github.com/EmpireProject/Empire'
cd Empire || exit 1
./setup/install.sh
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Cloning WindowsEnum${RESET}"
git clone https://github.com/absolomb/WindowsEnum.git
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Cloning PowerSploit${RESET}"
git clone https://github.com/PowerShellMafia/PowerSploit.git
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Downloading various windows binaries${RESET}"
mkdir /opt/windows-extras
cd /opt/windows-extras || exit 1
wget http://www.tightvnc.com/download/1.3.10/tightvnc-1.3.10_x86.zip
wget https://download.sysinternals.com/files/PSTools.zip
wget https://download.sysinternals.com/files/AccessChk.zip
wget https://the.earth.li/~sgtatham/putty/latest/w32/putty.zip
wget https://the.earth.li/~sgtatham/putty/latest/w32/putty.zip.gpg
wget https://download.sysinternals.com/files/Procdump.zip
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Installing IP / SIP calculators${RESET}"
apt -y -qq install ipcalc sipcalc
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Installing ASCII Cinema CLI recorder${RESET}"
apt -y -qq install asciinema
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Installing PSMisc${RESET}"
apt -y -qq install psmisc
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Installing pipe viewer${RESET}"
apt -y -qq install pv
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Installing NCFTP${RESET}"
apt -y -qq install ncftp
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Installing FreeRDP2${RESET}"
apt -y -qq install freerdp2-x11
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Installing ZIP utilities${RESET}"
apt -y -qq install zip unzip
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Installing Terminator${RESET}"
apt -y -qq install terminator
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Install various VPN support${RESET}"
for FILE in network-manager-openvpn network-manager-pptp network-manager-vpnc network-manager-iodine; do
apt -y -qq install "${FILE}"
done
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Installing bridge-utils${RESET}"
apt -y -qq install bridge-utils
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Installing http-tunnel${RESET}"
apt -y -qq install http-tunnel
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Installing shellcheck${RESET}"
# https://github.com/koalaman/shellcheck
apt -y -qq install shellcheck
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Install MingW cross compiler${RESET}"
for FILE in mingw-w64 binutils-mingw-w64 gcc-mingw-w64 cmake mingw-w64-x86-64-dev mingw-w64-i686-dev mingw-w64-tools gcc-mingw-w64-i686 gcc-mingw-w64-x86-64 mingw32; do
apt -y -qq install "${FILE}" 2>/dev/null
done
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Installing cowsay${RESET}"
apt -y -qq install cowsay
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Installing sublime text 3${RESET}"
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
apt -y -qq install apt-transport-https
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
apt-get update
apt -y -qq install sublime-text
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Removing unnecessary packages${RESET}"
apt -y autoremove
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Updating searchsploit DB${RESET}"
searchsploit -u
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Updating slocate DB${RESET}"
updatedb
echo -ne "${YELLOW}[?] Would you like to install open-vm tools (previously vmware-tools)? [Y/N] ${RESET}"
read -r -p "" response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]
then
echo -e "${YELLOW}[${GREEN}+${YELLOW}] ${BLUE}Installing open-vm-tools${RESET}"
apt -y -qq install open-vm-tools-desktop fuse
else
echo -e "${BLUE}[*] Not installing open-vm-tools${RESET}"
fi
echo -ne "${YELLOW}[?] Kali Setup is complete. Would you like to reboot now? [Y/N] ${RESET}"
read -r -p "" response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]
then
echo -e "${YELLOW}[${RED}*${YELLOW}] Rebooting system in 3 seconds. Thank you for using Kali Setup."
sleep 3
reboot
else
echo -e "${YELLOW}[*] Thank you for using Kali Setup."
fi