Skip to content

Instantly share code, notes, and snippets.

@JamesHovious
Last active November 6, 2022 09:26
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save JamesHovious/814b4d2edb2119d3c2fe to your computer and use it in GitHub Desktop.
Save JamesHovious/814b4d2edb2119d3c2fe to your computer and use it in GitHub Desktop.
Simple script to install the tools I most often use for pentesting.
# Custom bashrc settings
# This will log all of your bash stdin/stdout to the ~/shell_logs/ directory with a date and timestamp for every command.
PS1='[\u@\h \W] \D{%F %T}\$ '
test "$(ps -ocommand= -p $PPID | awk '{print $1}')" == 'script' || (script -f $HOME/shell_logs/$(date +"%d-%b-%y_%H-%M-%S")_shell.log)
#/bin/bash
# This script sets up two directories. One in ~/tools/ which contains tools that I often use on pentests.
# The other directory is in /var/www/html/ that contains tools/scripts that I often pull down from
# and run on victim machines.
toollist=(
'https://github.com/ilneill/Py-CiscoT7.git'
'https://github.com/rsmudge/cortana-scripts.git'
'https://github.com/CoreSecurity/impacket.git'
'https://github.com/ChrisTruncer/EyeWitness.git'
'https://github.com/kussic/arlandria.git'
'https://github.com/hatRiot/clusterd.git'
'https://github.com/ytisf/PyExfil.git'
'https://github.com/meefik/keystorebreaker.git'
'https://github.com/ChrisTruncer/Egress-Assess.git'
'https://github.com/viaMorgoth/pentest-scripts.git'
'https://github.com/viaMorgoth/Metasploit-Modules.git'
'https://github.com/iagox86/dnscat2.git'
'https://github.com/ahhh/Reverse_DNS_Shell.git'
'https://github.com/PowerShellEmpire/Empire.git'
'https://github.com/Veil-Framework/Veil.git'
'https://github.com/cernekee/stoken.git'
'https://github.com/Raikia/CredNinja.git'
'https://github.com/Raikia/SMBCrunch.git'
'https://github.com/ajinabraham/Mobile-Security-Framework-MobSF.git'
'https://github.com/dismantl/linux-injector.git'
'https://github.com/gabemarshall/Brosec.git'
'https://github.com/nccgroup/vlan-hopping---frogger.git'
'https://github.com/torque59/Nosql-Exploitation-Framework.git'
'https://github.com/OJ/gobuster.git'
'https://github.com/joaomatosf/jexboss.git'
'https://github.com/devttys0/binwalk.git'
'https://github.com/sensepost/autoresponder.git'
'https://github.com/torque59/Nosql-Exploitation-Framework.git'
'https://github.com/adaptivethreat/EmPyre.git'
'https://github.com/micheloosterhof/cowrie.git'
'https://github.com/magisterquis/sshhipot.git'
'https://github.com/deltaxflux/fluxion.git'
'https://github.com/dafthack/MailSniper.git'
'https://github.com/chango77747/AdEnumerator.git'
'https://github.com/Kevin-Robertson/Invoke-TheHash'
'https://github.com/johndekroon/serializekiller.git'
'https://github.com/commixproject/commix'
'https://github.com/scipag/vulscan'
'https://github.com/scipag/btle-sniffer'
'https://github.com/federicodotta/Java-Deserialization-Scanner.git'
'https://github.com/Masterminds/sprig'
'https://github.com/LukaSikic/Unix-Privilege-Escalation-Exploits-Pack'
'https://github.com/rasta-mouse/Aggressor-Script'
'https://github.com/bluscreenofjeff/AggressorScripts'
'https://github.com/masterzen/winrm-cli'
'https://github.com/byt3bl33d3r/DeathStar'
'https://github.com/byt3bl33d3r/pth-toolkit'
'https://github.com/Mr-Un1k0d3r/PowerLessShell'
'https://github.com/RUB-NDS/PRET'
'https://github.com/ElevenPaths/Eternalblue-Doublepulsar-Metasploit'
'https://github.com/JonathanSalwan/ROPgadget'
'https://github.com/LukaSikic/Unix-Privilege-Escalation-Exploits-Pack'
'https://github.com/reyammer/shellnoob'
)
wwwlist=(
'https://github.com/ChrisTruncer/WMIOps.git'
'https://github.com/viaMorgoth/Veil-PowerView.git'
'https://github.com/byt3bl33d3r/CrackMapExec.git'
'https://github.com/darkoperator/Posh-SecMod.git'
'https://github.com/Kevin-Robertson/Inveigh.git'
'https://github.com/secabstraction/Create-WMIshell.git'
'https://github.com/secabstraction/WmiSploit.git'
'https://github.com/PowerShellMafia/PowerSploit.git'
'https://github.com/PowerShellEmpire/PowerTools.git'
'https://github.com/samratashok/nishang.git'
'https://github.com/besimorhino/powercat.git'
'https://github.com/darkoperator/Posh-SSH.git'
'https://github.com/adaptivethreat/KeeThief.git'
'https://github.com/Arvanaghi/SessionGopher-Arvanaghi'
'https://github.com/xorrior/RandomPS-Scripts'
'https://github.com/dafthack/HostRecon'
'https://github.com/dafthack/DomainPasswordSpray'
'https://github.com/GoFetchAD/GoFetch'
'https://github.com/Mr-Un1k0d3r/RC4-PowerShell-RAT'
'https://github.com/killswitch-GUI/Persistence-Survivability'
)
mkdir -p /root/tools/
cd /root/tools/
for repo in ${toollist[@]};do
{
git clone $repo; } || {
dir=${repo##*/}
dir=${dir%.*}
cd $dir
git pull origin master
cd ..
}
done
cd /var/www/html/
for repo in ${wwwlist[@]};do
{
git clone $repo; } || {
dir=${repo##*/}
dir=${dir%.*}
cd $dir
git pull origin master
cd ..
}
done
# modification of mh theme with a custom prompt
# features:
# path is autoshortened to ~30 characters
# displays git status (if applicable in current folder)
# turns username green if superuser, otherwise it is white
# if superuser make the username green
if [ $UID -eq 0 ]; then NCOLOR="green"; else NCOLOR="white"; fi
# prompt
#PROMPT='[%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[red]%}%30<...<%~%<<%{$reset_color%}]%(!.#.$) '
#RPROMPT='$(git_prompt_info)'
BLUE="%{$fg_bold[blue]%}"
CYAN="%{$fg_bold[cyan]%}"
CYAN_NB="%{$fg_no_bold[cyan]%}"
GREEN="%{$fg_bold[green]%}"
GREEN_NB="%{$fg_no_bold[green]%}"
GREY="%{$fg_bold[grey]%}"
RED="%{$fg_bold[red]%}"
RED_NB="%{$fg_no_bold[red]%}"
RESET="%{$reset_color%}"
YELLOW="%{$fg_bold[yellow]%}"
YELLOW_NB="%{$fg_no_bold[yellow]%}"
PROMPT='$CYAN_NB [%(!.$RED_NB.%{$fg_no_bold[green]%})%n$GREEN_NB@$HOSTNAME_COLOR%m $YELLOW_NB%D %T$CYAN_NB] $BLUE$(git_prompt_info)$(git_prompt_status)$RESET '
# git theming
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[gray]%}(%{$fg_no_bold[yellow]%}%B"
ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[gray]%})%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✱"
# LS colors, made with http://geoff.greer.fm/lscolors/
export LSCOLORS="Gxfxcxdxbxegedabagacad"
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment