Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2019-14514 PoC — Microvirt MEmu 操作系统命令注入漏洞

Source
Associated Vulnerability
Title:Microvirt MEmu 操作系统命令注入漏洞 (CVE-2019-14514)
Description:Microvirt MEmu是一款Android模拟器。 Microvirt MEmu 7.0.2之前版本中存在操作系统命令注入漏洞。攻击者可借助shell元字符利用该漏洞执行任意命令。
Description
Remote code execution in Microvirt MEmu
Readme
**CVEID**: CVE-2019-14514

**Name of the affected product(s) and version(s)**: Microvirt MEmu (all versions prior to 7.0.2)

**Problem type**: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

---

**Summary**

MEmu is an Android emulator for Windows. During our tests, we have found an open TCP port which could be exploited to gain code execution with root privileges.
All Microvirt MEmu versions prior to 7.0.2 feature a vulnerable binary which listens on port 21509. An attacker could gain remote code execution with root privileges on an emulated Android system by sending crafted messages containing special characters used as command delimiters in Unix shells.
 
**Description**
 
```/system/bin/systemd``` binary (not related to Freedesktop systemd init system) is run by the root user and listens for commands on port 21509. If a command starting with installer:uninstall is sent, attacker-controlled input will be inserted into a shell command template and passed to /system/bin/sh without verification or escaping. This means that a remote attacker could insert special characters like ```;```, ```&&``` or ```||``` to send his own shell commands which will be executed on the emulated system with root privileges.
 
**Reproduction**
 
```echo "installer:uninstall;[shell_command_to_execute]" | nc [emulator_ip] 21509```
 
The emulator should execute the command and then reboot.
 
**Remedy**

Update MEmu to version 7.0.2 or later.
File Snapshot

[4.0K] /data/pocs/6b169fd5f796da75ab8cb8c8cf648e8103aac9d0 ├── [ 137] exploit.sh ├── [ 143] local_exploit.sh └── [1.5K] README.md 0 directories, 3 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.