RWhoisd log()函数远程格式化字符串漏洞 发布信息 -------- 发布日期: 2001年11月22日 发 现 者: By NetGuard Security Team alert7 (alert7@netguard.com.cn) 主 页: http://www.netguard.com.cn/ bugtraq id: 3571 简单描述 -------- RWhoisd所有版本(包括最新的rwhoisd-1.5.7-2)存在一个潜在的 远程格式化字符串问题。攻击者能够利用这个漏洞执行任意代码。 受影响的软件版本和平台 ------------------- RWhoisd所有版本 细节 ---- 在例子的rwhoisd.conf配置文件中 # use-syslog: whether or not to log using syslog; # if it isn't logging to syslog, it attempts to log to files (see below) $ normal default is YES use-syslog: NO 但在它的注释中建议用户打开syslog的,所以syslog打开着的可能性很大, 这就导致了一个远程的格式化串问题。 在log()函数中存在如下调用 syslog(syslog_level,message); 而这里的message又是可以由用户控制的。所以将产生格式化串问题。 测试演示 ------- [alert7@redhat62 ]# telnet 0 4321 Trying 0.0.0.0... Connected to 0. Escape character is '^]'. %rwhois V-1.5:003fff:00 localhost.localdomain (by Network Solutions, Inc. V-1.5.7-1) %p%p%p%p <------input %error 230 No Objects Found Connection closed by foreign host. [alert7@redhat62 ]# tail /var/log/messages Nov 21 13:04:06 redhat62 rwhoisd[27697]: CLIENT:127.0.0.1: query: 0xbffff8b00xbffff7fc0x808def80x806be4c Nov 21 13:04:06 redhat62 rwhoisd[27697]: CLIENT:127.0.0.1: query response: 0 hits 临时解决办法 ------------ 暂时关闭4321 port,等待厂商补丁 厂商信息 -------- 我们在2001年11月21日已经通知了厂商 厂商主页: http://www.rwhois.net/ 关于Netgaurd ------------ 北京华泰网安信息技术有限公司(China Net Security Technology Corporation)是 一家专业从事计算机网络与信息安全服务、安全产品研发和销售、安全工程系统集成、计算机 网络与信息安全研究、咨询、培训、安全认证等业务的高新技术企业,是国内领先的计算机网 络与信息安全解决方案和服务提供商。 版权所有 2001 http://www.netguard.com.cn,欢迎转载,但必须保留版权信息。