rapid7/metasploit-framework — pull request #722 by sempervictus (2012-08-24 00:50:38+00:00)
Title: Initial Commit of Rex based HTTP proxy servers

This commit adds two modules - an http proxy capable of
routing traffic to a specific host and port, and a MITM
proxy which will do name lookups, rewrite headers, and
forward the traffic to the appropriate host. The latter
will also perform MITM attacks on the response body, useful
for injecting XSS.

The direct proxy is mostly a PoC, but may be of use to someone
who wants to route HTTP only traffic without the ability to use
a socks4a proxy from an external application.

Testing (MITM proxy): start the proxy on machine A, edit
the hosts file on machine B to point a domain to machine A,
curl any existing URI on that domain, or browse to it.

TODO: clone the MITM proxy into a data collection proxy for
manually crawling sites (or using external crawlers to populate
the DB) and capturing cookies, credentials, or other relevant
data.