Saturday, March 9, 2013

How To Practice Hacking Without Getting Into Trouble - Part 1 (Hacking Lab)

We all know hacking is illegal. But then, how do we practice? We can practice by setting up a hacking lab.
Here, I will give you directions on how to setup a hacking lab for yourself. 
I wrote an entire tutorial on creating virtual machines etc, but the article got lost somehow, and I am too lazy to write again, so I've copied some of these articles from several sites. Links in the bottom.


Have a look at the advantages of a hacking lab
  •  It's free.You set it up yourself using free tools
  • Everything is done in One system (need at least 3 GB RAM)
  • You can practice hacking anytime.
  • You can install any kind of viruses, spyware or trojan and see how it works, without harming your system.
How are we going to create a lab with a single system?
We are going to set up a hacking environment virtually using VirtualBox . You can also use VMware, but Virtualbox is opensource, free and simple to use. What Virtualbox does is, it creates multiple virtual operating  systems in your single laptop. The operating systems created in Virtualbox are similar to a real one in every aspect except for the fact that it is Virtual, i.e no hardware.

Our virtual network is going to look like this

We need
  • Virtual box ( www.virtualbox.org) 
  • Windows XP (ISO file) ; Our target machine
  • Backtrack  (ISO file)   Our attacker machine
Firstly, visit this page and learn to  configure the Guest OS in VirtualBox .
https://www.virtualbox.org/manual/UserManual.html
Install VirtualBox in your main computer. After that, follow the following steps.
Set Up the Target system:
Now we have to set up the target system.  Install the Windows XP in VirtualBox from the ISO  file.  After the install is done, disable the Windows XP Firewall so that it will be more vulnerable.

Set up your PenTesting System:
Install Backtrack in Virtualbox. Backtrack is an excellent penetration testing distribution  that has a huge collection of ready to use of hacking tools .  We will hack the target (XP) system with it.


Change the Network Settings so that they can communicate :
Step 1:
Right Click on The XP machine
Select the Network Tab

Now you can see the "Attached to" option menu.
By default, its NAT. Use NAT when you want to surf the internet inside the VM. However, in our case, set it to "Host Only Adapter".


Do the same thing for Backtrack

Step 3:


Now run both the  operating systems .

Finding the IP address of Target System:
Open Windows XP
Run the cmd and type ipconfig
This will show the ip address of XP. It will be 192.168.56.101 by default. You can change it in the settings within XP. When you get to part two, you may need to change the IP address.

Hacking with Attacker  System:
Open a terminal in backtrack and type 
ping 192.168.56.101
You should get a reply. If you don't get a reply, check the network configuration in VirtualBox.

In Part 2, we will use Metasploit to hack the Victim machine

If you have any questions, post them in the comment section.

Here are few links of reference

12 comments:

  1. Good tutorial. keep it up

    ReplyDelete
  2. Muhaib Ur Rehman KhanMay 6, 2014 at 7:52 PM

    i cannot that how would i do pllz some one tellme i want to this advance things

    ReplyDelete
  3. Minthang SitlhouMay 13, 2014 at 4:33 PM

    The tutorial is great but it needs more refining.
    Waiting for your part 2.

    ReplyDelete
  4. can you use kali linux IOS as the target and attacker. instead of having two different operating systems?

    ReplyDelete
  5. Kali is by design an attacker Operating System. It cannot be the victim. Windows computers are almost always vulnerable and there are many publicly available exploits. Hence, Windows has to be victim

    ReplyDelete
  6. Nice tutorial thx :)

    ReplyDelete
  7. Is the windows 8 OS catered for?

    ReplyDelete
  8. The same process applies to windows 8 as well.
    Windows 8 has its own set of vulnerabilities. You can google the vulnerabilities and use them in metasploit

    ReplyDelete
  9. Actually, Part 2 is already out.

    http://www.gangte.net/2013/03/how-to-practice-hacking-without-getting_30.html

    ReplyDelete
  10. Hi just wanna say great tutorial, i just wanna ask you something, i followed all the steps on here, but when i boot up xp sp2 i dont have any network, tried 3 different versions of xp and lot more, would love a response! peace

    ReplyDelete
  11. You have to follow step 1 correctly, that is, set the network to "Host Only Adapter" in your xp machine. any version is fine. once you've done that, your xp machine will have IP of 192.168.X.X. You can now ping your base machine(where virtual box is installed)

    ReplyDelete
  12. Kali is Backtrack

    ReplyDelete