From ef9981f78bb00aa76f82aa87161767ca1f7701bd Mon Sep 17 00:00:00 2001 From: Arman Amini Date: Sun, 5 Jan 2025 20:40:19 +0330 Subject: [PATCH] fix: modify the structure and add some necessary packages --- README.md | 8 +- install.sh | 236 ++++++++++++++--------------------------------------- 2 files changed, 69 insertions(+), 175 deletions(-) diff --git a/README.md b/README.md index f37e3fc..bfd7437 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # BBHT Bug Bounty Hunting Tools is a script to install the most popular tools used while looking for vulnerabilities for a bug bounty program. - + # Tools - dirsearch @@ -20,13 +20,17 @@ Bug Bounty Hunting Tools is a script to install the most popular tools used whil - Unfurl - Waybackurls - Httprobe +- dnsx +- shuffledns +- naabu +- mapcidr - Seclists collection This script also grabs the aliases created and published here: https://github.com/nahamsec/recon_profile - # Installing + - git clone https://github.com/nahamsec/bbht.git - cd bbht - chmod +x install.sh diff --git a/install.sh b/install.sh index e203de7..5a031c5 100644 --- a/install.sh +++ b/install.sh @@ -1,192 +1,82 @@ #!/bin/bash -sudo apt-get -y update -sudo apt-get -y upgrade +set -e -sudo apt-get install -y libcurl4-openssl-dev -sudo apt-get install -y libssl-dev -sudo apt-get install -y jq -sudo apt-get install -y ruby-full -sudo apt-get install -y libcurl4-openssl-dev libxml2 libxml2-dev libxslt1-dev ruby-dev build-essential libgmp-dev zlib1g-dev -sudo apt-get install -y build-essential libssl-dev libffi-dev python-dev -sudo apt-get install -y python-setuptools -sudo apt-get install -y libldns-dev -sudo apt-get install -y python3-pip -sudo apt-get install -y python-pip -sudo apt-get install -y python-dnspython -sudo apt-get install -y git -sudo apt-get install -y rename -sudo apt-get install -y xargs +sudo apt-get -y update && sudo apt-get -y upgrade + +sudo apt-get install -y \ + libcurl4-openssl-dev libssl-dev jq ruby-full build-essential \ + libxml2 libxml2-dev libxslt1-dev ruby-dev libgmp-dev zlib1g-dev \ + libffi-dev python3-dev python3-pip git rename xargs awscli nmap -echo "installing bash_profile aliases from recon_profile" git clone https://github.com/nahamsec/recon_profile.git -cd recon_profile -cat bash_profile >> ~/.bash_profile +cat recon_profile/bash_profile >> ~/.bash_profile source ~/.bash_profile -cd ~/tools/ -echo "done" - - - -#install go -if [[ -z "$GOPATH" ]];then -echo "It looks like go is not installed, would you like to install it now" -PS3="Please select an option : " -choices=("yes" "no") -select choice in "${choices[@]}"; do - case $choice in - yes) - echo "Installing Golang" - wget https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz - sudo tar -xvf go1.13.4.linux-amd64.tar.gz - sudo mv go /usr/local - export GOROOT=/usr/local/go - export GOPATH=$HOME/go - export PATH=$GOPATH/bin:$GOROOT/bin:$PATH - echo 'export GOROOT=/usr/local/go' >> ~/.bash_profile - echo 'export GOPATH=$HOME/go' >> ~/.bash_profile - echo 'export PATH=$GOPATH/bin:$GOROOT/bin:$PATH' >> ~/.bash_profile - source ~/.bash_profile - sleep 1 - break - ;; - no) - echo "Please install go and rerun this script" - echo "Aborting installation..." - exit 1 - ;; - esac -done +if ! command -v go &> /dev/null; then + echo "Installing Golang..." + wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz + sudo tar -xvf go1.23.4.linux-amd64.tar.gz -C /usr/local + rm go1.23.4.linux-amd64.tar.gz + echo 'export GOROOT=/usr/local/go' >> ~/.bash_profile + echo 'export GOPATH=$HOME/go' >> ~/.bash_profile + echo 'export PATH=$GOPATH/bin:$GOROOT/bin:$PATH' >> ~/.bash_profile + source ~/.bash_profile fi - -#Don't forget to set up AWS credentials! -echo "Don't forget to set up AWS credentials!" -apt install -y awscli echo "Don't forget to set up AWS credentials!" +echo "Creating tools directory..." +mkdir -p ~/tools +cd ~/tools + +install_tools() { + echo "Installing $1..." + git clone "$2" + cd "$1" || return + $3 + cd ~/tools || return + echo "Done installing $1" +} + +install_go_tools() { + echo "Installing $1..." + go install "$2"@latest + echo "Done installing $1" +} - -#create a tools folder in ~/ -mkdir ~/tools -cd ~/tools/ - -#install aquatone -echo "Installing Aquatone" -go get github.com/michenriksen/aquatone -echo "done" - -#install chromium -echo "Installing Chromium" sudo snap install chromium -echo "done" - -echo "installing JSParser" -git clone https://github.com/nahamsec/JSParser.git -cd JSParser* -sudo python setup.py install -cd ~/tools/ -echo "done" - -echo "installing Sublist3r" -git clone https://github.com/aboul3la/Sublist3r.git -cd Sublist3r* -pip install -r requirements.txt -cd ~/tools/ -echo "done" - - -echo "installing teh_s3_bucketeers" -git clone https://github.com/tomdev/teh_s3_bucketeers.git -cd ~/tools/ -echo "done" - - -echo "installing wpscan" -git clone https://github.com/wpscanteam/wpscan.git -cd wpscan* -sudo gem install bundler && bundle install --without test -cd ~/tools/ -echo "done" - -echo "installing dirsearch" -git clone https://github.com/maurosoria/dirsearch.git -cd ~/tools/ -echo "done" - -echo "installing lazys3" -git clone https://github.com/nahamsec/lazys3.git -cd ~/tools/ -echo "done" - -echo "installing virtual host discovery" -git clone https://github.com/jobertabma/virtual-host-discovery.git -cd ~/tools/ -echo "done" - - -echo "installing sqlmap" -git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git sqlmap-dev -cd ~/tools/ -echo "done" - -echo "installing knock.py" -git clone https://github.com/guelfoweb/knock.git -cd ~/tools/ -echo "done" - -echo "installing lazyrecon" -git clone https://github.com/nahamsec/lazyrecon.git -cd ~/tools/ -echo "done" - -echo "installing nmap" -sudo apt-get install -y nmap -echo "done" - -echo "installing massdns" -git clone https://github.com/blechschmidt/massdns.git -cd ~/tools/massdns -make -cd ~/tools/ -echo "done" - -echo "installing asnlookup" -git clone https://github.com/yassineaboukir/asnlookup.git -cd ~/tools/asnlookup -pip install -r requirements.txt -cd ~/tools/ -echo "done" - -echo "installing httprobe" -go get -u github.com/tomnomnom/httprobe -echo "done" - -echo "installing unfurl" -go get -u github.com/tomnomnom/unfurl -echo "done" - -echo "installing waybackurls" -go get github.com/tomnomnom/waybackurls -echo "done" - -echo "installing crtndstry" -git clone https://github.com/nahamsec/crtndstry.git -echo "done" - -echo "downloading Seclists" -cd ~/tools/ +install_tools "aquatone" "https://github.com/michenriksen/aquatone.git" "" +install_tools "JSParser" "https://github.com/nahamsec/JSParser.git" "sudo python3 setup.py install" +install_tools "Sublist3r" "https://github.com/aboul3la/Sublist3r.git" "pip3 install -r requirements.txt" +install_tools "teh_s3_bucketeers" "https://github.com/tomdev/teh_s3_bucketeers.git" "" +install_tools "wpscan" "https://github.com/wpscanteam/wpscan.git" "sudo gem install bundler && bundle install --without test" +install_tools "dirsearch" "https://github.com/maurosoria/dirsearch.git" "" +install_tools "lazys3" "https://github.com/nahamsec/lazys3.git" "" +install_tools "virtual-host-discovery" "https://github.com/jobertabma/virtual-host-discovery.git" "" +install_tools "sqlmap-dev" "https://github.com/sqlmapproject/sqlmap.git" "" +install_tools "knock" "https://github.com/guelfoweb/knock.git" "" +install_tools "lazyrecon" "https://github.com/nahamsec/lazyrecon.git" "" +install_tools "massdns" "https://github.com/blechschmidt/massdns.git" "make" +install_tools "asnlookup" "https://github.com/yassineaboukir/asnlookup.git" "pip3 install -r requirements.txt" +install_tools "crtndstry" "https://github.com/nahamsec/crtndstry.git" "" + +install_go_tools "httprobe" "github.com/tomnomnom/httprobe" +install_go_tools "unfurl" "github.com/tomnomnom/unfurl" +install_go_tools "waybackurls" "github.com/tomnomnom/waybackurls" +install_go_tools "dnsx" "github.com/projectdiscovery/dnsx/cmd/dnsx" +install_go_tools "shuffledns" "github.com/projectdiscovery/shuffledns/cmd/shuffledns" +install_go_tools "naabu" "github.com/projectdiscovery/naabu/v2/cmd/naabu" +install_go_tools "mapcidr" "github.com/projectdiscovery/mapcidr/cmd/mapcidr" + + +echo "Downloading SecLists..." git clone https://github.com/danielmiessler/SecLists.git -cd ~/tools/SecLists/Discovery/DNS/ -##THIS FILE BREAKS MASSDNS AND NEEDS TO BE CLEANED +cd SecLists/Discovery/DNS/ || return cat dns-Jhaddix.txt | head -n -14 > clean-jhaddix-dns.txt -cd ~/tools/ -echo "done" - - +cd ~/tools || return echo -e "\n\n\n\n\n\n\n\n\n\n\nDone! All tools are set up in ~/tools" ls -la -echo "One last time: don't forget to set up AWS credentials in ~/.aws/!" +echo "One last time: don't forget to set up AWS credentials in ~/.aws/!" \ No newline at end of file