Exploit Code Released For the Apache Server Address Disclosure Vulnerability
18 Aug. 2001
Summary
A security vulnerability in Apache web server results in the disclosure of the server's internal address.
The problem occurs when a HTTP request containing a directory is submitted to the server. If the directory does not contain a trailing '/' character, the server returns a 3xx redirection error code indicating that further action must be taken in order to fulfill the request. When this occurs, a 'Location' response-header containing the address of the server is returned as part of the response.
In a situation where the request is redirected to the server behind a firewall, this could lead to the disclosure of the server's internal network address.
Credit:
The information has been provided by Magnum Johnson.
Vulnerable systems:
Apache Group Apache 1.3
Apache Group Apache 1.2
Apache Group Apache 1.0
Exploit code:
/* Exploit for the Apache Server Address Disclosure Vulnerability
**
** by: magnum
** magnum@fuckthat.org
** http://fuckthat.org
**
** A vulnerability has been discovered in Apache web server that may
** result in the disclosure of the server's address.
**
** The problem occurs when a HTTP request containing the URI of a directory
** is submitted to the server. If the URI does not contain a trailing '/'
** character, the server returns a 3xx redirection error code indicating that
** further action must be taken in order to fulfill the request. When this
** occurs, a 'Location' response-header containing the address of the server
** is returned as part of the response.
**
** In a situation where the request is redirected to the server behind a
** firewall, this could lead to the disclosure of the server's internal
** network address.
**
** --SNIP--
**
** As it was put so well in that explanation, an attacker could exploit this
** vulnerability to gain important information that could help you or an
** attacker to eventually compromise a network or server that resides behind
** an ipchains/NAT firewall, routing firewall, or many other different kinds
** of bastion hosts.
**
** Enjoy :)
**
*/