Last active
January 20, 2021 21:14
-
-
Save todmephis/9f0a4a38589cce098cbffe12cde092df to your computer and use it in GitHub Desktop.
Script to setup my kl installation. (deprecated)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#LAST UPDATE: 30/03/2020 | |
#LAS CHANGE: added pkg-config. | |
RED='\033[0;31m' | |
GRN='\033[0;32m' | |
YLL='\033[1;33m' | |
NC='\033[0m' # No Color | |
#FILE NAMES | |
PTROOTDIR="pentestTools" | |
PTDIRS="{lists,tools,shells/{klbuiltin,}}" | |
OSADITIONS="git tree terminator apt-transport-https vim curl software-properties-common build-essential libsqlite3-dev libseccomp-dev publicsuffix pkg-config" | |
prompt (){ | |
while true; do | |
read -p "$1 [Y/n] " yn | |
case $yn in | |
[Yy]* ) ANSWER=1; break;; | |
[Nn]* ) ANSWER=-1; break;; | |
* ) echo "Invalid input...";; | |
esac | |
done | |
} | |
#update and upgrade? | |
prompt "Do you want to update system before continuing?" | |
if [ "$ANSWER" == "1" ]; then | |
sudo apt-get -qq update && sudo apt-get -qq upgrade | |
echo "[+]Done" | |
fi | |
#install fish shell (my fav so far) | |
sudo apt-get -qq install fish | |
#optional, make fish default shell. | |
prompt "Do you wish make fish default shell?" | |
if [ "$ANSWER" == "1" ]; then | |
chsh -s $(which fish) | |
sudo chsh -s $(which fish) | |
echo "[+]Done" | |
fi | |
#install os additions, see variable. | |
echo -e "${YLL}[!]Installing OS Additions...${NC}" | |
sudo apt-get -qq install $OSADITIONS | |
echo -e "${GRN}[+]Done${NC}" | |
#install sublime text. | |
echo -e "${YLL}[!]Installing Sublime...${NC}" | |
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - | |
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list | |
sudo apt-get -qq update | |
sudo apt-get -qq install sublime-text | |
echo -e "${GRN}[+]Done${NC}" | |
echo -e "${YLL}[!]NodeJS and NPM (needed for some tools)...${NC}" | |
curl -sL https://deb.nodesource.com/setup_13.x | sudo bash - | |
sudo apt-get -qq install nodejs | |
echo -ne "${RED}Node Version: ${NC}" | |
node -v | |
echo -ne "${RED}NPM Version: ${NC}" | |
npm -v | |
echo -e "${GRN}[+]Done${NC}" | |
echo -e "${YLL}[!]Installing EXIF-TOOL${NC}" | |
sudo apt-get -qq install libimage-exiftool-perl | |
echo -e "${GRN}[+]Done${NC}" | |
#DONE | |
#Seting up os configs. | |
#TODO OS CONFIGS | |
#Creating directory tree | |
echo -e "${YLL}[!]Creating $PTROOTDIR directory tree...${NC}" | |
#mkdir -p ~/$PTROOTDIR/$PTDIRS; cd ~/$PTROOTDIR TODO: Fix this issue | |
mkdir -p $PTROOTDIR/tools | |
mkdir -p $PTROOTDIR/lists | |
mkdir -p $PTROOTDIR/shells/klbuiltin | |
mkdir -p $PTROOTDIR/scripts | |
cd $PTROOTDIR | |
pwd | |
tree -d $HOME/$PTROOTDIR | |
#Wait to check if everithing is going well. | |
read -n 1 -s -r -p "Press any key to continue" | |
#Setting up lists directory content... | |
echo -e "${YLL}\n[!]Uncompressing rockyou.txt.gz...${NC}" | |
sudo gunzip /usr/share/wordlists/rockyou.txt.gz | |
echo -e "${GRN}[+]Done${NC}" | |
echo -e "${YLL}[!]Instaling seclist...${NC}" | |
sudo apt-get -qq install seclists | |
echo -e "${GRN}[+]Done${NC}" | |
echo -e "${YLL}[!]Creating softlinks...${NC}" | |
cd lists #CHANGING PWD... | |
pwd | |
echo -e "${YLL}[!]Instaling RotobsDisallowed...${NC}" | |
git clone --depth=1 https://github.com/danielmiessler/RobotsDisallowed.git | |
echo -e "${YLL}[!]Instaling XSS Payload List...${NC}" | |
git clone https://github.com/payloadbox/xss-payload-list.git | |
echo -e "${YLL}[!]Creating links...${NC}" | |
sudo ln -s /usr/share/wordlists/rockyou.txt $PWD/rockyou.txt | |
sudo ln -s /usr/share/seclists $PWD/seclists | |
sudo ln -s /usr/share/seclists/Discovery/Web-Content/Common-PHP-Filenames.txt $PWD/common_php.txt | |
echo -e "${RED}[!]Dond't forget to delete # in the lists files.{NC}" | |
sudo ln -s /usr/share/dirbuster/wordlists $PWD/dirbuster | |
ls -alh --color | |
echo -e "${GRN}[+]All lists done!${NC}" | |
cd .. | |
read -n 1 -s -r -p "Press any key to continue" | |
# TODO: continuar con las listas | |
#Seting up shells | |
echo -e "\n${YLL}[!]Linking KL builtin shells...${NC}" | |
cd shells | |
pwd | |
sudo ln -s /usr/share/webshells $PWD/klbuiltin/webshells | |
sudo ln -s /usr/share/laudanum $PWD/klbuiltin/laudanum | |
echo -e "${GRN}[+]Done${NC}" | |
echo -e "[!]${YLL}Downloading additional shells...${NC}" | |
wget https://raw.githubusercontent.com/todmephis/public-shell/master/cmd.aspx -O $PWD/cmd.aspx #aspx web shell | |
ls -alh --color | |
echo -e "${GRN}[+]All shells done!${NC}" | |
cd .. | |
read -n 1 -s -r -p "Press any key to continue" | |
#DONE | |
#TOOLS : Tools to be installed | |
# cvesearcher [DONE] | |
# ffuf [DONE] | |
# http-traceroute [DONE] | |
# | |
cd tools | |
pwd | |
#CVESEARCHER: | |
echo -e "${YLL}[!]Installing CVESEARCHER${NC}" | |
git clone https://github.com/rulosan/cvesearcher.git cvesearcher | |
mv cvesearcher/app.py cvesearcher/cvesearcher.py | |
#replace virtual env python | |
sed -i "1c#!$(which python3)" cvesearcher/cvesearcher.py | |
chmod +x cvesearcher/cvesearcher.py | |
sudo ln -s $PWD/cvesearcher/cvesearcher.py /usr/local/bin/cvesearcher.py | |
which cvesearcher.py | |
#DONE | |
#FFUF | |
echo -e "${YLL}[!]Installing FFUF${NC}" | |
wget https://github.com/ffuf/ffuf/releases/download/v1.0.1/ffuf_1.0.1_linux_amd64.tar.gz -O ffuf.tar.gz | |
mkdir ffuf | |
tar -xzvf ffuf.tar.gz -C ffuf/ | |
sudo ln -s $PWD/ffuf/ffuf /usr/local/bin/ffuf | |
rm ffuf.tar.gz | |
#DONE | |
#HTTP-TRACEROUTE | |
echo -e "${YLL}[!]Installing HTTP-TRACEROUTE${NC}" | |
sudo npm install http-traceroute -g | |
#sn0int | |
echo -e "${YLL}[!]Installing sn0int${NC}" | |
echo -e "\t${YLL}[+]Installing rustup and cargo${NC}" | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | |
echo -e "${GRN}[+]Done${NC}" | |
echo -e "${RED}[!]Dond't forget to put \"$HOME/.cargo/bin/\" in your PATH variable.{NC}" | |
git clone https://github.com/kpcyrd/sn0int.git sn0int | |
cd sn0int | |
$HOME/.cargo/bin/cargo install -f --path . | |
cd .. | |
#SSH2JOHN | |
echo -e "${YLL}[!]Linking ssh2john{NC}" | |
sudo ln -s /usr/share/john/ssh2john.py /usr/local/bin/ | |
#Continúa con más herramientas... | |
cd scripts | |
echo -e "${YLL}[!]Cloning Linux pentest repo${NC}" | |
git clone https://github.com/ankh2054/linux-pentest.git | |
echo -e "${YLL}[!]Cloning LSE repo${NC}" | |
git clone https://github.com/diego-treitos/linux-smart-enumeration.git | |
cd .. | |
ls -alh --color | |
echo -e "${GRN}[+]All tools done!${NC}" | |
echo -e "${GRN}[+]ALL DONE! LETS PWN!!${NC}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment