Vulnerability Note VU#150227
HTTP proxy default configurations allow arbitrary TCP connections
Multiple vendors' HTTP proxy services use insecure default configurations that could allow an attacker to make arbitrary TCP connections to internal hosts or to external third-party hosts.
HTTP proxy services commonly support the HTTP CONNECT method, which is designed to create a TCP connection that bypasses the normal application layer functionality of the proxy service. Typically, the HTTP CONNECT method is used to tunnel HTTPS connections through an HTTP proxy. The proxy service does not decrypt the HTTPS traffic, as this would violate the end-to-end security model used by TLS/SSL.
The HTTP CONNECT method is described in an expired IETF Internet-Draft written in 1998 by Ari Luotonen. This document clearly explains the security risks associated with the HTTP CONNECT method:
6. Security Considerations
The CONNECT tunneling mechanism is really a lower-level function than
the rest of the HTTP methods, kind of an escape mechanism for saying
that the proxy should not interfere with the transaction, but merely
forward the data. In the case of SSL tunneling, this is because the
proxy should not need to know the entire URI that is being accessed
(privacy, security), only the information that it explicitly needs
(hostname and port number) in order to carry out its part.
Due to this fact, the proxy cannot necessarily verify that the
protocol being spoken is really what it is supposed to tunnel (SSL
for example), and so the proxy configuration should explicitly limit
allowed connections to well-known ports for that protocol (such as
443 for HTTPS, 563 for SNEWS, as assigned by IANA, the Internet
Assigned Numbers Authority).
Ports of specific concern are such as the telnet port (port 23), SMTP
port (port 25) and many UNIX specific service ports (range 512-600).
Allowing such tunnelled connections to e.g. the SMTP port might
enable sending of uncontrolled E-mail ("spam").
Many vendors' HTTP proxy services are configured by default to listen on all network interfaces and to allow HTTP CONNECT method tunnels to any TCP port. A proxy may also allow the GET method with a crafted HTTP 1.1 Host request-header and the POST method to be used to create arbitrary TCP connections. Other HTTP methods (PUT) and FTP commands (USER/PASS, SITE, OPEN) can also be used to make arbitrary TCP connections through proxy services. SOCKS proxies suffer from similar insecure default configuration vulnerabilities, as do products that provide FTP proxy services.
Since most proxy services do not inspect application layer data in an HTTP CONNECT method tunneled connection, almost any TCP-based protocol may be forwarded through the proxy service. This creates an additional vulnerability in the case of HTTP anti-virus scanners and content filters that do not check the contents of an HTTP CONNECT method tunnel [VU#868219]. In addition, an attacker may be able to cause a denial of service by making recursive connections to a proxy service. Note that a wide variety of products including proxy servers, web servers, web caches, firewalls, and content/virus scanners provide HTTP proxy services.
Most products can be configured to specify which networks can access the HTTP proxy service and which destination TCP ports (and possibly IP addresses) are permitted. Products that provide a reasonably secure default configuration are noted as "Not Vulnerable" in the Systems Affected section of this document. It is important to note that any proxy service can be configured insecurely, potentially allowing access from any source to any destination IP address and TCP port.
The HTTP CONNECT method, as well as other HTTP methods and FTP commands, can be abused to establish arbitrary TCP connections through vulnerable proxy services. An attacker could use a vulnerable proxy service on one network as an intermediary to scan or connect to TCP services on another network. In a more severe case, an attacker may be able to establish a connection from a public network, such as the Internet, through a vulnerable proxy service to an internal network.
The CERT/CC has received numerous reports of this technique being used to connect to SMTP services (25/tcp) to initiate the delivery of unsolicited bulk email (UCE/SPAM).
If a proxy service allows recursive connections, an attacker may be able to cause a denial-of-service condition by consuming resources by making repeated connections from the proxy service back to itself.
Apply Patch or Upgrade
Apply a patch or upgrade from your vendor. For information about a specific vendor, check the Systems Affected section of this document or contact your vendor directly.
Vendors listed as "Not Vulnerable" ship HTTP proxy services with reasonably secure default configurations, meaning that the proxy only allows connections to a limited number of TCP ports, or only listens on an internal or loopback interface, or requires further configuration before it will pass traffic. The vendor ships a secure or disabled proxy, and the responsibility of configuring the proxy is placed on the administrator. Note that almost any proxy service, including those from vendors listed as "Not Vulnerable," can be configured insecurely. Different distributions or packages may configure the same proxy application in different ways.
If you are a vendor and your product is affected, let
us know.View More »
Secure Proxy Configuration
Check the configuration of your proxy services to determine if they allow connections to arbitrary TCP ports and whether they allow connections from untrusted networks such as the Internet. Configure your proxy services to only allow connections from trusted networks to reasonably safe TCP ports such as HTTP (80/tcp) and HTTPS (443/tcp). If possible, configure your proxy services not to allow recursive connections. For more information about specific products, check the Systems Affected section of this document, consult your product documentation, or contact your vendor.
Examine Tunneled Data
If possible, configure your HTTP proxy services to check the application layer contents of HTTP CONNECT method tunnels. Even if an HTTP proxy service is not able to decrypt HTTPS data, the proxy service could examine the initial stages of an HTTP CONNECT method connection to confirm that an SSL/TLS handshake is indeed being performed.
An instance of this vulnerability in Check Point FireWall-1 was reported by Volker Tanger in February 2002. The CERT/CC thanks Ronald Guilmette for information used in this document.
This document was written by Art Manion.
19 Feb 2002
Date First Published:
17 May 2002
Date Last Updated:
29 Apr 2005
If you have feedback, comments, or additional information about this vulnerability, please send us email.