mirror of
https://github.com/kforney/pentest-distro-builder.git
synced 2024-12-04 06:01:58 -07:00
Add conversion script for vanilla Kali.
This commit is contained in:
parent
3a67f7b125
commit
a6fae28c2b
2 changed files with 60 additions and 2 deletions
|
@ -9,7 +9,7 @@ git clone https://github.com/Veil-Framework/Veil.git /opt/Veil
|
||||||
git clone https://github.com/leebaird/discover.git /opt/discover
|
git clone https://github.com/leebaird/discover.git /opt/discover
|
||||||
git clone https://github.com/trustedsec/ptf /opt/ptf
|
git clone https://github.com/trustedsec/ptf /opt/ptf
|
||||||
|
|
||||||
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
|
#ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
|
||||||
|
|
||||||
#Enable/disable our desired services
|
#Enable/disable our desired services
|
||||||
systemctl enable ssh
|
systemctl enable ssh
|
||||||
|
@ -53,7 +53,8 @@ sudo apt update && sudo apt install codium -y
|
||||||
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
|
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
|
||||||
|
|
||||||
#Distro-specific stuff
|
#Distro-specific stuff
|
||||||
DISTRO=$(cat /etc/lsb-release | grep DISTRIB_ID | cut -c 12-30)
|
#DISTRO=$(cat /etc/lsb-release | grep DISTRIB_ID | cut -c 12-30)
|
||||||
|
DISTRO=$(lsb_release -is)
|
||||||
|
|
||||||
case $DISTRO in
|
case $DISTRO in
|
||||||
Parrot)
|
Parrot)
|
||||||
|
|
57
convert.sh
Executable file
57
convert.sh
Executable file
|
@ -0,0 +1,57 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#This script will automate adding all of our additions and changes on top of a vanilla intallation of Kali Linux.
|
||||||
|
#It has not been tested with Parrot.
|
||||||
|
|
||||||
|
function pause(){
|
||||||
|
read -p "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
#Root check!
|
||||||
|
if [ "$EUID" -ne 0 ]
|
||||||
|
then
|
||||||
|
whiptail --backtitle "Pentest Conversion Script" --title "Welcome" --msgbox "You are not signed in as root. This script will prompt for sudo as needed." 7 79
|
||||||
|
fi
|
||||||
|
|
||||||
|
whiptail --backtitle "Pentest Conversion Script" --title "Welcome" --msgbox "This script will add our changes on top of your Kali installation." 7 70
|
||||||
|
|
||||||
|
REPO=$(whiptail --backtitle "Pentest Conversion 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 Conversion Script" --title "Local Repository" --inputbox "What is the IP address of your local repository?" \
|
||||||
|
10 60 3>&1 1>&2 2>&3)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $REPO != "default" ];
|
||||||
|
then
|
||||||
|
sudo cp /etc/apt/sources.list /etc/apt/sources.list.original
|
||||||
|
sudo sed -i "s|archive.kali.org|$REPO|g" /etc/apt/sources.list
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
|
sudo apt upgrade -y
|
||||||
|
|
||||||
|
xargs -a <(awk '! /^ *(#|$)/' "./config/software.list.chroot") -r -- sudo apt install -y
|
||||||
|
bash ./debs/get-debs.sh
|
||||||
|
rm ./build/.gitignore
|
||||||
|
sudo dpkg -i ./build/
|
||||||
|
|
||||||
|
sudo rsync -HAXav ./filesystem/ /
|
||||||
|
if [ "$EUID" -ne 0 ]
|
||||||
|
then
|
||||||
|
cp -rv /etc/skel/ $HOME
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo bash ./config/pentest-distro-builder.chroot
|
||||||
|
|
||||||
|
if (whiptail --backtitle "Pentest Conversion Script" --title "Complete" --yesno "The script is now complete. A reboot is recommended.\nWould you like to reboot now?" 10 60)
|
||||||
|
then
|
||||||
|
whiptail --backtitle "Pentest Conversion Script" --title "Rebooting!" --msgbox "Thank you for using this script. Enjoy your new Kali!" 8 60
|
||||||
|
sudo reboot
|
||||||
|
else
|
||||||
|
whiptail --backtitle "Pentest Conversion Script" --title "Finished!" --msgbox "Thank you for using this script. Enjoy your new Kali!" 8 30
|
||||||
|
exit 1
|
||||||
|
fi
|
Loading…
Reference in a new issue