I am implementing a TLS connection with a basic server and client. It’s a one way connection: the server has a certificate chained to the CA, and the client has a collection of trusted root certificates.

Is it possible for a tool to log the connection as a man in the middle, but authorized? For the server this tool would appear to be a client; for the client it would be seen as the server.

Is this possible? Which certificates does this tool need?

  • 1
    Yes, there is a company that does authorized MiTM commercially called Blue Coat. The fake certificate gets pushed onto the customers workstations via group policy and as a user you are unaware of it till you look at the properties of the cert' and see their name!
    – back_ache
    Commented Apr 23, 2015 at 13:57
  • And how do they verify any of the sites that they are pushing out fake certs for? Very irresponsible to give users a false sense of security and possibly even negligent if data is leaked because of any of the various additional weaknesses they are introducing without warning the user about.
    – JamesRyan
    Commented Apr 23, 2015 at 14:41
  • Cisco, Microsoft, and other companies also have SSL inspection features that work the same way... Commented Apr 27, 2015 at 1:09

3 Answers 3


You just need to add the tool certificate in the trust store of the client, so that the client trust your "tool as a server". Then in order not to have any errors, every time the client tries to open a TLS connection, you have to clone the actual cert with your custom CA:

  • Client tries to initiate connection with the server, it goes through your proxy

  • The proxy initiates actual connection with the server, gets the server certificate back

  • The proxy creates a new certificate with the same CN but with its custom CA

  • The proxy responds to the client with that new certificate, it's trusted by the client because you added your custom CA in the client trust store

Also be wary of propagating possible certs errors to the clients (not like Lenovo for instance..)

  • Can you recommend a proxy server software which does this? I know there is one, but I can't remember its name right now.
    – Philipp
    Commented Apr 23, 2015 at 9:36
  • CN stands for Common Name ? (SSL beginner here)
    – Jean
    Commented Apr 23, 2015 at 10:41
  • @Philipp see lorenzog's answer for a link with tools. Otherwise I'd say that writing up your own proxy might be a very valuable exercise.
    – Dillinur
    Commented Apr 23, 2015 at 11:35
  • @JeanRene yes it does, but it's actually a simplification in this case. Ideally, you want to clone every single attribute of the original certificate except the for the CA (so that's CN, signature choice, creation & expiration date, cert role, etc)
    – Dillinur
    Commented Apr 23, 2015 at 11:36

Did you take a look at this answer? There are a few tools listed.

However the key point for you is to have a certificate that your client will accept. To answer your question, in its simplest form you need:

  • A valid SSL certificate (signed by the CAs that are trusted by the client)
  • Control of DNS resolution (but if you control the environment you'd have your tool set up on the gateway, as suggested in the comments)

A possible scenario would be:

  1. With DNS resolution:

    1. Client looks up server IP
    2. Your DNS resolves it to the IP address of your tool
  2. Client connects to your tool

  3. Your tool responds with a signed certificate for the requested hostname
  4. ...
  5. Profit! Also, MiTM

A slightly modified version of this set up is to install on your client the certificate of your own CA, with which you can sign the SSL certificate of your tool. Since you talk about 'authorised' SSL stripping, I assume you have control of the client environment.

  • Just nitpicking, but if you control the environment, I'd say you'd rather use the tool as a proxy/gateway instead of using DNS redirection.
    – Dillinur
    Commented Apr 23, 2015 at 11:40
  • @Dillinur you're right. I edited my answer. Thanks
    – lorenzog
    Commented Apr 23, 2015 at 12:34

Zorp Firewall (http://en.m.wikipedia.org/wiki/Zorp_firewall) can do this. It supports not only web/http but a couple other protocols too. Also it is very lightweight, easily deployable on an OpenWRT device.

You will have to get trusted your proxy CA by clients though, but in an authorized scenario it should not be a problem.

  • Is there something specific about "Zorp" that makes it special? Or is it simply a web proxy?
    – schroeder
    Commented Apr 24, 2015 at 18:22
  • Zorp supports not only web/http but a couple other protocols too. Also it is very lightweight, easily deployable on an OpenWRT device.
    – djozsef
    Commented Apr 25, 2015 at 23:56
  • Could you edit your question to include these details?
    – schroeder
    Commented Apr 26, 2015 at 0:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .