PolarProxy is a transparent SSL/TLS proxy created for incident responders and malware researchers. PolarProxy is primarily designed to intercept and decrypt TLS encrypted traffic from malware that is run in a controlled environment, such as a sandbox. PolarProxy decrypts and re-encrypts TLS traffic, while also saving the decrypted traffic in a PCAP file that can be loaded into Wireshark or an intrusion detection system (IDS).
PolarProxy is released under a
CC BY-ND 4.0 license,
which means you are free to use the software for any purpose, even commercially.
There is one limitation though, the tool only allows up to 10 GB of data
Here is an example PCAP file generated by PolarProxy:
PolarProxy can be run as a systemd service, but you can also run it as a regular command line application if you just wanna proxy a few sessions or take PolarProxy for a test ride. Follow these instructions in order to fire up PolarProxy on TCP 443 on a Linux machine:
To run some traffic through PolarProxy, simply edit the hosts file of any client PC on your network so that some domain name(s) point to your proxy.
You will also need to install the generated
In order to use the firewall rules below, while runing PolarProxy on the command line, you will need to bind the proxy to TCP port 10443 instead of 443:
Another cool option is to write the PCAP data to standard output using the "
Note: PolarProxy currently only runs on 64-bit Linux. We are planning to also add support for ARM based Linux distros in the future.
Note: Ubuntu 19.04 is not yet supported due to a libssl version incompatibility. You will need to have libssl1.0 or libssl1.0-dev installed until this issue has been resolved.
If the default gateway out from the intercepted network is a Linux router or firewall that you manage, then we recommend installing PolarProxy directly on the gateway. If not, then you will need to install PolarProxy on a separate machine.
Note: eth1 is the "inside" interface on the GW pointing towards the clients.
eth1 is the "inside" interface on the GW pointing towards the clients.
PolarProxy server has ip address 10.11.12.13.
The "-m state" rules requires that you have a related or established rule configured. If you dont have that you can add it with:
If your gateway are using the conntrack module instead of state module then you can just change "-m state --state" to "-m conntrack --ctstate".
Note: This configuration will only proxy the traffic for the local user with uid 1000.
Finally, don't forget to save your iptables rules!
The root CA certificate used by PolarProxy must be trusted by all clients that will have their TLS traffic routed through the proxy. Your PolarProxy root CA must be trusted by both the operating system and any browsers or applications that have their own list of trusted root certificates in order to get a seamless integration of the proxy.
There are two ways you can export your PolarProxy’s root CA as a DER encoded X.509 certificate.
How and where to install the public root CA certificate varies between operating systems and applications. A few common examples are listed here below.
Install the certificate in GUI:
Install the certificate without GUI:
Verify that it was successfully installed:
Replace "10.11.12.13" below with the IP of PolarProxy.
Q: Can PolarProxy be configured to listen to a high port (≥1024), so that I won’t need root permissions to run the proxy?
Yes, Polar Proxy can be configured to listen to a high port but still use a well-known low port for the outgoing TCP session. The following “-p” argument will have PolarProxy listen on TCP 10443, save the decrypted traffic as TCP 80 in the generated PCAP files and use TCP 443 for the outgoing connections to the real web servers:
Q: Does PolarProxy use a static built-in private certificate for the SSL interception?
No, PolarProxy dynamically creates a new and unique private certificate when it is first run on a machine. The purpose for doing so is to protect against man-in-the-middle attacks performed by others with access to the private certificate from some other PolarProxy instance.
Q: Can we have PolarProxy use our own private CA certificate instead of the dynamically generated one?
Yes. If you have a PKCS12 file with your private CA certificate, then simply use the “-c” command line switch to load the certificate (use “--help” for more details).
Q: Can I supply a list of whitelisted domains for which the TLS decryption should be bypassed?
Yes, use the “--bypass <file>” command line argument to point PolarProxy to a file containing one or multiple regular expressions (one per line). The TLS decryption will be bypassed for domains that are matched by any of the regular expressions in the supplied whitelist file.
Q: Which protocols (and ports) can be decrypted by PolarProxy?
PolarProxy only decrypts TLS and SSL traffic. However, many application layer protocols use TLS for encryption, such as HTTPS (TCP 443), DNS-over-TLS (853), FTPS (990), SMTPS (465), IMAPS (993) and POP3S (995). These TLS wrapped protocols can be decrypted using PolarProxy, so that you can analyze them in their clear text format.
Q: Can PolarProxy alert on malicious activity?
No, PolarProxy only decrypts the SSL/TLS encrypted traffic and saves it in a capture file (a.k.a. PCAP file). Read the PCAP file with an IDS of your choice, like Snort, Suricata or Zeek in order to generate alerts for malicious traffic.
Q: How is PolarProxy different from mitmproxy / Burp Suite / Fiddler / Charles Proxy / Bettercap?
Unlike many other proxies, PolarProxy is not designed to interfere with the data inside the encrypted stream. PolarProxy only decrypts the TLS stream for inspection and then re-encrypts the exact same stream again. Another unique feature of PolarProxy is that it writes the decrypted data to a PCAP file containing the decrypted data, this PCAP file can be loaded into Wireshark, NetworkMiner or an IDS tool for inspection.
Q: What about TLS wrapped protocols other than HTTPS?
You can run any TLS wrapped protocol through PolarProxy to see the decrypted contents. It doesn’t matter if it is a proprietary protocol running inside the TLS session or if it is a well-known TLS wrapped protocol like HTTP/2, SMTPS, IMAPS or POP3S. They are all decrypted by PolarProxy, as long as you have configured it to listen on the desired port using the “
Q: How about badssl.com?
PolarProxy is designed to forward all properties of the external TLS session to the internal one as far as possible. This means that visiting, for example https://expired.badssl.com, will yield an expired certificate also on the inside. The same thing goes for most other badssl tests, like self signed certs, certs with wrong hostname etc.
Q: Is PolarProxy free? Can I use this software commercially?
Yes, and yes. PolarProxy is released under a Creative Commons Attribution-NoDerivatives 4.0 International License, which means that you can copy and redistribute PolarProxy in any medium or format for any purpose, even commercially.