L2TP/IPSec vs OpenVPN

Shran

Level 5
Thread author
Verified
Well-known
Jan 19, 2015
230
Okay, so I've heard virtually everywhere that connecting to a VPN using L2TP/IPsec with a preshared key (which I currently am for PIA rather than using their client which connects with OpenVPN because I find the application to be way too buggy).

Can anyone tell me why this is less secure? Can someone decrypt my traffic if they also have that preshared key? Which, by the way, is publicly available on PIA's support pages.... I feel like if that would enable someone to decrypt the IPsec VPN traffic that they wouldn't publicly post it... so why exactly is L2TP/IPSec less secure / not as good as using OpenVPN?

Thanks
 
L

LabZero

L2TP (Layer 2 Tunnel Protocol ) does not offer any form of protection and data in transit is NOT encrypted.
For this reason, L2TP is commonly used with IPSec with encryption and authentication capabilities that integrates identity check of IP packets.
It supports up to 256-bit encryption keys using the IPSec protocol though their length varies on the basis of the algorithms used.
For added security L2TP uses a double data encapsulation.

L2TP, combined with the use of IPSec offers a much higher level of security.
Ok... Snowden talks about IPSec as a standard compromised by NSA but in my opinion it is to verify...
 

Soulbound

Level 29
Verified
Well-known
Jan 14, 2015
1,761
Layer 2 Tunnel Protocol (L2TP) is a VPN protocol that does not provide any encryption to traffic that passes through it. As such, IPSec encryption is added to fill the holes.

Note however that L2TP protocol uses UDP port 500 if not mistaken, which is more easily blocked by NAT firewalls, and may therefore require advanced configuration such as port forwarding when used behind a firewall (unlike SSL which can use TCP port 443 to make it indistinguishable from normal HTTPS traffic).

The L2TP payload is encrypted using the standardized IPSec protocol: RFC 4835 specifies either the 3DES or AES encryption algorithm for confidentiality. IVPN uses the AES algorithm with 256 bit keys.

The reasons why L2TP.IPSec is less secure is 2 fold:
1st: when IPSec is configured to use pre-shared keys that are made public (common with public VPN services) it is vulnerable to an active Man in the Middle attack (MITM attack). This is not a vulnerability of the IPSec protocol but in the way it is implemented.

2nd reason: Quite some time ago, there were documents and information leaked by Edward Snowden in regards to NSA and the whole thing blew apart, including L2TP protection. He recently appeared on TV in the news, and is still in Russia seeking asylum. Here is the PDF in regards to the L2TP.

Also to note: L2TP/IPSec encapsulates data twice, therefore it is not as efficient as a SSL based solutions (such as OpenVPN and SSTP) and is therefore slightly slower.

Now to compare, OpenVPN uses the OpenSSL library to provide encryption. OpenSSL supports a number of different cryptographic algorithms such as AES and Blowfish.

Bear in mind however that AES, RSA, SHA-1 and SHA-2 ciphers were, I believe were either all developed or were certified by the United States National Institute of Standards and Technology (NIST), which as many know, they have worked with NSA for the development of ciphers.

In any case, OpenVPN uses ephemeral (temporary) key exchanges. With an ephemeral key exchanges a new key is generated for each exchange, and there is no reliance on certificates to establish trust. Even if an attacker or outsider were to obtain the private key of a certificate, the communication could not be decrypted. Nevertheless, MITM Attacks can still target an OpenVPN connection if the private key has been leaked/known/obtained.


Some notes just in case some readers do not understand:

RSA: Asymmetric public-key cryptosystem
RSA-2048 key encryption is considered secure, but can be more secure if 3072-bit or 4096-bit RSA encryption is used. RSA-2048 is now the minimum standard for commercial VPN providers.

SHA: Secure Hash Algorithm -cryptographic hash function used to authenticate SSL connections as well as OpenVPN connections.
If I am not mistaken, OpenVPN only supports SHA-1 and SHA-2 (up to SHA-384), not SHA-3.

Blowfish: 128bit Cipher, and if you are just a regular user, it is secure. OpenVPN uses by default the 128bit Blowfish cipher. Twofish however is way better but unsupported in OpenVPN.
Camellia: Non-NIST cipher
AES: Advanced Encryption Standard (128bit, 192bit and 256bit)
As such, one can say that the OpenVPN ciphers are:
Blowfish-126, AES-128, AES-192, AES-256, Camellia-128, Camellia-192 and Camellia-256
 

Shran

Level 5
Thread author
Verified
Well-known
Jan 19, 2015
230
In any case, OpenVPN uses ephemeral (temporary) key exchanges. With an ephemeral key exchanges a new key is generated for each exchange, and there is no reliance on certificates to establish trust. Even if an attacker or outsider were to obtain the private key of a certificate, the communication could not be decrypted. Nevertheless, MITM Attacks can still target an OpenVPN connection if the private key has been leaked/known/obtained.

Forgive me, I'm a little confused. You said "Even if an attacker or outsider were to obtain the private key of a certificate, the communication could not be decrypted." but also "Nevertheless, MITM Attacks can still target an OpenVPN connection if the private key has been leaked/known/obtained." That seems contradictory, or maybe I'm just not understanding? :confused:


Thanks
 

Soulbound

Level 29
Verified
Well-known
Jan 14, 2015
1,761
Forgive me, I'm a little confused. You said "Even if an attacker or outsider were to obtain the private key of a certificate, the communication could not be decrypted." but also "Nevertheless, MITM Attacks can still target an OpenVPN connection if the private key has been leaked/known/obtained." That seems contradictory, or maybe I'm just not understanding? :confused:


Thanks
there are different types of MITM attacks. just because communication cannot be decrypted due to the time it takes to actually decrypt based on its encryption, if the encryption method is goldfish, it is for example not the same as a more secure 128bit or even 256 bit AES.

In any case, decryption is not the only form of MITM attacks.
If that makes sense.
 
Last edited:
  • Like
Reactions: Shran

About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top