Skip to content

Instantly share code, notes, and snippets.

@KrYpTeD974
Last active April 14, 2021 14:11
Show Gist options
  • Save KrYpTeD974/9a2402b4613041d6482c95481177e23e to your computer and use it in GitHub Desktop.
Save KrYpTeD974/9a2402b4613041d6482c95481177e23e to your computer and use it in GitHub Desktop.
# System config
# --------------
# change the default password
passwd
# keep the system up to date
apt-get update -y && apt full-upgrade -y
apt -y install open-vm-tools-desktop fuse
/root/Desktop/restart-vm-tools
# change the default hostname
gedit /etc/hostname
gedit /etc/hosts
#snapd install
apt install snapd
systemctl start snapd
systemctl enable snapd
systemctl start apparmor
systemctl enable apparmor
echo "export PATH=$PATH:/snap/bin" >> /root/.bashrc
source ~/.bashrc
#Insomnia install
snap install insomnia
# Services initilialization
# -------------------------
# PostgreSQL
service postgresql start
update-rc.d postgresql enable
# Metasploit
msfdb init
# SSH
systemctl enable ssh
cd /etc/ssh/
mkdir insecure_original_default_kali_keys
mv ssh_host_* insecure_original_default_kali_keys/
# regénérer les clés du server
dpkg-reconfigure openssh-server
nano sshd_config
#Port 4465
#ListenAddress 0.0.0.0
#PermitRootLogin without-password
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
mkdir /root/.ssh
touch /root/authorized_keys
# Coller la clé publique dans le fichier authorized_keys
# (exemple : "ssh-rsa AAAAB3....")
# Aliases
echo "alias access='tail -n 100 -f /var/log/apache2/access.log'" > /root/.bash_aliases
echo "alias error='tail -n 100 -f /var/log/apache2/error.log'" > /root/.bash_aliases
alias dir='dir --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -l'
alias ls='ls --color=auto'
alias vdir='vdir --color=auto'
# Third party tools
# -----------------
# pwntools
apt install python2.7 python-pip python-dev git -y
pip install --upgrade git+https://github.com/Gallopsled/pwntools.git
# The backdoor factory : Patch PE, ELF, Mach-O binaries with shellcode
git clone https://github.com/secretsquirrel/the-backdoor-factory /opt/the-backdoorfactory
cd /opt/the-backdoorfactory
./install.sh
# SMBExec : A rapid psexec style attack with samba tools
git clone https://github.com/pentestgeek/smbexec.git /opt/smbexec
cd /opt/smbexec && ./install.sh
# - Select 1 - Debian/Ubuntu and derivatives
# - Select all defaults
./install.sh
# - Select 4 to compile smbexec binaries
# - After compilation, select 5 to exit
# Masscan : fastest Internet port scanner.
# It can scan the entire Internet in under six minutes.
apt install git gcc make libpcap-dev -y
git clone https://github.com/robertdavidgraham/masscan.git /opt/masscan
cd /opt/masscan
make
make install
# Sn1per : Automated Pentest Recon Scanner
cd /opt/
git clone https://github.com/1N3/Sn1per.git
cd Sn1per
chmod +x install.sh
./install.sh
# Peda
git clone https://github.com/longld/peda.git ~/peda
echo "source ~/peda/peda.py" >> ~/.gdbinit
echo "DONE! debug your program with gdb and enjoy"
# Autojump
echo "Installing autojump..."
git clone git://github.com/wting/autojump.git
cd autojump
./install.py
echo "[[ -s /root/.autojump/etc/profile.d/autojump.sh ]] && source /root/.autojump/etc/profile.d/autojump.sh" >> ~/.bashrc
source ~/.bashrc
echo "...autojump installed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment