mirror of
https://github.com/kforney/pentest-distro-builder.git
synced 2024-11-22 01:50:56 -07:00
Create makemine script.
This commit is contained in:
parent
86412873f3
commit
d0e0c59d21
1 changed files with 92 additions and 0 deletions
92
makemine.sh
Executable file
92
makemine.sh
Executable file
|
@ -0,0 +1,92 @@
|
|||
#!/bin/bash
|
||||
|
||||
#First, ask for a repository.
|
||||
REPO=$(whiptail --backtitle "Pentest Build Script" --title "Repository" --menu "Which repository are you going to use?" 10 60 2 \
|
||||
"default" "The distribution's default repository" \
|
||||
"local" "A repository hosted on your local network" 3>&1 1>&2 2>&3)
|
||||
|
||||
if [ $REPO == "local" ];
|
||||
then
|
||||
REPO=$(whiptail --backtitle "Pentest Build Script" --title "Local Repository" --inputbox "What is the IP address of your local repository?" \
|
||||
10 60 3>&1 1>&2 2>&3)
|
||||
else
|
||||
REPO=http.kali.org
|
||||
fi
|
||||
|
||||
sed -i "7s|.*|deb http://$REPO/kali kali-rolling main non-free contrib|g" /etc/apt/sources.list
|
||||
sed -i "8s|.*|#deb-src http://$REPO/kali kali-rolling main non-free contrib|g" /etc/apt/sources.list
|
||||
|
||||
#Then, install what we can from that repository.
|
||||
|
||||
apt install $(cat config/software.list.chroot) -y
|
||||
|
||||
#Next, install the stuff we can't install from there.
|
||||
rm -rf build
|
||||
|
||||
cd debs
|
||||
bash get-debs.sh
|
||||
cd build
|
||||
dpkg -i *.deb
|
||||
apt-get -f install
|
||||
|
||||
#Final configuration...
|
||||
#Populate root's home folder from our /etc/skel
|
||||
cp -rv filesystem/etc/skel/. /root/
|
||||
|
||||
#Time to git stuff...
|
||||
cd /root/
|
||||
git clone https://github.com/Veil-Framework/Veil.git
|
||||
git clone https://github.com/leebaird/discover.git
|
||||
git clone https://github.com/trustedsec/ptf
|
||||
|
||||
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
|
||||
|
||||
#Enable/disable our desired services
|
||||
systemctl enable ssh
|
||||
systemctl enable cups
|
||||
systemctl enable apache2
|
||||
systemctl enable mysql
|
||||
systemctl enable postgresql
|
||||
systemctl disable tor
|
||||
systemctl disable cockpit.socket
|
||||
systemctl enable xrdp
|
||||
systemctl disable firewalld
|
||||
|
||||
#Allow VLC to run as root
|
||||
sed -i 's/geteuid/getppid/' /usr/bin/vlc
|
||||
|
||||
#Get FTK Imager CLI
|
||||
wget https://ad-zip.s3.amazonaws.com/ftkimager.3.1.1_ubuntu64.tar.gz
|
||||
tar xvf ftkimager.3.1.1_ubuntu64.tar.gz
|
||||
mv ftkimager /usr/bin/
|
||||
rm ftkimager.3.1.1_ubuntu64.tar.gz
|
||||
|
||||
#Install VS Code extensions
|
||||
codium --install-extension dbaeumer.vscode-eslint --user-data-dir=~/.vscode-oss
|
||||
codium --install-extension ecmel.vscode-html-css --user-data-dir=~/.vscode-oss
|
||||
codium --install-extension hookyqr.beautify --user-data-dir=~/.vscode-oss
|
||||
codium --install-extension ms-azuretools.vscode-docker --user-data-dir=~/.vscode-oss
|
||||
codium --install-extension ms-python.python --user-data-dir=~/.vscode-oss
|
||||
codium --install-extension ms-vscode.cpptools --user-data-dir=~/.vscode-oss
|
||||
codium --install-extension ms-vscode.csharp --user-data-dir=~/.vscode-oss
|
||||
codium --install-extension ms-vscode.go --user-data-dir=~/.vscode-oss
|
||||
codium --install-extension ms-vscode.powershell --user-data-dir=~/.vscode-oss
|
||||
codium --install-extension rebornix.ruby --user-data-dir=~/.vscode-oss
|
||||
codium --install-extension zignd.html-css-class-completion --user-data-dir=~/.vscode-oss
|
||||
|
||||
#Make Nemo the defualt file manager
|
||||
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
|
||||
|
||||
#Distro-specific stuff
|
||||
DISTRO=$(cat /etc/lsb-release | grep DISTRIB_ID | cut -c 12-30)
|
||||
|
||||
case $DISTRO in
|
||||
Parrot)
|
||||
#Stop ParrotSec from overwriting all our desktop customizations every time parrot-skel updates. >:-(
|
||||
apt-mark hold parrot-skel
|
||||
;;
|
||||
Kali)
|
||||
#Remove CPU-hungry MATE menu applet
|
||||
apt remove mate-applet-brisk-menu -y
|
||||
;;
|
||||
esac
|
Loading…
Reference in a new issue