The default Virtualbox theme will not displayed properly with Kali Linux xfce's dark theme. You are required to run the following command to make it displaying properly on the host.
sudo sed -i "s/virtualbox \%U/virtualbox \-style Fusion \%U/g" \
/usr/share/applications/virtualbox.desktop
(C) Update bash script for Ubuntu and Kali
On Ubuntu, you are required to install "git" beforehand.
sudo apt install git
On Kali, you are required to install "reboot-notifier" beforehand.
You may found Linux VirtualBox guest lagging on audio with video playback and slow performance on the whole guest. The culprit is audio driver that you even do not believe in.
Set the audio controller to "Intel HD Audio" and driver to "ALSA Audio Driver" to solve the problem on Ubuntu Host. I well tested this setting on the following environments :
(1) Ubuntu Desktop 19.04 Host with Ubuntu Desktop 19.04 Guest
(2) Ubuntu Desktop 19.04 Host with Kali Linux Rolling Guest
(3) MacOS Catalina Host with Ubuntu Desktop 19.04 Guest (CoreAudio and Intel HD Audio)
CPU - Intel Core i7-8550U
RAM - 16GB LPDDR3
SSD - 512GB NVMe PCIe SSD
Thunderbolt 3 - USB Type C
Display - 13.9 inches LTPS Touchscreen (3,000 x 2,000) (260 PPI)
Graphic - nVidia M150 and Intel HD Graphic on CPU
F2 key - UEFI BIOS
F12 key - Boot list
This is 2018 model. The 2019 (HUAWEI MateBook X Pro New) is not available here at the moment.
If you want to, you need to update BIOS on Windows 10 environment before installing Ubuntu. To update it, just download the driver and install the ".INF".
You can install Ubuntu Desktop 18.04.2 LTS on HUAWEI MateBook X Pro without any problem no matter "Secure Boot" is enable or not. However, it cannot be shutdown or reboot properly unless you installed nVidia display driver on it.
Make sure the "Problem Reporting" is set to "Automatic" at "Privacy" of "Settings" under the top right hand conner.
Meanwhile, you may need to install "net-tools" for seeing the settings of the network interfaces.
sudo apt install net-tools
nVidia Display Driver
You can install the latest nVidia Open Source Display Driver version 418 on it via Ubuntu PPA. VirtualBox 6.0.6 guest VM requires newer version of nVidia display driver. I tested it with version 319 but the guest vm cannot be refreshed properly near the mouse pointer.
The current version of Virtualbox for Kali Linux 2018.4 is the latest verion 5.2.22. Since the official version of Virtualbox cannot be installed on Kali Linux, the Kali version is to be installed. Luckily, it is the latest version.
VirtualBox is a virtual machine which can be running on desktop and server. We can running VirtualBox as server (Headless mode) with PHPVirtualBox as front end. PHPVirutalBox can be running with Apache flawlessly. However, I would like it to be running on Hiawatha. There is no database required for the Headless mode.
Part A - Hardware
Motherboard : ASRock Rack C2750D4I server board
CPU : Intel Atom C2750
RAM : 4 x 8GB (32GB) DDR3-1600
Hard Drive : 2 x Western Digital 4TB WD4000F9YZ
Western Digital 4TB WD4000F9YZ is not certified by ASRock, so, it cannot boot from SATA3 ports. The SATA2 ports are used in this case.
The performance of C2750 is similar to Xeon E3-1220L. Please the comparison page at here.
The power consumption of this setup is between 30W to 80W.
Make sure you have enabled "Virtualization" (VT-x) in the BIOS.
Part C.1 - Operating System and Software RAID 1 Installation
RAID 1 requires two hard drivers for the installation. When you are installing Ubuntu Server 14.04.2 LTS, you are required to do the partitioning. Select "Automatically partitioning" for each drive. The partitions will be (1) 1MB for "biosgrub"; (2) Free Space for root directory; and (3) Free Space for SWAP.
Then select "Configure Software RAID" to configure the Software RAID 1 on Free Space for root directory and Free Space for SWAP partitions. Do not RAID the "biosgrub" partitions. Set the "Free Space for root directory" to be mount at "/" and use as "Ext4 jouraling file system". Set the "Free Space for SWAP" to be used as "SWAP".
Finally, you should select to install "OpenSSH" when asked.
After the installation, your box can be booted up as expected. You can check the status of Software RAID 1 by the following commands :
cat /proc/mdstat
mdadm --detail /dev/md0
mdadm --detail /dev/md1
Part C.2 - VirtualBox Installation
After the Ubuntu Server 16.04.1 LTS is installed, you can install VirtualBox on it.
sudo nano /etc/apt/sources.list.d/vbox.list
Append the following line to it :
deb http://download.virtualbox.org/virtualbox/debian xenial contrib
wget http://www.cmake.org/files/v3.6/cmake-3.6.2.tar.gz
tar -xvzf cmake-3.6.2.tar.gz
cd cmake-3.6.2
./configure
make
sudo make install
wget http://www.hiawatha-webserver.org/files/hiawatha-10.4.tar.gz
tar -xzvf hiawatha-10.4.tar.gz
cd hiawatha-10.4/extra
./make_debian_package
cd ..
sudo dpkg -i hiawatha_10.4_amd64.deb
sudo systemctl enable hiawatha
sudo nano /etc/php/7.0/fpm/php.ini
Make changes as is.
zlib.output_compression = On
zlib.output_compression_level = 6
cgi.rfc2616_headers = 1
If the Linux kernel is updated but the Virtualbox kernel module was not compiled by DRM properly, you need to run :
sudo /sbin/rcvboxdrv setup
If you encountered "Uninstalling old VirtualBox DKMS kernel modulesError! Could not locate dkms.conf file." when upgrading, you need to delete the source file of previous version :
VirtualBox is a virtual machine which can be running on desktop and server. We can running VirtualBox as server (Headless mode) with PHPVirtualBox as front end. PHPVirutalBox can be running with Apache flawlessly. However, I would like it to be running on Hiawatha. There is no database required for the Headless mode.
Part A - Hardware
Motherboard : ASRock Rack C2750D4I server board
CPU : Intel Atom C2750
RAM : 4 x 8GB (32GB) DDR3-1600
Hard Drive : 2 x Western Digital 4TB WD4000F9YZ
Western Digital 4TB WD4000F9YZ is not certified by ASRock, so, it cannot boot from SATA3 ports. The SATA2 ports are used in this case.
The performance of C2750 is similar to Xeon E3-1220L. Please the comparison page at here.
The power consumption of this setup is between 30W to 80W.
Make sure you have enabled "Virtualization" (VT-x) in the BIOS.
Part C.1 - Operating System and Software RAID 1 Installation
RAID 1 requires two hard drivers for the installation. When you are installing Ubuntu Server 14.04.2 LTS, you are required to do the partitioning. Select "Automatically partitioning" for each drive. The partitions will be (1) 1MB for "biosgrub"; (2) Free Space for root directory; and (3) Free Space for SWAP.
Then select "Configure Software RAID" to configure the Software RAID 1 on Free Space for root directory and Free Space for SWAP partitions. Do not RAID the "biosgrub" partitions. Set the "Free Space for root directory" to be mount at "/" and use as "Ext4 jouraling file system". Set the "Free Space for SWAP" to be used as "SWAP".
Finally, you should select to install "OpenSSH" when asked.
After the installation, your box can be booted up as expected. You can check the status of Software RAID 1 by the following commands :
cat /proc/mdstat
mdadm --detail /dev/md0
mdadm --detail /dev/md1
Make sure to change /etc/network/interfaces :
Add "allow-hotplug p119p1" just below "auto p119p1".
Part C.2 - VirtualBox Installation
After the Ubuntu Server 14.04.2 LTS is installed, you can install VirtualBox on it.
sudo nano /etc/apt/sources.list.d/vbox.list
Append the following line to it :
deb http://download.virtualbox.org/virtualbox/debian trusty contrib
wget http://www.cmake.org/files/v3.2/cmake-3.2.3.tar.gz
tar -xvzf cmake-3.2.3.tar.gz
cd cmake-3.2.3
./configure
make
sudo make install
wget http://www.hiawatha-webserver.org/files/hiawatha-9.13.tar.gz
tar -xzvf hiawatha-9.13.tar.gz
cd hiawatha-9.13/extra
./make_debian_package
cd ..
sudo dpkg -i hiawatha_9.13_amd64.deb
sudo nano /etc/php5/fpm/php.ini
Make changes as is.
zlib.output_compression = On
zlib.output_compression_level = 6
The current version (at the time of this writing) of VirtualBox is 4.2.10. However, it is masked in the main stream of Gentoo so as Pentoo. The reason of mask is unstable. It is recommended to use 4.1.24 from the Gentoo.
To install the current version of VirtualBox, you need to unmask it. I am a new comer of Gentoo/Pentoo, so my tutorial may not be 100% right.
You will then see the current version on the screen.
sudo nano /etc/portage/make.conf
Append "PUEL" at the end of the ACCEPT_LICENSE :
ACCEPT_LICENSE="AdobeFlash-11.x Intel-SDP PUEL"
Step 2 (Install from the binary) :
** This step is tested **
Then check if the installation of VirtualBox will be working or not. I am going to install the "virtualbox-bin", the binary file, instead of compiling from source :
sudo emerge -pa virtualbox-bin
If everything is alright, you can install it :
sudo emerge -av virtualbox-bin
Step 3 :
After the installation, you need to add yourself (samiux here) to the group of "vboxusers" on the host (Pentoo) :
sudo gpasswd -a samiux vboxusers
sudo gpasswd -a vboxusers samiux
Step 4 :
Since the necessary modules of VirtualBox do not load properly, you need the following script to load and unload it when necessary.
Download it and save it at /etc/init.d/virtualbox :
sudo chmod +x /etc/init.d/virtualbox
To start it :
sudo /etc/init.d/virtualbox start
To stop it : sudo /etc/init.d/virtualbox stop
To start it automatically when boot :
sudo rc-update add virtualbox default
Update :
According to one of the developers, you have another way to load the modules automatically :
Apparmor is a kind of application firewall which is similar to SELinux. Apparmor is installed by default for Ubuntu.
The apparmor for VirtualBox is not existed in /etc/apparmor.d/ and you should build your own. You can copy the following source code to the directory and enable it.
Step 1 :
sudo apt-get install apparmor-utils
Make sure Virtualbox is installed.
Step 2 :
usr.bin.VBox
Copy the captioned source code and placed it to /etc/apparmor.d/ and name them as the name that is underlined.
Install VirtualBox 4.0.8 on the host computer, such as Ubuntu 11.04 as usual. Then install Back|Track 5 on the VirtualBox. Next is to install Oracle VM VirtualBox Extension Pack and Guest Additons.
Oracle VM VirtualBox Extension Pack is installed on the host computer, such as Ubuntu 11.04. You can find it on the Download page.
To install Guest Additons, just click "Devices" -- "Install Guest Additions" on the menu.
Do the following on the guest computer (Back|Track 5) :
cd /media/VBOXADDITONS_4.0.8_71778
./VBoxLinuxAddtions.run
To fix the boot up screen.
fix-splash
Do the following on the host computer (Ubuntu 11.04) :
Add you (username) to the group of vboxusers, e.g. samiux as username.
useradd -G vboxusers samiux
Go to "Users and Groups", "Advanced Settings" -- "User's Rights" select "Use VirtualBox solution".
Then, reboot your host to make it effective.
Remember not to enable USB 2.0 on the VirtualBox as some USB dongles do not work properly when it is enabled.
Finally, the following wireless USB dongles have been tested and they are all working perfectly out of the box. They are all support injection too.
TP-Link TL-WN321G 54Mbps Wireless G USB Adapter
TP-Link TL-WN821N 300Mbps Wireless N USB Adapter
TP-Link TL-WN822N 300Mbps High Gain Wireless N USB Adapter
*** This tutorial is also applied to VirtualBox 4.1.2.
Remarks :
When the kernel of Back|Track 5 is upgraded, the Guest Additions will be damaged. You need to do the following on Back|Track 5 and then reinstall the Guest Additions :
prepare-kernel-sources
cd /usr/src/linux
cp -rf include/generated/* include/linux/
Set the downloaded Metasploitable as virtual hard drive at VirtualBox. The network adapter is set to "Host-Only". The virtual hard disk space is at least 8GB and 512MB RAM for the Metasploitable.
(C) The VirtualBox intranet
Now, the IP address of eth0 of Metasploitable is similar to 192.168.56.101. The IP address of eth0 and eth1 of Back|Track are similar to 10.0.2.15 and 192.168.56.102 respectively.
You may require to execute the following command at Back|Track in order to see the two network interfaces and their IPs.
/etc/init.d/networking restart
Back|Track can access (or ping) Metasploitable via IP address. Back|Track can surf the internet but Metasploitable cannot.
*** CAUTION : This tutorial is written for Penetration Test only. Otherwise, you may be arrested if you attack/intrude any other network/computer without authorization. ***
Hardware :
Lenovo ThinkPad X200 with 4GB RAM and 80GB SSD
Lenovo ThinkPad X200 is installed Ubuntu 10.10 Desktop edition. On which, installs VirtualBox.
Go to the Oracle VM VirtualBox site to download the VirtualBox : http://dlc.sun.com/virtualbox/vboxdownload.html#linux
(A) Create Back|Track virtual machine :
Select at least 8GB virtual hard drive place and 512MB RAM for the Back|Track. The first network adapter is set to "NAT" while the second is set to "Host-Only".
Boot up Back|Track from the VirtualBox and click on "install.sh" to install Back|Track.
Login for further setting. The username is "root" and the password is "toor".
Step 1 :
After the installation, you may execute the following command to fix the screen size to 800x600.
fix-splash800
Then, change the password of the root when necessary. Otherwise, the username is "root" while the password is "toor".
Execute the following command to make Back|Track to start network interface and X.org when bootup each time.
kate /root/.bash_profile
Append the following lines :
start-network
startx
Step 2 :
To install VirtualBox Additions when necessary via "Konqueror" -- "Storage Media" -- "media:/hdc".
bash VBoxLinuxAdditions-x86.run
Step 3 :
apt-get -y update
apt-get -y upgrade
Step 4 :
Go to "Menu" -- "BackTrack" -- "Penetration" -- "Fast Track". Select "Fast-Track Interactive" and choose "1".
Step 4a :
Go to "Menu" -- "BackTrack" -- "Penetration" -- "ExploitDB". Select "Update Exploitdb".
Step 4b :
Go to "Menu" -- "BackTrack" -- "Penetration" -- "Social Engineering Toolkit". Select "S.E.T-Update".
Step 5 :
At the terminal, execute the following command :
airodump-ng-oui-update
Step 6 :
Go to "Menu" -- "BackTrack" -- "Vulnerability Identification" -- "OpenVAS" -- "OpenVAS NVT Sync".
Set the downloaded Metasploitable as virtual hard drive at VirtualBox. The network adapter is set to "Host-Only". The virtual hard disk space is at least 8GB and 512MB RAM for the Metasploitable.
(C) The final
Now, the IP address of eth0 of Metasploitable is similar to 192.168.56.101. The IP address of eth0 and eth1 of Back|Track are similar to 10.0.2.15 and 192.168.56.102 respectively.
You may require to execute the following command at Back|Track in order to see the two network interfaces and their IPs.
/etc/init.d/networking restart
Back|Track can access (or ping) Metasploitable via IP address. Back|Track can surf the internet but Metasploitable cannot.