Compression and Encryption against security issues



  • I'm having a hard time knowing whether the following setup is vulnerable to CRIME/BREACH type attacks (which target HTTPS).

    I am running a Wireguard VPN that tunnels VXLAN protocol, using ChachaPoly20 encryption. I would like to add CPU cheap compression (LZ4) on the VXLAN frames (RFC3173 likewise).

    Would the fact that I add LZ4 on my VXLAN frames make the encrypted VPN tunnel vulnerable to a potential attacker?

    Side question: Since CRIME and BREACH target HTTPS specifically, are there any more generic versions of those attacks?



  • To exploit the compression, as in CRIME/BREACH, the attacker must perform a chosen-plaintext attack. In other terms, this means that the attacker must already have an exploit on your computer:

    • Either a RCE, in which case your VPN, encrypted or not, will not help you as you are already pwned;
    • or a CSRF or similar, which is fairly uncommon on classical desktop software.

    Avoiding compressing data before encryption is a "defense in depth" protection, in the sense that a prior exploit must be used. Compression exploitation can only be used to improve on an attack, on some very specific scenarios.

    Also, as mentioned in this answer by MechMK1, you will most likely not gain much by compressing at the VPN level.

    In conclusion, do as you wish, the impact in performance and security will most likely be minimal either way. If, however in your particular situation you know that you will gain a lot by adding compression, or that a CSRF is likely and unavoidable, then you now know what to choose between compression and security.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2