Você está na página 1de 10

Customize

Your Pentest Lab – HackingLoops.com



First, if you haven’t read the blog post that preceded this make sure to go back and
read that: https://www.hackingloops.com/kali-linux-virtualbox-pentest-lab/

Now, if you want to be able to transfer files back and fourth between the host
system and guest system we need to add what is called Guest Additions on to your
current VirtualBox install.

Note: To get this to work you need to make sure that you have your DHCP server
running. If you don’t have it enabled you can type: dhclient –v

Even better if you want DHCP to startup every time Kali is booted open the file
/etc/network/interfaces from the command line, add the following within the
highlighted section below if your NAT interface is eth0:

auto eth0
iface eth0 inet dhcp

Customize Your Pentest Lab – HackingLoops.com



Guest Additions

Time to Install our Guest Additions, while your machine is up you simply go to
Devices Insert Guest Additions:


You will probably see a pop-up that looks like this but you can just hit cancel:




Next, we need to update our headers so that we can properly install the additions:
apt-get update && apt-get install -y linux-headers-$(uname -r)

Customize Your Pentest Lab – HackingLoops.com



Lets now copy this file from the following location to our desktop and move there:

cp /media/cdrom/VBoxLinuxAdditions.run /root/Desktop/
cd /root/Desktop/




This file doesn’t have execute permissions so we need to give it those permissions
and then execute it:

chmod 755 /root/Desktop/VBoxLinuxAdditions.run
./VBoxLinuxAdditions.run



Note: If this fails try: apt-get upgrade and then run it again.


For the next section you need to first create a folder on your host machine where
you want to transfer your files back and fourth.

















Customize Your Pentest Lab – HackingLoops.com



After you’ve created a folder where you would like to transfer files back and fourth
on the host machine we need to let VirtualBox know about it. Click on Machine ->
Shared Folders and Then hit the add button:



Hit the dropdown button and click ‘Other’ so that you can locate the folder you
created earlier. Make sure to click Auto-mount and Make Permanent as well:

Customize Your Pentest Lab – HackingLoops.com



If you followed all that, on your Kali Linux platform you should be able to see your
new share folder within the media folder:



Error Handling - Finally, if all that hasn’t worked for you and you still can’t see your
folder just try an update, upgrade and install via: apt-get update && apt-get
upgrade && apt-get install


Repositories

Time to clean up the default repository so that when we do updates, upgrades etc.
we get the most recent versions. We have to be careful here though because as you
can see on the Kali Linux website if you use the wrong repository or some random
repository you found online you might get in trouble.




You can check this by opening up your sources.list : nano /etc/apt/sources.list






Customize Your Pentest Lab – HackingLoops.com



You should set your sources to the following:



deb http://http.kali.org/kali kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free

deb-src http://http.kali.org/kali kali main non-free contrib
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free


Device not Managed

If you are having “device not managed” issues in your Network Manager you need to
edit the config file for it:

nano /etc/NetworkManger/NetworkManager.conf



Simply change “managed=false” to “managed=true” and save.

Customize Your Pentest Lab – HackingLoops.com



Default SSH Keys

Now we need to secure our new Kali Linux platform. Because every person receives
the same download we all have the same SSH Keys. To accomplish this we first need
to move the default SSH Keys and reconfigure some new ones.

Lets move the default keys:
cd /etc/ssh/
mkdir defaultsshkeys
mv ssh_host_* defaultsshkeys/

Now we need to get some new keys:
dpkg-reconfigure openssh-server




Enabling Sound

Lets enable sound because by default this is disabled:
apt-get install alsa-utils –y

Customize Your Pentest Lab – HackingLoops.com



Firefox

Firefox is a must have browser that we will need later. Its very similar to the default
browser(Iceweasel) in Kali linux but doesn’t have all the features. The thing is in
order to get Firefox we have to uninstall Iceweasel first. So if you want to do that
and I suggest you do:

apt-get remove Iceweasel



Our sources list that we updated later needs to be updated again so that we know
where to get our install from:

echo -e "\ndeb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt
all main" | tee -a /etc/apt/sources.list > /dev/null



We need the GPG key as well:

apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29




Lets update:

apt-get update



Finally lets install it:

apt-get install firefox-mozilla-build







Customize Your Pentest Lab – HackingLoops.com



You should now see Firefox in your menu:

Customize Your Pentest Lab – HackingLoops.com

Você também pode gostar