what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

cgichk1_36.c

cgichk1_36.c
Posted Jan 4, 2000
Authored by su1d sh3ll

Y2k fix for cgicgk-1_35, which would return false positives on any server with a date of 2000.

tags | cgi
systems | unix
SHA-256 | 85000facff02b8aebee3f019526d12443276a547a4db48d22bc22c7438b71837

cgichk1_36.c

Change Mirror Download

/* Quick fix for Y2K bug by Evil_Ripper (axs/whatever you call me) on
Mon Jan 3 19:08:06 GMT 2000. <axs@freeuk.com>
#hackers_ireland@DALNet */

/* ---------------------------------------------------------------------- */
/* CGI scanner v1.35, m0dify and recode by su1d sh3ll //UnlG 1999 */
/* Tested on Slackware linux with kernel 2.0.35;RH 5.2(2.0.36); */
/* FreeBSD 2.2.2-3.1;IRIX 5.3 */
/* Source c0de by [CKS & Fdisk] */
/* gr33tz to: Packet St0rm and Ken, ADM crew, ech0 security and CKS, ch4x,*/
/* el8.org users, #c0de, rain.forest.puppy/[WT], MnemoniX , */
/* hypoclear of lUSt,codex ;-) , K.A.L.U.G. */
/* fuck to: www.hackzone.ru , HDT... CHC fuck u 2 , llamaz */
/* NATO and bill klinton <---- double fuck! :-) huh */
/* c0ming s00n: add-on for CGI scanner - for scan "C" class subnet & logs */
/* -----------------------------------------------[10:01 17.05.99 UnlG]- */

#include <fcntl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <netdb.h>
#include <ctype.h>
#include <arpa/nameser.h>
#include <sys/stat.h>
#include <strings.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/socket.h>

