-
Notifications
You must be signed in to change notification settings - Fork 39
/
kali_light_vbox.sh
47 lines (41 loc) · 1.72 KB
/
kali_light_vbox.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
#!/bin/bash
#----------------------------------------------------------------------------
# The Kali light distro is a minimal install that requires some extra steps
# to run it well in VirtualBox and to install the basic pentesting tools.
# This script will do the following:
#
# * Install packages needed to build the VirtualBox Guest Additions
# * Install the VirtualBox Guest Additions
# * Install the Kali top 10 tools and set a random password on the MySQL
# database.
# * Configure PostgreSQL to start on boot
# * Initialize the MSF database
#
# Prior to running this script, insert the VirtualBox Guest Additions CD
#-----------------------------------------------------------------------------
echo "Updating packages"
apt-get update
apt-get -q -y upgrade
echo "Installing build tools and headers."
apt-get -q -y install build-essential linux-headers-$(uname -r)
echo "Installing the VirtualBox Guest Additions."
mount /media/cdrom
if [ ! -f "/media/cdrom/VBoxLinuxAdditions.run" ]; then
echo "VirtualBox Guest Additions CD not mounted, skipping."
else
/bin/bash /media/cdrom/VBoxLinuxAdditions.run
umount /media/cdrom
eject /media/cdrom
fi
echo "Installing Kali top 10 tools."
pass=$(head -c 24 /dev/urandom | base64)
echo "mysql-server-5.5 mysql-server/root_password_again password $pass" | debconf-set-selections
echo "mysql-server-5.5 mysql-server/root_password password $pass" | debconf-set-selections
echo "wireshark-common wireshark-common/install-setuid boolean false" | debconf-set-selections
apt-get -q -y install kali-linux-top10 seclists
echo "Configuring Metasploit Database"
/etc/init.d/postgresql start
update-rc.d postgresql enable
msfdb init
echo "MySQL Root Password: $pass"
echo "Please reboot."