We are going give you a introduction on how to setup your own hacking lab. Sounds crazy! right? Well it is.
Virtualization is basically creating your own virtual based real life computer resource like servers, storage and networks.
These are machines created in your own computer which have same properties as your main machine but also have some additional properties and advantages too.
Each VM runs its own operating system so you can basically have linux (VM) running on your windows pc (Main machine). It behaves as a separate machine even though it is working in your main machine.
VMs access hardware through Hypervisor.
Hypervisor creates virtual physical resources from borrowing physical resources from your own pc (main machine) and allocates it to the VM. So the VMs can use only the allocated physical resources( like RAM, CPU, Storage).
There are many Virtualization software but for todays event we would be using Oracle Virtual Box.
The installation is shown in the prerequisite of the event.
An image is a preconfigured operating system that you can use to create VMs. You don’t have to do any configuration as everything is ready for you. To understand this we can use the analogy of cup noodles, as everything is ready for you and you just have to pour hot water for it to get ready. In the same way you just need to install it and add it to your Hypervisor without any additional setup/Configuration.
An image of an operating system can be downloaded using there official website or directly from command line.
For steps on downloading an image refer to the prerequisite of the event.
Any OS image is fine but for todays event we would be using Kali Linux image file.
New
.Name
: Name your operating system as per your choice.Type
: Select Linux
(as Kali is a Linux OS).Version
: Select Dabian (64-bit)
from the drop down menu.ISO-Image
: Browse and select the Kali image downloadedNext
.Guest Additions
box.Next
.Base Memory
2048MB is fine and Processors
you can set in between 2-4, in todays setup we use 3. Click on Next
.Create a Virtual Hard Disk Now
is selected. Choose the disk size between 20GB-30GB for optimal functioning of the VM. Click on Next
.Finish
to finish the configuration.Settings
>> Storage
>> Click on the name of your VM >> In Optical Drive
drop down menu select IDE Secondary Device 0
.Start
.Graphical install
.continue
.Congrats, you have successfully instlled a VM on your main machine.
While you are configuring your hypervisor, you might come across networking settings.
Network settings define the connectivity between VMs (interconnectivity of VMs).
You can access this in Virtual box by clicking on `Settings`>> `Network`>> Required `Adapter X`>> Select required networking options through the drop menu from `Attached to`>> Click on `ok`.
10.10.10.190
and a main machine which has VMs with access to the internet through the router. Now if the hypervisor is in NAT mode, consider the VMs access the internet through the hypervisor that is the hypervisor acts like a router with a IP address other than 10.10.10.190
and each VM with separate private IP address. Thus, the IP address used by the VMs is completely different from the main machine and any other device.For beginners, it is suggested to use NAT mode as it creates a private network for you work with and even if you mess up somewhere, it only affects your VM and not any other device connected to the router.
The following steps will tell you how to install wsl version 2 (latest version).
wsl
.Install
it.For windows 10 and older:
wsl --install
For windows version below 10, refer here.
wsl --install
again to install the default Linux distribution (Ubuntu) after wsl is installed.
or
wsl
Runs the default distro (by default its ubuntu).
wsl --set-default <distribution_name>
If you have more than one linux distribution on your pc, you can set your desired distro as default using the above command.
wsl --list --online
used to available linux distribution which can be installed for wsl.
wsl --install -d <Distribution_name>
installs the mentioned linux distribution for example
wsl --install -d Debian
will install debian distribution.
wsl --list --verbose
lists the name
of all the distributions available and their active status
(Running/Stopped) along with the version
of wsl on which they are installed.
wsl -t <Distribution name>
will terminate the distro session.
These are the basic commands to get you started. To know more you can refer the official documentation from microsoft website.
Note: To terminate session in wsl you can use exit
command.
PS: In cybersecurity, for learning, you need a vulnerable machine which can be exploited and that is just not possible with wsl as it is a part of your system. So VMs are a much much better way to get into cybersecurity rather than wsl as you can explore/experiment/discard without risking your main machine. So while wsl acts like a subsystem of your main machine but VMs act like different machines virtually hosted on your machine.
In case of any doubts/problem occurred during the setup at any step or after the setup any time, you are free to contact secuRIT on our telegram channel.
In case of any mistakes in any part of the above session please contact any of the admins of our telegram channel.
(Not) The End.