Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | iDEFENSE Security Advisory 09.30.04 - Samba Arbitrary File Access Vulnerability |
|---|---|
| Date: | Thu, 30 Sep 2004 15:19:20 -0400 |
Samba Arbitrary File Access Vulnerability iDEFENSE Security Advisory 09.30.04 www.idefense.com/application/poi/display?id=146&type=vulnerabilities September 30, 2004 I. BACKGROUND Samba is an Open Source/Free Software suite that provides seamless file and print services to SMB/CIFS clients. II. DESCRIPTION Remote exploitation of an input validation vulnerability in Samba allows attackers to access files and directories outside of the specified share path. Each file and directory name passed into Samba is converted and checked with the functions unix_convert() and check_name(). The main purpose of the unix_convert() routine is to convert names from the DOS namespace to Unix namespace. It calls unix_clean_name(), which in turn removes double slashes, leading './' characters and '..' directory-traversal characters. check_name() does any final checks necessary to confirm the validity of the converted filename and calls reduce_name(), which in turn calls unix_clean_name() for a second time. The end result allows for an attacker to specify the realpath of any file on the computer. Example: /./////etc is passed to unix_clean_name(). It becomes /.///etc. The leading slash is then trimmed off to make .///etc. It is then passed to unix_clean_name() again. The resulting string is /etc, which is an absolute path on the system. III. ANALYSIS Successful exploitation allows remote attackers to bypass the specified share restrictions to gain read, write and list access to files and directories under the privileges of the user. In situations where a public share is available, the attack can be performed by unauthenticated attackers. An attacker does not need exploit code to exploit this vulnerability. The smbclient program can be used to request/write/list files using the "get", "put" and "dir" commands, respectively. IV. DETECTION iDEFENSE has confirmed that Samba versions 3.0.2 and 2.2.9 are vulnerable. It is suspected that all versions of Samba are vulnerable. V. WORKAROUND Only allow trusted users/hosts to connect to samba shares. VI. VENDOR RESPONSE Samba 2.2.12 upgrade for Samba 2.2.x: http://us4.samba.org/samba/ftp/samba-2.2.12.tar.gz Samba 3.0.5 patch: http://us4.samba.org/samba/ftp/patches/security/samba-3.0.5-reduce_name. patch Samba 3.0.7 is not vulnerable. VII. CVE INFORMATION The Common Vulnerabilities and Exposures (CVE) project has assigned the names CAN-2004-0815 to these issues. This is a candidate for inclusion in the CVE list (http://cve.mitre.org), which standardizes names for security problems. VIII. DISCLOSURE TIMELINE 09/22/2004 Initial vendor notification 09/22/2004 iDEFENSE clients notified 09/22/2004 Initial vendor response 09/30/2004 Coordinated public disclosure IX. CREDIT Karol Wiesek is credited with this discovery. Get paid for vulnerability research http://www.idefense.com/poi/teams/vcp.jsp X. LEGAL NOTICES Copyright (c) 2004 iDEFENSE, Inc. Permission is granted for the redistribution of this alert electronically. It may not be edited in any way without the express written consent of iDEFENSE. If you wish to reprint the whole or any part of this alert in any other medium other than electronically, please email customerservice@idefense.com for permission. Disclaimer: The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an AS IS condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information.
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Next by Date: | Patch available for critical IBM DB2 Universal Database flaws, NGSSoftware Insight Security Research |
|---|---|
| Next by Thread: | Patch available for critical IBM DB2 Universal Database flaws, NGSSoftware Insight Security Research |
| Indexes: | [Date] [Thread] [Top] [All Lists] |