Wednesday, September 1, 2010

HTTPS->HTTP

While doing a vuln assessment/pen test, I needed a way to launch a tool designed for HTTP connections against a HTTPS (SSL) web site. I looked at a few lightweight proxy tools and considered configuring mod_proxy, but since this was a defined point-to-point connection, stunnel worked just fine:

stunnel -f -c -d -r :

Flags:
-f = Foreground mode
-c = Client mode (used to negotiate SSL from a server)
-d = Accept connections on the following [IP]:port
-r = Connect to remote ip:port

After this was executed, I simply connected to localhost:80 via non-SSL and stunnel automagically established a SSL session to the remote web server, allowing me to test/inject into the web stream just as I would with non-SSL connections.

0 comments: