forked from waldo-irc/kali-setup-script
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kali-setup.sh
341 lines (322 loc) · 11.1 KB
/
kali-setup.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
#!/bin/bash
#Waldo's Kali Linux Setup Script!
#Here we set up our options and arguments
for arg; do
case $arg in
-h) echo "[*] Waldo Kali Linux Deluxe Setup Script!"
echo "[*] Made special for my buddy Kawaxi to quickly setup his Kali Machine!!" #lazy bastard!
echo "[*] Usage: $0 (-e)"
echo "options:"
echo "-h, --help show brief help"
echo "-e Express install - Bypasses all prompts and just installs the damn thing" #because if you're a typical Mexican you're extra lazy!
exit 0;;
-e) echo "[*] Express Run!" ;;
-*) echo "[*] Waldo Kali Linux Deluxe Setup Script!"
echo "[*] Made special for my buddy Kawaxi to quickly setup his Kali Machine!!"
echo "[*] Usage: $0 (-e)"
echo "options:"
echo "-h, --help show brief help"
echo "-e Express install - Bypasses all prompts and just installs the damn thing"
exit 0;;
*) dir=$arg ;; #This line is required to pass the target when given. Gives anything given as an argument without a slash and passes it through to be used for the program.
esac
done
echo "[*] Waldo Kali Linux Deluxe Setup Script!"
echo "[*] Made special for my buddy Kawaxi to quickly setup his Kali Machine!!" #lazy bastard!
echo "[*] Usage: $0 (-e)"
echo "[*] Hit CTRL+C at anyime to exit the script"
echo "[*] Hold on to your horses! I hear they have plenty in Mexico"
#update
echo "[*] Updating System! (I reccomend this boy, not doing this == MISTAKE)"
if [ "$1" == "-e" ] ; then
CONDITION=Y
else
read -p "Continue and install? Y/n: " CONDITION;
fi
if [ -z "$CONDITION" ] || [ "$CONDITION" == Y ] || [ "$CONDITION" == y ]; then
sudo apt-get update && sudo apt-get upgrade -y
echo "[*] If rest of script gives issues reboot machine before continuing."
fi
wait
#change lock
echo "[*] Setting up lock screen"
if [ "$1" == "-e" ] ; then
CONDITION=Y
else
read -p "Continue and install? Y/n: " CONDITION;
fi
if [ -z "$CONDITION" ] || [ "$CONDITION" == Y ] || [ "$CONDITION" == y ]; then
read -p "[*] Change sleep time. Enter 0 to never sleep: " sett;
settings set org.gnome.desktop.session idle-delay "$sett"
echo "[*] Disabling Lock Screen"
gsettings set org.gnome.desktop.screensaver lock-enabled false
fi
wait
#intall terminator
echo "[*] Installing Terminator"
if [ "$1" == "-e" ] ; then
CONDITION=Y
else
read -p "Continue and install? Y/n: " CONDITION;
fi
if [ -z "$CONDITION" ] || [ "$CONDITION" == Y ] || [ "$CONDITION" == y ]; then
sudo apt-get install terminator -y
fi
wait
#setup tmux
echo "[*] Setting up TMUX"
if [ "$1" == "-e" ] ; then
CONDITION=Y
else
read -p "Continue and install? Y/n: " CONDITION;
fi
if [ -z "$CONDITION" ] || [ "$CONDITION" == Y ] || [ "$CONDITION" == y ]; then
git clone https://github.com/barthyala/tmux-conf.git
tmux=$(echo $HOME)
mv tmux-conf/.tmux.conf $tmux
echo "[*] Cleaning up"
rm -R tmux-conf
fi
wait
#install irssi
echo "[*] Installing irssi client"
if [ "$1" == "-e" ] ; then
CONDITION=Y
else
read -p "Continue and install? Y/n: " CONDITION;
fi
if [ -z "$CONDITION" ] || [ "$CONDITION" == Y ] || [ "$CONDITION" == y ]; then
apt-get install irssi -y
fi
wait
#install hexchat
echo "[*] Installing HexChat"
if [ "$1" == "-e" ] ; then
CONDITION=Y
else
read -p "Continue and install? Y/n: " CONDITION;
fi
if [ -z "$CONDITION" ] || [ "$CONDITION" == Y ] || [ "$CONDITION" == y ]; then
sudo apt-get intall hexchat -y
fi
wait
#install Proxychains4
echo "[*] Installing ProxyChains4 client"
if [ "$1" == "-e" ] ; then
CONDITION=Y
else
read -p "Continue and install? Y/n: " CONDITION;
fi
if [ -z "$CONDITION" ] || [ "$CONDITION" == Y ] || [ "$CONDITION" == y ]; then
git clone https://github.com/rofl0r/proxychains-ng.git
cd proxychains-ng
echo "[*] Running Config"
./configure --prefix=/usr --sysconfdir=/etc
echo "[*] Running Make"
make
wait
echo "[*] Running Make Install"
make install
wait
echo "[*] Running Make Install-Config"
make install-config
wait
cd ../
echo "[*] Moving executable to /usr/bin filepath"
mv proxychains-ng/proxychains4 /usr/bin
echo "[*] Cleaning up"
rm -R proxychains-ng
fi
wait
#setup apache
echo "[*] Setting up apache server and grabbing LinEnum"
if [ "$1" == "-e" ] ; then
CONDITION=Y
else
read -p "Continue and install? Y/n: " CONDITION;
fi
if [ -z "$CONDITION" ] || [ "$CONDITION" == Y ] || [ "$CONDITION" == y ]; then
echo "[*] Starting apache2 webserver"
service apache2 start
echo "[*] Setting apache to run on start"
update-rc.d apache2 enable
git clone https://github.com/rebootuser/LinEnum.git
echo "[*] Moving LinEnum.sh to webserver"
mv LinEnum/LinEnum.sh /var/www/html
rm -R LinEnum
fi
wait
#install vsftpd
echo "[*] Setting up and installing VSFTPD"
if [ "$1" == "-e" ] ; then
CONDITION=Y
else
read -p "Continue and install? Y/n: " CONDITION;
fi
if [ -z "$CONDITION" ] || [ "$CONDITION" == Y ] || [ "$CONDITION" == y ]; then
sudo apt-get install vsftpd -y
wait
echo "[*] Enabling VSFTPD to run at start"
update-rc.d vsftpd start
echo "[*] Create a new FTP User"
read -p "[*] Username?: " newuser;
useradd $newuser
echo "[*] Create a new password for $newuser"
passwd $newuser
mkdir /home/$newuser
chown -R $newuser:$newuser /home/$newuser
echo "[*] Creating /var/FTP"
mkdir /var/ftp
echo "[*] Binding newuser home directory to /var/ftp/$newuser"
mkdir /var/ftp/$newuser
mount --bind /home/$newuser/ /var/ftp/$newuser/
echo "[*] Setting home as /var/ftp/$newuser for user $newuser"
sudo usermod -d /var/ftp/$newuser/ $newuser
echo "[*] Getting VSFTPD Conf"
git clone https://github.com/barthyala/vsftpd-conf.git
mv vsftpd-conf/vsftpd.conf /etc/vsftpd.conf
wait
echo "[*] Cleaning up"
rm -R vsftpd-conf
fi
wait
#configure TFTP
echo "[*] Setting up and installing TFTP on port 69"
if [ "$1" == "-e" ] ; then
CONDITION=Y
else
read -p "Continue and install? Y/n: " CONDITION;
fi
if [ -z "$CONDITION" ] || [ "$CONDITION" == Y ] || [ "$CONDITION" == y ]; then
echo "[*] Configuring TFTP to run at start"
update-rc.d atftpd start
echo "[*] Creating tftp directory in /tftpboot. Store files to transfer here"
mkdir /tftpboot
echo "[*] Transferring TFTP config"
git clone https://github.com/barthyala/tftp-conf.git
mv tftp-conf/atftpd /etc/default/
wait
echo "[*] Cleaning up"
rm -R tftp-conf
fi
wait
#install Waldo Scripts
echo "[*] Installing wenum and wsmb (You gotta tell me how you like this shit! You better hit that goddamn Y)"
if [ "$1" == "-e" ] ; then
CONDITION=Y
else
read -p "Continue and install? Y/n: " CONDITION;
fi
if [ -z "$CONDITION" ] || [ "$CONDITION" == Y ] || [ "$CONDITION" == y ]; then
git clone https://github.com/barthyala/Waldo-Enumeration.git
echo "[*] Moving to /usr/bin/"
mv Waldo-Enumeration/wenum /usr/bin/
echo "[*] Cleaning Up"
rm -R Waldo-Enumeration
echo "[*] Finishing up"
chmod +x /usr/bin/wenum
wait
git clone https://github.com/barthyala/SMBScan.git
echo "[*] Moving to /usr/bin/"
mv SMBScan/wsmb /usr/bin/
echo "[*] Cleaning Up"
rm -R SMBScan
echo "[*] Finishing Up"
chmod +x /usr/bin/wsmb
wait
fi
wait
#install dropbox
echo "[*] Installing Dropbox"
if [ "$1" == "-e" ] ; then
CONDITION=Y
else
read -p "Continue and install? Y/n: " CONDITION;
fi
if [ -z "$CONDITION" ] || [ "$CONDITION" == Y ] || [ "$CONDITION" == y ]; then
echo "[*] Downloading and installing"
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf -
rm ~/.dropbox-dist/VERSION
mv ~/.dropbox-dist/* /usr/bin
wait
echo "[*] Cleaning Up"
rm -R ~/.dropbox-dist/
echo "[*] Installed! Run with dropboxd"
fi
wait
#install keyboard
echo "[*] Installing Keyboard Settings"
if [ "$1" == "-e" ] ; then
CONDITION=Y
else
read -p "Continue and install? Y/n: " CONDITION;
fi
if [ -z "$CONDITION" ] || [ "$CONDITION" == Y ] || [ "$CONDITION" == y ]; then
echo "[*] Setting Up Keyboard"
sudo apt-get install x11-xkb-utils -y
read -p "[*] Choose a keyboard layout. en is english, es is spanish: " lang;
setxkbmap $lang
echo "[*] Writing to BashRC for Persistence"
echo "setxkbmap $lang" >> ~/.bashrc
fi
wait
#adding bookmark entries
echo "[*] Setting up Bookmarks"
if [ "$1" == "-e" ] ; then
CONDITION=Y
else
read -p "Continue and install? Y/n: " CONDITION;
fi
if [ -z "$CONDITION" ] || [ "$CONDITION" == Y ] || [ "$CONDITION" == y ]; then
read -p "!!!Enter the path of each directory you would like bookmarked - EX:/usr/share and a name for the bookmark (Hit Enter to Continue)";
echo "[*] 5 Entries max, more can be manually entered. (FTP, TFTP, HTML, and Root Dir / done by default."
mkdir ~/.config/gtk-3.0
echo file:/// / > ~/.config/gtk-3.0/bookmarks
echo file:///var/www/html html >> ~/.config/gtk-3.0/bookmarks
echo file:///tftpboot tftp >> ~/.config/gtk-3.0/bookmarks
read -p "[*] Enter the FTP user you created to create the FTP bookmark: " ftpuser;
echo file:///var/ftp/"$ftpuser" ftpd >> ~/.config/gtk-3.0/bookmarks
for a in $(seq 1 5); do
read -p "[*] Enter additional entries now EX:/usr/bin. enter 'exit' when done: " loc;
if [ "$loc" == "exit" ]; then
break
else
read -p "[*] Enter a name for this bookmark entry EX: bin: " name;
echo file://"$loc" "$name" >> ~/.config/gtk-3.0/bookmarks
fi
done
fi
wait
#install firefox extensions
echo "[*] Installing TamperData, EditCookies, and FoxyProxy"
echo "[*] Firefox will open to install each app, accept prompt and close (not restart) firefox to continue script."
if [ "$1" == "-e" ] ; then
CONDITION=Y
else
read -p "Continue and install? Y/n: " CONDITION;
fi
if [ -z "$CONDITION" ] || [ "$CONDITION" == Y ] || [ "$CONDITION" == y ]; then
echo "[*] Creating Temporary Directory"
mkdir ~/extensions
cd ~/extensions
echo "[*] Installing Tamper Data"
wget https://addons.mozilla.org/firefox/downloads/latest/tamper-data/addon-966-latest.xpi
firefox addon-966-latest.xpi
wait
read -p "[*] Hit Enter to Continue";
echo "[*] Installing FoxyProxy"
wget https://addons.mozilla.org/firefox/downloads/file/400263/foxyproxy_standard-4.5.6-fx+sm+tb.xpi
firefox foxyproxy_standard-4.5.6-fx+sm+tb.xpi
wait
read -p "[*] Hit Enter to Continue";
echo "[*] Installing Edit Cookies"
wget https://addons.mozilla.org/firefox/downloads/latest/cookies-manager-plus/addon-92079-latest.xpi
firefox addon-92079-latest.xpi
wait
read -p "[*] Hit Enter to Continue";
echo "[*] Cleaning up"
rm -R ~/extensions
wait
fi
wait
echo "[!!!!] Setup Completed! Please reboot Kali to finish changes"