-
Notifications
You must be signed in to change notification settings - Fork 2
/
kali-postinstall.sh
executable file
·93 lines (76 loc) · 2.65 KB
/
kali-postinstall.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/bash
#-Metadata-----------------------------------------------------------------
# Filename: kali-postinstall.sh
# Date: 2022-07-28
# Version: 2022.2
#-Notes--------------------------------------------------------------------
# These are the things I do after install Kali on a new VM/System.
#
# Run this as root after an install of Kali
#
# This is provided as-is and is not meant for others. However, you might
# find some of this stuff useful. Got some of these ideas from g0tm1lk,
# see his script at:
#
# https://github.com/g0tmi1k/os-scripts/blob/master/kali.sh
#
# Tweet @CTFKris for ideas to add to this.
#
VERSION="2022.2"
# Path to download packages, etc to
SCRIPTDLPATH="scriptdls/"
# We do VM detection later, default case it false, set manually to true if the
# detection fails for you
VM=false
# People were running "sh kali-postinstall.sh" and this broke tests
if test "$_" = "/bin/sh"
then
echo "Found to be running in /bin/sh. Its better to run this script in /bin/bash"
echo "Usage: ./$0"
exit
fi
# Check we're root
if [[ $EUID -ne 0 ]]
then
echo "[-] This script must be run as root."
exit
fi
echo "[*] Improving Kali $VERSION"
echo "[+] Updating repos and installing nala"
apt-get -qq update
apt -y -qq install nala # Use nala from here on out to gain package history.
echo "[+] Downloading ubuntu font..."
mkdir -p "$SCRIPTDLPATH"
wget -qO "$SCRIPTDLPATH/font.zip" https://assets.ubuntu.com/v1/0cef8205-ubuntu-font-family-0.83.zip
cd "$SCRIPTDLPATH"
unzip -qq -o -d /usr/share/fonts/truetype/ttf-ubuntu font.zip
fc-cache -f
cd ..
cp themefiles/kalibg.png /usr/share/backgrounds
cp .vimrc ~
chsh -s /bin/bash root
echo "[+] Installing VS Code..."
wget -qO "$SCRIPTDLPATH/code.deb" https://go.microsoft.com/fwlink/?LinkID=760868
cd "$SCRIPTDLPATH"
apt install ./code.deb
cd ..
echo "[+] Installing more packages..."
nala install -y ghidra remmina python3 python3-pip evil-ssdp gimp squashfs-tools pngcheck exiftool sshpass libssl-dev pdfcrack tesseract-ocr zlib1g-dev vagrant strace ltrace
echo "[+] Installing pip packages for Python3..."
pip3 install pwntools xortool gmpy sympy libnum pycryptodome
echo "[+] Installing Stegosolve..."
wget -qO /usr/bin/Stegsolve.jar http://www.caesum.com/handbook/Stegsolve.jar
chmod +x /usr/bin/Stegsolve.jar
echo "[+] Installing PEDA..."
git clone -q https://github.com/longld/peda.git ~/peda
echo "source ~/peda/peda.py" >> ~/.gdbinit
echo "[+] Updating Metasploit..."
nala install -y metasploit-framework
echo "[+] Updating wpscan..."
wpscan --update
echo "[+] Upgrading all packages..."
nala upgrade -y
echo "[+] Cleanup after upgrade..."
rm -fr "$SCRIPTDLPATH"
nala install -y --fix-broken
nala autoremove -y