void main(int argc, char *argv[])
{
int sock,debugm=0;
struct in_addr addr;
struct sockaddr_in sin;
struct hostent *he;
unsigned long start;
unsigned long end;
unsigned long counter;
char foundmsg[] = "200";
char *cgistr;
char buffer[1024];
int count=0;
int numin,suxes=0;
char cgibuff[20];
char *buff[100]; /* Don't u think 100 is enough? ;-)*/
char *cginame[100]; /* Don't u think 100 is enough? */
buff[1] = "GET /cgi-bin/unlg1.1 HTTP/1.0\n\n"; /* v0rt-fu when u modify source, check this first line.... that's my 8-) */
buff[2] = "GET /cgi-bin/rwwwshell.pl HTTP/1.0\n\n";
buff[3] = "GET /cgi-bin/phf HTTP/1.0\n\n";
buff[4] = "GET /cgi-bin/Count.cgi HTTP/1.0\n\n";
buff[5] = "GET /cgi-bin/test-cgi HTTP/1.0\n\n";
buff[6] = "GET /cgi-bin/nph-test-cgi HTTP/1.0\n\n";
buff[7] = "GET /cgi-bin/nph-publish HTTP/1.0\n\n";
buff[8] = "GET /cgi-bin/php.cgi HTTP/1.0\n\n";
buff[9] = "GET /cgi-bin/handler HTTP/1.0\n\n";
buff[10] = "GET /cgi-bin/webgais HTTP/1.0\n\n";
buff[11] = "GET /cgi-bin/websendmail HTTP/1.0\n\n";
buff[12] = "GET /cgi-bin/webdist.cgi HTTP/1.0\n\n";
buff[13] = "GET /cgi-bin/faxsurvey HTTP/1.0\n\n";
buff[14] = "GET /cgi-bin/htmlscript HTTP/1.0\n\n";
buff[15] = "GET /cgi-bin/pfdispaly.cgi HTTP/1.0\n\n";
buff[16] = "GET /cgi-bin/perl.exe HTTP/1.0\n\n";
buff[17] = "GET /cgi-bin/wwwboard.pl HTTP/1.0\n\n";
buff[18] = "GET /cgi-bin/www-sql HTTP/1.0\n\n";
buff[19] = "GET /cgi-bin/view-source HTTP/1.0\n\n";
buff[20] = "GET /cgi-bin/campas HTTP/1.0\n\n";
buff[21] = "GET /cgi-bin/aglimpse HTTP/1.0\n\n";
buff[22] = "GET /cgi-bin/glimpse HTTP/1.0\n\n";
buff[23] = "GET /cgi-bin/man.sh HTTP/1.0\n\n";
buff[24] = "GET /cgi-bin/AT-admin.cgi HTTP/1.0\n\n";
buff[25] = "GET /cgi-bin/filemail.pl HTTP/1.0\n\n";
buff[26] = "GET /cgi-bin/maillist.pl HTTP/1.0\n\n";
buff[27] = "GET /cgi-bin/jj HTTP/1.0\n\n";
buff[28] = "GET /cgi-bin/info2www HTTP/1.0\n\n";
buff[29] = "GET /cgi-bin/files.pl HTTP/1.0\n\n";
buff[30] = "GET /cgi-bin/finger HTTP/1.0\n\n";
buff[31] = "GET /cgi-bin/bnbform.cgi HTTP/1.0\n\n";
buff[32] = "GET /cgi-bin/survey.cgi HTTP/1.0\n\n";
buff[33] = "GET /cgi-bin/AnyForm2 HTTP/1.0\n\n";
buff[34] = "GET /cgi-bin/textcounter.pl HTTP/1.0\n\n";
buff[35] = "GET /cgi-bin/classifieds.cgi HTTP/1.0\n\n";
buff[36] = "GET /cgi-bin/environ.cgi HTTP/1.0\n\n";
buff[37] = "GET /cgi-bin/wrap HTTP/1.0\n\n";
buff[38] = "GET /cgi-bin/cgiwrap HTTP/1.0\n\n";
buff[39] = "GET /cgi-bin/guestbook.cgi HTTP/1.0\n\n";
buff[40] = "GET /cgi-bin/edit.pl HTTP/1.0\n\n";
buff[41] = "GET /cgi-bin/perlshop.cgi HTTP/1.0\n\n";
buff[42] = "GET /_vti_inf.html HTTP/1.0\n\n";
buff[43] = "GET /_vti_pvt/service.pwd HTTP/1.0\n\n";
buff[44] = "GET /_vti_pvt/users.pwd HTTP/1.0\n\n";
buff[45] = "GET /_vti_pvt/authors.pwd HTTP/1.0\n\n";
buff[46] = "GET /_vti_pvt/administrators.pwd HTTP/1.0\n\n";
buff[47] = "GET /_vti_bin/shtml.dll HTTP/1.0\n\n";
buff[48] = "GET /_vti_bin/shtml.exe HTTP/1.0\n\n";
buff[49] = "GET /cgi-dos/args.bat HTTP/1.0\n\n";
buff[50] = "GET /cgi-win/uploader.exe HTTP/1.0\n\n";
buff[51] = "GET /cgi-bin/rguest.exe HTTP/1.0\n\n";
buff[52] = "GET /cgi-bin/wguest.exe HTTP/1.0\n\n";
buff[53] = "GET /scripts/issadmin/bdir.htr HTTP/1.0\n\n";
buff[54] = "GET /scripts/CGImail.exe HTTP/1.0\n\n";
buff[55] = "GET /scripts/tools/newdsn.exe HTTP/1.0\n\n";
buff[56] = "GET /scripts/fpcount.exe HTTP/1.0\n\n";
buff[57] = "GET /cfdocs/expelval/openfile.cfm HTTP/1.0\n\n";
buff[58] = "GET /cfdocs/expelval/exprcalc.cfm HTTP/1.0\n\n";
buff[59] = "GET /cfdocs/expelval/displayopenedfile.cfm HTTP/1.0\n\n";
buff[60] = "GET /cfdocs/expelval/sendmail.cfm HTTP/1.0\n\n";
buff[61] = "GET /iissamples/exair/howitworks/codebrws.asp HTTP/1.0\n\n";
buff[62] = "GET /iissamples/sdk/asp/docs/codebrws.asp HTTP/1.0\n\n";
buff[63] = "GET /msads/Samples/SELECTOR/showcode.asp HTTP/1.0\n\n";
buff[64] = "GET /search97.vts HTTP/1.0\n\n";
buff[65] = "GET /carbo.dll HTTP/1.0\n\n"; /* we have at archive about 70 CGi, rule? ;-) */

cginame[1] = "UnlG - backd00r ";
cginame[2] = "THC - backd00r ";
cginame[3] = "phf..classic :) ";
cginame[4] = "Count.cgi ";
cginame[5] = "test-cgi ";
cginame[6] = "nph-test-cgi ";
cginame[7] = "nph-publish ";
cginame[8] = "php.cgi ";
cginame[9] = "handler ";
cginame[10] = "webgais ";
cginame[11] = "websendmail ";
cginame[12] = "webdist.cgi ";
cginame[13] = "faxsurvey ";
cginame[14] = "htmlscript ";
cginame[15] = "pfdisplay ";
cginame[16] = "perl.exe ";
cginame[17] = "wwwboard.pl ";
cginame[18] = "www-sql ";
cginame[19] = "view-source ";
cginame[20] = "campas ";
cginame[21] = "aglimpse ";
cginame[22] = "glimpse ";
cginame[23] = "man.sh ";
cginame[24] = "AT-admin.cgi ";
cginame[25] = "filemail.pl ";
cginame[26] = "maillist.pl ";
cginame[27] = "jj ";
cginame[28] = "info2www ";
cginame[29] = "files.pl ";
cginame[30] = "finger ";
cginame[31] = "bnbform.cgi ";
cginame[32] = "survey.cgi ";
cginame[33] = "AnyForm2 ";
cginame[34] = "textcounter.pl ";
cginame[35] = "classifields.cgi";
cginame[36] = "environ.cgi ";
cginame[37] = "wrap ";
cginame[38] = "cgiwrap ";
cginame[39] = "guestbook.cgi ";
cginame[40] = "edit.pl ";
cginame[41] = "perlshop.cgi ";
cginame[42] = "_vti_inf.html ";
cginame[43] = "service.pwd ";
cginame[44] = "users.pwd ";
cginame[45] = "authors.pwd ";
cginame[46] = "administrators ";
cginame[47] = "shtml.dll ";
cginame[48] = "shtml.exe ";
cginame[49] = "args.bat ";
cginame[50] = "uploader.exe ";
cginame[51] = "rguest.exe ";
cginame[52] = "wguest.exe ";
cginame[53] = "bdir - samples ";
cginame[54] = "CGImail.exe ";
cginame[55] = "newdsn.exe ";
cginame[56] = "fpcount.exe ";
cginame[57] = "openfile.cfm ";
cginame[58] = "exprcalc.cfm ";
cginame[59] = "dispopenedfile ";
cginame[60] = "sendmail.cfm ";
cginame[61] = "codebrws.asp ";
cginame[62] = "codebrws.asp 2 ";
cginame[63] = "showcode.asp ";
cginame[64] = "search97.vts ";
cginame[65] = "carbo.dll ";
if (argc<2)
{
printf("\n [-- CGI Checker 1.35. Modified by su1d sh3ll //UnlG --]");
printf("\nusage : %s host ",argv[0]);
printf("\n Or : %s host -d for debug mode\n\n",argv[0]);
exit(0);
}
if (argc>2)
{
if(strstr("-d",argv[2]))
{
debugm=1;
}
}
if ((he=gethostbyname(argv[1])) == NULL)
{
herror("gethostbyname");
exit(0);
}
printf("\n\n\t [CKS & Fdisk]'s CGI Checker - modify by su1d sh3ll //UnlG\n\n\n");
start=inet_addr(argv[1]);
counter=ntohl(start);
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(80); /* <--- if u want scan another port change it */
/* codex when u again change this code pls call proggi like this 1.35.1 or 1.35.[a..z] ;-) */
if (connect(sock, (struct sockaddr*)&sin, sizeof(sin))!=0)
{
perror("connect");
}
printf("\n\n\t [ Press any key to check out the httpd version...... ]\n");
getchar(); /* CKS sorry, but ur new piece of code don't work :-( */
send(sock, "HEAD / HTTP/1.0\n\n",17,0);
recv(sock, buffer, sizeof(buffer),0);
printf("%s",buffer);
close(sock);
printf("\n\t [ Press any key to search 4 CGI stuff...... ]\n");
getchar();
while(count++ < 65) /* huh! 65 cgi..... no secur1ty in th1s w0rld ;-)*/
{
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(80);
if (connect(sock, (struct sockaddr*)&sin, sizeof(sin))!=0)
{
perror("connect");
}

printf("Searching for %s : ",cginame[count]);
for(numin=0;numin < 20;numin++)
{
cgibuff[numin] = '\0';
}
send(sock, buff[count],strlen(buff[count]),0);
recv(sock, cgibuff, sizeof(cgibuff),0);
cgistr = strstr(cgibuff,foundmsg);

if( cgistr != NULL)
{
printf("Found !! ;)\n");++suxes;
}
else printf("Not Found\n");

if(debugm==1)
{
printf("\n\n ------------------------\n %s \n ------------------------\n",cgibuff);
printf("Press any key to continue....\n");
getchar();
}

close(sock);
}
if (suxes)
{
printf("...have a nice hack... ;-)\n");
}
else printf ("...n0thing wr0ng on server..... hmm...sucks!\n");
}
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close