multiple vendor ftpd - Cross-site request forgery

Risk: Medium
Local: No
Remote: Yes
CWE: CWE-352

[ multiple vendor ftpd - Cross-site request forgery ] Author: Maksymilian Arciemowicz Date: - - Written: 03.09.2008 - - Public: 26.09.2008 CVE Ids: CVE-2008-4247 CVE-2008-4242 Risk: Medium Affected Software: This problem has been discovered on OpenBSD 4.3 . - - Affected systems: + OpenBSD + NetBSD + FreeBSD + some linux - - Affected applications: + proFTPd + others - --- 0.Description --- ftpd -- Internet File Transfer Protocol server The ftpd utility is the Internet File Transfer Protocol server process. The server uses the TCP protocol and listens at the port specified with the -P option or in the ``ftp'' service specification; see services(5). Cross-site request forgery, also known as one click attack, sidejacking or session riding and abbreviated as CSRF (Sea-Surf[1]) or XSRF, is a type of malicious exploit of a website whereby unauthorized commands are transmitted from a user the website trusts. Contrary to cross-site scripting (XSS), which exploits the trust a user has for a particular site, cross-site request forgery exploits the trust that a site has for a particular user. - --- 1. ftpd bsd - Cross-site request forgery --- The main problem exists in dividing long command for few others. The problem stems from the fact the use of the loop for(;;) and function fgets(). Example: Command "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' When we try request to ftp deamon via browsers and path is longer 512<, our URL will be split. /* FreeBSD 7.0 */ ftp://cxib@ return result from SYST command: 215 UNIX Type: L8 Version: BSD-199506 /* NetBSD 4.0 */ return result from SYST command: 215 UNIX Type: L8 Version: NetBSD-ftpd 20080609 The situation, can be dangerous, when this bug will be exploited like any CSRF attack. We can use SITE CHMOD command to change file permission or other combinations with ftp commands. Only we need some exploit and luck, that admin will executed exploited url. How to exploit it? 0. Creating some html file with <img> tags <img src="ftp://.....////SITE%20CHMOD%20777%20FILENAME"> ... 1. Give preparing URL for user. Example: will change permision to EXAMPLEFILE when the owner will use this URL. I think, it should be some byte, what inform about overflowing (empty command should nulling this byte). We have diagnosed this issue on BSD systems. Unfortunately, we do not know exactly how many machines can be affected. - --- 2. How to fix --- OpenBSD has been first informed. Fix is avalible on cvs: Thanks for OpenBSD Team. NetBSD: proFTPd: We have informed only BSD developers and proFTPd Team. - --- 3. Credit --- Author: Maksymilian Arciemowicz


Vote for this issue:


Thanks for you vote!


Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.

(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024,


Back to Top