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: | [NT] Fastream NETFile FTP/Web Server Directory Traversal |
|---|---|
| Date: | 27 Apr 2005 17:43:19 +0200 |
The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com - - promotion The SecuriTeam alerts list - Free, Accurate, Independent. Get your security news from a reliable source. http://www.securiteam.com/mailinglist.html - - - - - - - - - Fastream NETFile FTP/Web Server Directory Traversal ------------------------------------------------------------------------ SUMMARY <http://www.fastream.com/netfileserver.htm> Fastream NETFile FTP/Web Server is "a secure FTP server and Web server combined together in one program. It claims to be the 'easiest to setup and administer server' on the Internet". A directory traversal vulnerability was found in NETFile FTP's web interface. This vulnerability may be exploited by a user with file upload/delete privileges to upload/delete files outside the FTP root, or by a user with directory create/remove privileges to create/remove directories outside the FTP root. DETAILS Vulnerable Systems: * Fastream NETFile FTP/Web Server version 7.4.6 Immune Systems: * Fastream NETFile FTP/Web Server version 7.5.0 Beta 7 The problem lies in the insufficient filtering of the filename input parameter before it is used. When the request is received, the value of the filename parameter is first concatenated to the name of the FTP root directory. Suppose the FTP root is C:\NFRoot, the concatenated filename will be C:\NFRoot\.../..//a/.../yyy.txt. This concatenated filename is then passed to the GetFullPathName() Windows API function and the resulting output is C:\NFRoot\a\..\yyy.txt. This output satisfies a directory validation check since it lies within the FTP root. As a comparison, if the value of filename is ../..//a/.../yyy.txt (using two preceding dots instead of three), the resulting output from GetFullPathName() will be C:\a\..\yyy.txt. This will fail the directory validation check. If the output from GetFullPathName() satisfies the directory validation check, the AbsolutePath function will be called. This function simplifies the original supplied filename by removing directory traversal sequences. For example, the filename /dir1/dir2/../file.txt will be simplified to /dir1/file.txt. i.e. A loop will remove sequences of the type "/dirname/..". To exploit this vulnerability, the value of filename must satisfy the directory validation check, and must contain directory traversal sequences that can survive the pathname simplification process. The filenames used in the examples above have been crafted to meet both criteria. The simplification process is illustrated below. All forward slashes will be converted to backward slashes by a call to UnixPathToDosPath before AbsolutePath is called. ..\..\\a\...\yyy.txt // initial \a\...\yyy.txt // after first pass .\yyy.txt // after second pass The loop will terminate when the sequence "\.." does not appear in the string. Hence, "..\yyy.txt" results. Workaround: Disable the web interface or allow only trusted users to upload/delete files and create/remove directories. Disclosure Timeline: 17 Apr 05 - Vulnerability Discovered 21 Apr 05 - Initial Vendor Notification 21 Apr 05 - Initial Vendor Reply 21 Apr 05 - Vendor Provided 7.5.0 Beta 6 for Testing 21 Apr 05 - Informed Vendor that File-Upload Directory Traversal is not Fixed 22 Apr 05 - Vendor Provided 7.5.0 Beta 7 for Testing 25 Apr 05 - Public Release ADDITIONAL INFORMATION The information has been provided by <mailto:chewkeong@security.org.sg> Chew Keong TAN. The original article can be found at: <http://www.security.org.sg/vuln/netfileftp746.html> http://www.security.org.sg/vuln/netfileftp746.html ======================================== This bulletin is sent to members of the SecuriTeam mailing list. To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com ==================== ==================== DISCLAIMER: The information in this bulletin is provided "AS IS" without warranty of any kind. In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [UNIX] Buffer Overflow in GOCR, SecuriTeam |
|---|---|
| Next by Date: | [EXPL] NetTerm's NetFTPd Buffer Overflow (USER, Exploit), SecuriTeam |
| Previous by Thread: | [UNIX] Buffer Overflow in GOCR, SecuriTeam |
| Next by Thread: | [EXPL] NetTerm's NetFTPd Buffer Overflow (USER, Exploit), SecuriTeam |
| Indexes: | [Date] [Thread] [Top] [All Lists] |