forked from leebaird/discover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate.sh
executable file
·316 lines (280 loc) · 8.78 KB
/
update.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
#!/bin/bash
# Global variables
BLUE='\033[1;34m'
YELLOW='\033[1;33m'
NC='\033[0m'
###############################################################################################################################
clear
echo
if [ -d /pentest ]; then
echo -e "${BLUE}Updating Discover.${NC}"
git pull
echo
echo
exit
fi
echo -e "${BLUE}Updating Kali.${NC}"
apt update ; apt -y upgrade ; apt -y dist-upgrade ; apt -y autoremove ; apt -y autoclean
echo
if [ -d /opt/BloodHound-v3/.git ]; then
echo -e "${BLUE}Updating BloodHound.${NC}"
cd /opt/BloodHound-v3/ ; git pull
echo
else
echo -e "${YELLOW}Installing BloodHound.${NC}"
git clone https://github.com/BloodHoundAD/BloodHound.git /opt/BloodHound-v3
apt -y install npm
cd /opt/BloodHound-v3/
npm install
npm run linuxbuild
echo
fi
if [ -d /opt/Cobalt-Strike-profiles/.git ]; then
echo -e "${BLUE}Updating Cobalt Strike profiles.${NC}"
cd /opt/Cobalt-Strike-profiles/ ; git pull
echo
else
echo -e "${YELLOW}Installing Cobalt Strike profiles.${NC}"
git clone https://github.com/rsmudge/Malleable-C2-Profiles.git /opt/Cobalt-Strike-profiles
echo
fi
if [ -d /opt/CrackMapExec/.git ]; then
echo -e "${BLUE}Updating CrackMapExec.${NC}"
cd /opt/CrackMapExec/ ; git pull
/usr/bin/python3 -m pip install -r requirements.txt | grep -v 'already'
echo
else
echo -e "${YELLOW}Installing CrackMapExec.${NC}"
git clone --recursive https://github.com/byt3bl33d3r/CrackMapExec.git /opt/CrackMapExec
cd /opt/CrackMapExec
/usr/bin/python3 -m pip install -r requirements.txt | grep -v 'already'
python setup.py install
ln -s /usr/local/bin/cme /opt/CrackMapExec/crackmapexec
echo
fi
if [ -d /opt/discover/.git ]; then
echo -e "${BLUE}Updating Discover.${NC}"
cd /opt/discover ; git pull
echo
fi
if [ -d /opt/Domain-Hunter/.git ]; then
echo -e "${BLUE}Updating Domain Hunter.${NC}"
cd /opt/Domain-Hunter/ ; git pull
/usr/bin/python3 -m pip install -r requirements.txt | grep -v 'already'
echo
else
echo -e "${YELLOW}Installing Domain Hunter.${NC}"
git clone https://github.com/threatexpress/domainhunter.git /opt/Domain-Hunter
cd /opt/Domain-Hunter/
/usr/bin/python3 -m pip install -r requirements.txt | grep -v 'already'
chmod 755 domainhunter.py
echo
fi
if [ -d /opt/DomainPasswordSpray/.git ]; then
echo -e "${BLUE}Updating DomainPasswordSpray.${NC}"
cd /opt/DomainPasswordSpray/ ; git pull
echo
else
echo -e "${YELLOW}Installing DomainPasswordSpray.${NC}"
git clone https://github.com/dafthack/DomainPasswordSpray.git /opt/DomainPasswordSpray
echo
fi
if [ -d /opt/droopescan/.git ]; then
echo -e "${BLUE}Updating droopescan.${NC}"
cd /opt/droopescan/ ; git pull
/usr/bin/python3 -m pip install -r requirements.txt | grep -v 'already'
echo
else
echo -e "${YELLOW}Installing droopescan.${NC}"
git clone https://github.com/droope/droopescan.git /opt/droopescan
cd /opt/droopescan
pip install -r requirements.txt
echo
fi
if [ -d /opt/Donut/.git ]; then
echo -e "${BLUE}Updating Donut.${NC}"
cd /opt/Donut/ ; git pull
echo
else
echo -e "${YELLOW}Installing Donut.${NC}"
git clone https://github.com/TheWover/donut.git /opt/Donut
echo
fi
if [ -d /opt/Egress-Assess/.git ]; then
echo -e "${BLUE}Updating Egress-Assess.${NC}"
cd /opt/Egress-Assess/ ; git pull
echo
else
echo -e "${YELLOW}Installing Egress-Assess.${NC}"
git clone https://github.com/ChrisTruncer/Egress-Assess.git /opt/Egress-Assess
/opt/Egress-Assess/setup/setup.sh
mv server.pem ../Egress-Assess/
rm impacket*
echo
fi
if [ -d /opt/Empire/.git ]; then
echo -e "${BLUE}Updating Empire.${NC}"
cd /opt/Empire/ ; git pull
echo
else
echo -e "${YELLOW}Installing Empire.${NC}"
git clone https://github.com/PowerShellEmpire/Empire.git /opt/Empire
/opt/Empire/setup/install.sh
echo
fi
if [ -d /opt/EyeWitness/.git ]; then
echo -e "${BLUE}Updating EyeWitness.${NC}"
cd /opt/EyeWitness/ ; git pull
echo
else
echo -e "${YELLOW}Installing EyeWitness.${NC}"
git clone https://github.com/ChrisTruncer/EyeWitness.git /opt/EyeWitness
/opt/EyeWitness/setup/setup.sh
echo
fi
if [ ! -f /usr/bin/xmllint ]; then
echo -e "${YELLOW}Installing libxml2-utils.${NC}"
apt-get install -y libxml2-utils
echo
fi
echo -e "${BLUE}Updating Nmap scripts.${NC}"
nmap --script-updatedb | egrep -v '(Starting|seconds)' | sed 's/NSE: //'
echo
if [ -d /opt/PowerSploit/docs ]; then
echo -e "${BLUE}Updating PowerSploit.${NC}"
cd /opt/PowerSploit/ ; git pull
echo
else
echo -e "${YELLOW}Installing PowerSploit.${NC}"
git clone -b dev https://github.com/PowerShellMafia/PowerSploit/ /opt/PowerSploit
echo
fi
if [ -d /opt/PowerUpSQL/.git ]; then
echo -e "${BLUE}Updating PowerUpSQL.${NC}"
cd /opt/PowerUpSQL/ ; git pull
echo
else
echo -e "${YELLOW}Installing PowerUpSQL.${NC}"
git clone https://github.com/NetSPI/PowerUpSQL.git /opt/PowerUpSQL
echo
fi
if [ -d /opt/prowl/.git ]; then
echo -e "${BLUE}Updating Prowl.${NC}"
cd /opt/prowl/ ; git pull
echo
else
echo -e "${YELLOW}Installing Prowl.${NC}"
git clone https://github.com/Pickfordmatt/Prowl /opt/prowl
chmod 755 /opt/prowl/prowl.py
apt-get install python-pip python-lxml
pip install dnspython Beautifulsoup4 Gitpython
echo
fi
if [ -d /opt/PS-Attack/.git ]; then
echo -e "${BLUE}Updating PS>Attack.${NC}"
cd /opt/PS-Attack/ ; git pull
echo
else
echo -e "${YELLOW}Installing PS>Attack.${NC}"
git clone https://github.com/jaredhaight/PSAttack.git /opt/PS-Attack
echo
fi
if [ -d /opt/rawr/.git ]; then
echo -e "${BLUE}Updating RAWR.${NC}"
cd /opt/rawr/ ; git pull
echo
else
echo -e "${YELLOW}Installing RAWR.${NC}"
git clone https://bitbucket.org/al14s/rawr.git /opt/rawr
/opt/rawr/install.sh y
fi
if [ -d /opt/SecLists/.git ]; then
echo -e "${BLUE}Updating SecLists.${NC}"
cd /opt/SecLists/ ; git pull
echo
else
echo -e "${YELLOW}Installing SecLists.${NC}"
git clone https://github.com/danielmiessler/SecLists /opt/SecLists
echo
fi
if [ -d /opt/SharpShooter/.git ]; then
echo -e "${BLUE}Updating SharpShooter.${NC}"
cd /opt/SharpShooter/ ; git pull
echo
else
echo -e "${YELLOW}Installing SharpShooter.${NC}"
git clone https://github.com/mdsecactivebreach/SharpShooter.git /opt/SharpShooter
cd /opt/SharpShooter/
pip install -r requirements.txt
echo
fi
if [ -d /opt/theHarvester/.git ]; then
echo -e "${BLUE}Updating theHarvester.${NC}"
cd /opt/theHarvester/ ; git pull
/usr/bin/python3 -m pip install -r requirements.txt | grep -v 'already'
echo
else
echo -e "${YELLOW}Installing theHarvester.${NC}"
git clone https://github.com/laramies/theHarvester.git /opt/theHarvester
cd /opt/theHarvester
/usr/bin/python3 -m pip install -r requirements.txt | grep -v 'already'
echo
fi
if [ ! -e /usr/lib/python3/dist-packages/texttable.py ]; then
echo -e "${YELLOW}Installing Texttable.${NC}"
apt install -y python3-texttable
echo
fi
if [ -d /opt/unicorn/.git ]; then
echo -e "${BLUE}Updating unicorn.${NC}"
cd /opt/unicorn/ ; git pull
echo
else
echo -e "${YELLOW}Installing unicorn.${NC}"
git clone https://github.com/trustedsec/unicorn.git /opt/unicorn
echo
fi
if [ -d /opt/Veil/.git ]; then
echo -e "${BLUE}Updating Veil.${NC}"
cd /opt/Veil/ ; git pull
echo
else
echo -e "${YELLOW}Installing Veil.${NC}"
git clone https://github.com/Veil-Framework/Veil /opt/Veil
./opt/Veil/config/setup.sh --force --silent
echo
fi
if [ -d /opt/Windows-Exploit-Suggester/.git ]; then
echo -e "${BLUE}Updating Windows-Exploit-Suggester.${NC}"
cd /opt/Windows-Exploit-Suggester/ ; git pull
rm *.xls 2>/dev/null
./windows-exploit-suggester.py --update
echo
else
echo -e "${YELLOW}Installing Windows-Exploit-Suggester.${NC}"
git clone https://github.com/AonCyberLabs/Windows-Exploit-Suggester /opt/Windows-Exploit-Suggester
cd /opt/Windows-Exploit-Suggester/
pip install xlrd --upgrade
./windows-exploit-suggester.py --update
echo
fi
if [ ! -f /usr/bin/xdotool ]; then
echo -e "${YELLOW}Installing xdotool.${NC}"
apt-get install -y xdotool
echo
fi
if [ ! -f /usr/bin/xlsx2csv ]; then
echo -e "${YELLOW}Installing xlsx2csv.${NC}"
apt-get install -y xlsx2csv
echo
fi
if [ ! -f /usr/bin/xml_grep ]; then
echo -e "${YELLOW}Installing xml_grep.${NC}"
apt-get install -y xml-twig-tools
echo
fi
echo -e "${BLUE}Updating locate database.${NC}"
updatedb
echo
echo
exit