Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example script for post install setup of kali dropbox
# if .ssh directory doesn't exist, create it
if [ ! -d /root/.ssh ];then mkdir /root/.ssh;fi
echo "adding pentest users key for gitlab..."
echo "ssh-rsa AAAAB3NzaC1y----<SNIP>----+f" > /root/.ssh/git.pub
echo '-----BEGIN RSA PRIVATE KEY-----
ADD YOUR GITLAB USERS PRIVKEY HERE
-----END RSA PRIVATE KEY-----' > /root/.ssh/git
chmod 600 /root/.ssh/git
# setup ssh to use your newly added private key when connecting to your internal gitlab server
echo "
Host <YOUR_GITLAB_IP>
Hostname <YOUR_GITLAB_HOSTNAME>
User git
StrictHostKeyChecking no
IdentityFile /root/.ssh/git" >> /root/.ssh/config
# add to hosts file
echo "<YOUR_GITLAB_IP> <YOUR_GITLAB_HOSTNAME>" >> /etc/hosts
# clone custom repos (add your git clone commands here)
git clone --depth 1 git@<YOUR_GITLAB_HOSTNAME>:pentest/sstools /sstools
git clone --depth 1 git@<YOUR_GITLAB_HOSTNAME>:pentest/dir-structure /root/client
# setup PowerShell Empire
git clone https://github.com/PowerShellEmpire/Empire empire
cd empire
RANDKEY=`cat /dev/urandom | tr -dc '0-9' | fold -w ${1:-32} | head -1`
STAGING_KEY=$RANDKEY ./setup/install.sh
cd
# download sharphound
wget https://raw.githubusercontent.com/BloodHoundAD/BloodHound/master/Ingestors/SharpHound.ps1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment