Files
metasploit-gs/documentation/modules/exploit/windows/ftp/wing_ftp_admin_exec.md
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
2.1 KiB
Markdown
Raw Normal View History

2020-01-16 11:57:52 -05:00
## Description
2018-12-07 03:02:37 +08:00
This module exploits the embedded Lua interpreter in the admin web interface for versions 3.0.0 and above of Wing FTP Server. When supplying a specially crafted HTTP POST request an attacker can use os.execute() to execute arbitrary system commands on the target with SYSTEM privileges.
2018-12-07 03:02:37 +08:00
Only versions of Wing FTP Server after 3.0.0 ship with the Lua interpreter and the admin web interface. This makes versions < 3.0.0 presumably NOT vulnerable to this exploit, simply due to the fact that they do not have the capability execute commands this way.
2018-12-07 03:02:37 +08:00
2019-02-10 14:26:13 +08:00
Versions > 4.3.8 handle URL encoding differently compared to versions <= 4.3.8. Encoding the PowerShell payload with base64 allows it to work. CmdStager fails, however, as it cannot simply be base64 encoded like PowerShell. It is recommended to run `check` first before exploiting to get a feel for the vulnerable app. The module has a built-in check to detect `PowerShell` first before continuing with the exploit. It does so by calling `os.getenv()` to get environment variables, then searching for `PowerShell` case-insensitively. It will fall back to using `CmdStager` if `PowerShell` is absent and the version is <= 4.3.8.
The full changelog for Wing FTP Server can be found at [https://www.wftpserver.com/serverhistory.htm].
2018-12-07 03:02:37 +08:00
Information about the admin web interface can be found at [https://www.wftpserver.com/help/ftpserver/index.html?administrator_console.htm].
2018-12-07 03:02:37 +08:00
2020-01-16 11:57:52 -05:00
## Vulnerable Application
All versions of Wing FTP Server from 3.0.0 and up are presumed vulnerable.
2019-02-10 14:26:13 +08:00
Upgraded module has been tested on a Windows Server 2019 Datacenter x64 with the following versions:
- Wing FTP Server 4.3.8
2019-02-10 14:26:13 +08:00
- Wing FTP Server 5.1.3
- Wing FTP Server 6.0.1
- Wing FTP Server 6.0.2
2019-02-10 14:26:13 +08:00
- Wing FTP Server 6.0.3
2019-02-10 14:26:13 +08:00
Original module was been tested on Windows 7 SP1 and Windows 8.1 with the following versions:
2018-12-07 03:02:37 +08:00
- Wing FTP Server 4.3.6
- Wing FTP Server 4.3.8
2020-01-16 11:57:52 -05:00
## Verification Steps
2018-12-07 03:02:37 +08:00
- [x] Start `msfconsole`
- [x] `use exploit/windows/ftp/wing_ftp_admin_exec`
- [x] `set RHOST <target-ip>`
- [x] `set USERNAME <valid-username>`
- [x] `set PASSWORD <valid-password>`
- [x] `exploit`
- [x] **Verify** that you get a shell