Skip to content

Commit 5dff26a

Browse files
committed
VPSToolsh
1 parent 379bf10 commit 5dff26a

File tree

1 file changed

+313
-0
lines changed

1 file changed

+313
-0
lines changed

VPSBugBountyToolsSetup.sh

+313
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,313 @@
1+
#!/bin/bash
2+
3+
#
4+
# Execute as wget -O - gist_url | bash
5+
#
6+
# Couldn't add gist url as, it changes after every update i.e. as soon as I save this, it's url will change :p
7+
#
8+
# It's debian based, so for centos and likewise you have to change apt to yum and similarly
9+
#
10+
InstallationStartTime=$(date +%s)
11+
#### COLORS #### ( Taken from : https://misc.flogisoft.com/bash/tip_colors_and_formatting )
12+
NORMAL='\e[0m'
13+
RED='\e[31m'
14+
LIGHT_GREEN='\e[92m'
15+
LIGHT_YELLOW='\e[93m'
16+
BLINK='\e[5m'
17+
BOLD='\e[1m'
18+
UNDERLINE='\e[4m'
19+
###############
20+
apt-add-repository -y ppa:rael-gc/rvm
21+
apt update -yq # && apt upgrade -y # Do it manually, cause there are some whiptail menus that aren't automated yet and
22+
# thus cause problems
23+
24+
apt-get install -yq python unzip curl git gcc make libpcap-dev python3 python-pip python3-pip clang nmap pzip-full python3.6-dev
25+
pip install rdpy==1.3.2
26+
timedatectl set-timezone Asia/Kolkata
27+
echo -e "\n${LIGHT_YELLOW}Delete older go binary ${NORMAL}\n"
28+
original_go=`which go`
29+
rm $original_go
30+
echo -e "\n${LIGHT_YELLOW}Download go from golang website to install v1.10.3, as subfinder requires v1.10+ ${NORMAL}\n"
31+
wget https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz
32+
tar -C /usr/local -xzf go1.10.3.linux-amd64.tar.gz
33+
echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.profile
34+
rm go1.10.3.linux-amd64.tar.gz
35+
echo -e "\n${LIGHT_YELLOW}Reload .bashrc and .profile ${NORMAL}\n"
36+
source $HOME/.profile
37+
source $HOME/.bashrc
38+
39+
mkdir tools && cd tools
40+
echo -e "\n${LIGHT_YELLOW}Present Working Directory : "$PWD${NORMAL}
41+
42+
# git clone https://github.com/FortyNorthSecurity/EyeWitness.git && echo -e "\n${LIGHT_YELLOW}Running setup/setup.sh ${NORMAL}\n"
43+
# Not using master repo cause, it has wrong options for extracting bzip2 archive type
44+
# Also changed the download source to google drive so as to fasten the downloading process
45+
# git clone https://github.com/LuD1161/EyeWitness.git && echo -e "\n${LIGHT_YELLOW}Running setup/setup.sh ${NORMAL}\n"
46+
# cd EyeWitness/setup
47+
# sh setup.sh
48+
# cd ..
49+
# Only download new phantomJS if the original EyeWitness failed
50+
# Use the following commented code if using FortyNorthSecurity's repo, as the extracted phantomJS is wrong
51+
52+
# curl -L -o phantomjs-2.1.1-linux-x86_64.tar.bz2 "https://drive.google.com/uc?export=download&id=1xc14FtJ0M10PQp5Em1XsmcraOFDXHV_G" -O phantomjs-2.1.1-linux-x86_64.tar.bz2
53+
# tar jxf phantomjs-2.1.1-linux-x86_64.tar.bz2
54+
# cp phantomjs-2.1.1-linux-x86_64/bin/phantomjs bin
55+
# rm -rf phantomjs-2.1.1-linux-x86_64
56+
# rm phantomjs-2.1.1-linux-x86_64.tar.bz2
57+
58+
# curl -L -o geckodriver-v0.13.0-linux32.tar.gz "https://drive.google.com/uc?export=download&id=1oQ-e8vcCLo7LZJJkJ5RsibUThQd9vndE" -O geckodriver-v0.13.0-linux32.tar.gz
59+
# tar jxf geckodriver-v0.13.0-linux32.tar.gz
60+
# cp geckodriver-v0.13.0-linux32/bin/phantomjs bin
61+
# rm geckodriver-v0.13.0-linux32.tar.gz
62+
# rm -rf geckodriver-v0.13.0-linux32
63+
64+
65+
cd ~/tools
66+
git clone https://github.com/jordanpotti/CloudScraper.git && echo -e "\n${LIGHT_YELLOW}Installing CloudScraper's requirements.txt ${NORMAL}\n"
67+
pip install -r CloudScraper/requirements.txt
68+
69+
go get github.com/subfinder/subfinder
70+
if [ $? -eq 0 ]; then
71+
mv ~/go/bin/subfinder /usr/bin/
72+
echo -e "\n${LIGHT_YELLOW} Installed subfinder ${NORMAL}\n"
73+
rm -rf subfinder
74+
else
75+
echo -e "\n${LIGHT_YELLOW}Try reinstalling subfinder manually ${NORMAL}\n"
76+
echo -e "\n${LIGHT_YELLOW}RUN : go get github.com/subfinder/subfinder ${NORMAL}\n"
77+
fi
78+
79+
cd ~/tools
80+
git clone https://github.com/blechschmidt/massdns.git && echo -e "\n${LIGHT_YELLOW}Making and copying massdns to /usr/bin/ ${NORMAL}\n"
81+
cd massdns
82+
make
83+
if [ $? -eq 0 ]; then
84+
mv /root/tools/massdns/bin/massdns /usr/bin/ && cd - # go back to main directory
85+
mkdir /root/tools/massdns_lists
86+
mv /root/tools/massdns/lists/* /root/tools/massdns_lists/massdns_lists/
87+
rm -rf massdns
88+
echo -e "\n${LIGHT_YELLOW}Installed massdns ${NORMAL}\n"
89+
else
90+
echo -e "\n${LIGHT_YELLOW}Try reinstalling massdns manually ${NORMAL}\n"
91+
echo -e "\n${LIGHT_YELLOW}RUN : git clone https://github.com/blechschmidt/massdns.git ${NORMAL}\n"
92+
echo -e "\n${LIGHT_YELLOW}And then cd into the directory and issue make command ${NORMAL}\n"
93+
fi
94+
95+
echo -e "\n${LIGHT_YELLOW}Proceeding with installation of masscan ${NORMAL}\n"
96+
git clone https://github.com/robertdavidgraham/masscan.git && echo -e "\n${LIGHT_YELLOW}Making masscan ${NORMAL}\n"
97+
cd masscan
98+
make -j
99+
if [ $? -eq 0 ]; then
100+
mv ./bin/masscan /usr/bin/ && cd - # go back to main directory
101+
rm -rf masscan && echo -e "\n${LIGHT_YELLOW}Deleted masscan github local clone ${NORMAL}\n"
102+
echo -e "\n${LIGHT_YELLOW}Installed masscan ${NORMAL}\n"
103+
else
104+
echo -e "\n${LIGHT_YELLOW}Try reinstalling masscan manually ${NORMAL}\n"
105+
echo -e "\n${LIGHT_YELLOW}RUN : git clone https://github.com/robertdavidgraham/masscan.git ${NORMAL}\n"
106+
echo -e "\n${LIGHT_YELLOW}And then cd into the directory and issue make command ${NORMAL}\n"
107+
fi
108+
109+
110+
go get github.com/tomnomnom/waybackurls && echo -e "\n${LIGHT_YELLOW}Got waybackurls ;) ${NORMAL}\n"
111+
mv ~/go/bin/waybackurls /usr/bin/
112+
if [ $? -eq 0 ]; then
113+
echo -e "\n${LIGHT_YELLOW}Installed waybackurls ${NORMAL}\n"
114+
else
115+
echo -e "\n${LIGHT_YELLOW}Try reinstalling waybackurls manually ${NORMAL}\n"
116+
echo -e "\n${LIGHT_YELLOW}RUN : go get github.com/tomnomnom/waybackurls && echo \"Got waybackurls ;)\" ${NORMAL}\n"
117+
echo -e "\n${LIGHT_YELLOW}Then move the binary from ~/go/bin/ to /usr/bin/ ${NORMAL}\n"
118+
fi
119+
120+
git clone https://github.com/x90skysn3k/brutespray.git && echo -e "\n${LIGHT_YELLOW}Cloned Brutespray ${NORMAL}\n"
121+
122+
echo -e "\n${LIGHT_YELLOW}\n Downloading amass \n ${NORMAL}\n"
123+
wget "https://drive.google.com/uc?export=download&id=1_cR9nKhoBcyZXkwifnucTTbe--qgJAUS" -O amass.zip
124+
echo -e "\n${LIGHT_YELLOW}Extracting amass to /usr/bin/ ${NORMAL}\n"
125+
unzip -o amass.zip -d /usr/bin/
126+
if [ $? -eq 0 ]; then
127+
echo -e "\n${LIGHT_YELLOW}Installed amass ${NORMAL}\n"
128+
rm amass.zip
129+
else
130+
echo -e "\n${LIGHT_YELLOW}Try redownloading amass ${NORMAL}\n"
131+
fi
132+
133+
apt-get install -yq python-virtualenv bc locate dnsutils apache2 tree
134+
135+
cd ~/tools & echo -e "\n${LIGHT_YELLOW}Cloning JS-scan ${NORMAL}\n"
136+
git clone https://github.com/zseano/JS-Scan.git
137+
chmod o+x JS-Scan
138+
ln -s "/root/tools/JS-Scan" /var/www/html/JS-Scan
139+
140+
cd ~/tools && echo -e "\n${LIGHT_YELLOW}Cloning bucketkicker ${NORMAL}\n"
141+
git clone https://github.com/craighays/bucketkicker.git
142+
pip3 install -r ~/tools/bucketkicker/requirements.txt
143+
144+
echo -e "\n${LIGHT_YELLOW}Installing trufflehog ${NORMAL}\n"
145+
pip install truffleHog
146+
147+
echo -e "\n${LIGHT_YELLOW}Installing wafw00f ${NORMAL}\n"
148+
pip install wafw00f
149+
150+
echo -e "\n${LIGHT_YELLOW}Installing whatweb ${NORMAL}\n"
151+
apt-get install -yq whatweb
152+
153+
echo -e "\n${LIGHT_YELLOW}Installing snallygaster ${NORMAL}\n"
154+
pip3 install snallygaster
155+
156+
cd ~/tools && echo -e "\n${LIGHT_YELLOW}Installing SubOver ${NORMAL}\n"
157+
go get github.com/Ice3man543/SubOver
158+
mkdir -p ~/tools/SubOver
159+
mv ~/go/bin/SubOver ~/tools/SubOver
160+
cp ~/go/src/github.com/Ice3man543/SubOver/providers.json ~/tools/SubOver
161+
162+
cd ~/tools && echo -e "\n${LIGHT_YELLOW}Cloning CloudFlare-Enum ${NORMAL}\n"
163+
git clone https://github.com/mandatoryprogrammer/cloudflare_enum.git
164+
165+
cd ~/tools && echo -e "\n${LIGHT_YELLOW}Cloning AWS-Bruteforcer ${NORMAL}\n"
166+
git clone https://github.com/Ucnt/aws-s3-bruteforce.git
167+
cd aws-s3-bruteforce
168+
pip install boto
169+
cd ~/tools
170+
171+
# Although cloning Goohak and GoogD0rker but need to make a workaround for google's IP restriction on advanced search
172+
# Cause these are not working for me
173+
echo -e "\n${LIGHT_YELLOW}For Goohak and GoogD0rker pip install google ${NORMAL}\n"
174+
pip install google
175+
176+
cd ~/tools && echo -e "\n${LIGHT_YELLOW}Cloning Goohak ${NORMAL}\n"
177+
git clone https://github.com/1N3/Goohak.git
178+
chmod +x Goohak/goohak
179+
180+
cd ~/tools && echo -e "\n${LIGHT_YELLOW}Cloning GoogD0rker${NORMAL}\n"
181+
# Using my own fork as the owner has still to merge my PR on his repo https://github.com/ZephrFish/GoogD0rker/pull/7/commits/89a3c1b1f76e4d562180cb4cbaaff03211e1264f
182+
git clone https://github.com/LuD1161/GoogD0rker.git
183+
184+
cd ~/tools && echo -e "\n${LIGHT_YELLOW}Installing brakeman : For RoR applications ${NORMAL}\n"
185+
# Alternative : gem install brakeman
186+
# Using git method so as to install the latest brakeman
187+
git clone https://github.com/presidentbeef/brakeman.git
188+
cd brakeman
189+
gem build brakeman.gemspec
190+
gem install brakeman-*.gem
191+
mv ~/tools/brakeman/bin/brakeman /usr/local/bin/
192+
mv ~/tools/brakeman/bin/codeclimate-brakeman /usr/local/bin/
193+
rm -rf ~/tools/brakeman
194+
195+
cd ~/tools && echo -e "\n${LIGHT_YELLOW}Installing gitleaks ${NORMAL}\n"
196+
go get -u github.com/zricethezav/gitleaks
197+
198+
cd ~/tools && echo -e "\n${LIGHT_YELLOW}Installing subjack${NORMAL}\n"
199+
go get github.com/haccer/subjack
200+
# cp ~/go/src/github.com/haccer/subjack/fingerprints.json
201+
202+
203+
cd ~/tools && echo -e "\n${LIGHT_YELLOW}Downloading aquatone binary${NORMAL}\n"
204+
echo -e "\n${LIGHT_YELLOW}Check the latest binaries at : https://github.com/michenriksen/aquatone/releases${NORMAL}\n"
205+
wget "https://github.com/michenriksen/aquatone/releases/download/v1.4.3/aquatone_linux_amd64_1.4.3.zip"
206+
unzip aquatone_linux_amd64_1.4.3.zip
207+
rm aquatone_linux_amd64_1.4.3.zip
208+
209+
210+
cd ~/tools && echo -e "\n${LIGHT_YELLOW}Installing chromium for aquatone${NORMAL}\n"
211+
git clone https://github.com/scheib/chromium-latest-linux.git
212+
cd chromium-latest-linux && sh update-and-run.sh
213+
# for running chromium
214+
apt-get install -yq --no-install-recommends libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 libnss3
215+
216+
cd ~/tools && echo -e "\n${LIGHT_YELLOW}Getting all wordlists from gdrive, wordlists contain jhaddix's all.txt and massdns as well as subrute's names.txt ${NORMAL}\n"
217+
mkdir wordlists
218+
wget "https://drive.google.com/uc?export=download&id=1X1TTZhxfiLyqrI1Vrw0_DdhFfl3LzsbX" -O all_resolvers.zip
219+
unzip -o all_resolvers.zip -d wordlists
220+
rm all_resolvers.zip
221+
222+
cd ~/tools && echo -e "\n${LIGHT_YELLOW}Downloading dirbuster wordlists ${NORMAL}\n"
223+
wget "https://drive.google.com/uc?export=download&id=1KbxiE_RFZCDpBDKAJbWeG6NXe7YNtCIc" -O all_wordlists.zip
224+
unzip -o all_wordlists.zip -d wordlists
225+
rm all_wordlists.zip
226+
227+
# Finally when all is set and folder's deleted
228+
# Get the scripts, it's in a gist
229+
echo -e "\n${LIGHT_YELLOW}Getting the scripts ;\) ${NORMAL}\n"
230+
wget "https://codeload.github.com/gist/8182f825bd91344ce4c2bf5e2acdf2b3/zip/5605e06e160f1f4870b60ba98438a0aa580d1e26" -O scripts.zip
231+
unzip -j scripts.zip -d scripts
232+
chmod +x ~/tools/scripts/*
233+
rm scripts.zip
234+
235+
# for i in $( ls scripts/*.sh ); do
236+
# dir=$( echo $i | cut -d"/" -f2 | cut -d"." -f1)
237+
# chmod +x $i
238+
# if [ "$dir" != "brutespray" ]; then # Cause we need to move brutespray.sh into brutespray where the brutespray.py is originally
239+
# mkdir $dir
240+
# mv $i $dir
241+
# fi
242+
# done
243+
# rm -rf scripts/
244+
cd ~/tools/massdns/ && git clone https://github.com/TheRook/subbrute.git
245+
mv subbrute/* .
246+
rm -rf subbrute
247+
pip install wfuzz
248+
249+
cd ~/tools
250+
wget -O master_script.sh "https://gist.githubusercontent.com/LuD1161/0a85aef8e27e4a7644fd4b69efb62caa/raw/32b13233a5cbcd4c0bd4754d3e7906ca9d665c2d/master_script.sh"
251+
chmod +x master_script.sh
252+
wget -O nmap-input-file-creator.py "https://gist.githubusercontent.com/LuD1161/dbc44c6c028de2f0cbae9e737af5aa1e/raw/652a811492e89746a71da743e4735a08a74dcad5/nmap-input-file-creator.py"
253+
chmod +x nmap-input-file-creator.py
254+
apt autoremove -y
255+
256+
echo -e "\n${LIGHT_YELLOW}Building nmap from git ${NORMAL}\n"
257+
cd ~/tools
258+
git clone https://github.com/nmap/nmap.git
259+
cd nmap && sh ./configure
260+
make
261+
make install
262+
263+
echo -e "\n${LIGHT_YELLOW}Installing wpscan requirements ${NORMAL}\n"
264+
apt-get -yq install libcurl4-openssl-dev libxml2 libxml2-dev libxslt1-dev ruby-dev build-essential libgmp-dev zlib1g-dev gcc git ruby make software-properties-common
265+
apt-add-repository -y ppa:rael-gc/rvm
266+
apt-get update
267+
apt-get install rvm
268+
apt-get -yq install rvm
269+
cd ~
270+
source /etc/profile.d/rvm.sh
271+
rvm install 2.5.1
272+
rvm use 2.5.1 --default
273+
echo -e "gem: --no-ri --no-rdoc" > ~/.gemrc
274+
#echo -e "source /usr/local/rvm/scripts/rvm" >> ~/.bashrc
275+
cd ~/tools
276+
echo -e "${LIGHT_YELLOW}Cloning wpscan ${NORMAL}"
277+
git clone https://github.com/wpscanteam/wpscan.git
278+
cd wpscan
279+
gem install bundler
280+
bundle install --without test
281+
282+
### Install gobuster ####
283+
echo -e "\n${LIGHT_YELLOW}Installing gobuster ${NORMAL}\n"
284+
cd ~/tools && wget https://github.com/OJ/gobuster/releases/download/v2.0.1/gobuster-linux-amd64.7z
285+
7z x gobuster-linux-amd64.7z
286+
mv gobuster-linux-amd64/gobuster .
287+
rm -rf gobuster-linux-amd64/
288+
chmod +x ~/tools/gobuster
289+
# cat targets.txt | while read line; do gobuster -f -k -e -to 5s -t 40 -w ~/tools/wordlists/starter.txt -u "$line" | tee out.txt ; done
290+
#########################
291+
292+
echo -e "${LIGHT_YELLOW}Setting ulimit to 100000 ${LIGHT_GREEN}( so as to make gobuster work fine with 100 threads ) ${NORMAL}"
293+
echo "ulimit -n 100000" >> ~/.bashrc
294+
295+
### Install searchsploit ####
296+
echo -e "\n${LIGHT_YELLOW}Installing searchsploit${NORMAL}\n"
297+
mkdir /opt
298+
git clone https://github.com/offensive-security/exploitdb.git /opt/exploitdb
299+
sed 's|path_array+=(.*)|path_array+=("/opt/exploitdb")|g' /opt/exploitdb/.searchsploit_rc > ~/.searchsploit_rc
300+
ln -sf /opt/exploitdb/searchsploit /usr/local/bin/searchsploit
301+
302+
InstallationCompletionTime=$(date +%s)
303+
echo -e "\n${LIGHT_YELLOW}Setting up GOPATH and GO bin in path ${NORMAL}\n"
304+
echo "export GOPATH=$HOME/go" >> ~/.bashrc
305+
echo "PATH=$PATH:/root/tools/chromium-latest-linux/latest/chrome-linux:/root/tools:$GOPATH/bin" >> ~/.bashrc
306+
echo -e "${LIGHT_GREEN}Setup Complete Bug Bounty tools :) :) ${NORMAL}\n"
307+
echo -e "${BOLD}Usage : ./master_script.sh domain basic|advanced${NORMAL}\n"
308+
echo -e "Total Time taken : ${LIGHT_GREEN}$(( $InstallationCompletionTime-$InstallationStartTime )) ${NORMAL}seconds"
309+
echo -e "\n${LIGHT_YELLOW}e.g. ./master_script.sh example.com basic|advanced ${NORMAL}\n"
310+
echo -e "\n"
311+
echo -e "${RED}Don't forget to add subfinder's config.json at ~/.config/subfinder/config.json${NORMAL}\n"
312+
echo -e "\n${LIGHT_YELLOW}Also check for aquatone's latest binaries at : https://github.com/michenriksen/aquatone/releases${NORMAL}\n"
313+
echo -e "\n${LIGHT_YELLOW}Enjoy :) ${NORMAL}\n"

0 commit comments

Comments
 (0)