Home » Blog » Can VPNs be Hacked? Find Out How Safe You Are!

Can VPNs be Hacked? Find Out How Safe You Are!

We won’t mince words, so we will just say outright: VPNs can be hacked with about one year of computer time on a $100 million supercomputer. In the words of the Five Eyes countries which do heavy surveillance on the online activities of their citizens, “Privacy is not absolute.” This doesn’t mean you’re better off not using a VPN, and you’ll find out why later.

The only agency that’s capable of hacking VPN encryption is the NSA (National Security Agency), at least as far as most technology experts know. Of course, we wouldn’t have any idea how far the NSA has come in terms of breaking encryption if not for Edward Snowden, the former CIA employee who leaked highly classified documents of the NSA in 2013.

Aside from disclosing the extent to which the Five Eyes countries invade the privacy of its citizens and share the data with each other, Snowden’s revelation also included the NSA’s VPN decryption methods. Here’s a screenshot of their decryption infrastructure:

NSA VPN exploitation

This was supported by research headed by Halderman and Heninger who found some loopholes in the Diffie-Hellman cryptographic key exchange which is used by most VPN providers. The researchers supposed that this could be how the NSA is exploiting VPNs.

What it takes to hack VPNs

Before going into the vulnerabilities that Halderman and Heninger’s team found, let’s take a look at what it takes to hack VPNs.   

It will take one year of computer time, and a $100-million supercomputer to crack a 1024-bit prime.

It will certainly require a lot of resources to hack encrypted VPN traffic, but with the NSA’s annual budget for “groundbreaking cryptanalytic capabilities” of $11 billion, this is not impossible. This budget translates to the decryption of 66% of IKEv1 VPN connections, as shown in the screenshot below.

NSA decrypts 66% VPN connections

There are security experts who disputed this figure, but they still agree that some VPN servers are vulnerable. Still, small-time hackers, big time hackers, and most government agencies who target regular Internet users don’t the resources of the NSA. They don’t have 1/100 of their resources. Even the agency itself is only going to use this million-dollar hacking method for the long-term and the most necessary investigations.

We’re also talking only about 1024-bit prime numbers since 2048-bit key lengths are even harder and more expensive (even close to impossible) to crack. So VPNs are still necessary and effective in protecting people from hacking techniques such as the fake WAP attacks that hackers use in public.

How VPN encryption works

Now let’s get into the nitty-gritty details of the vulnerabilities around encryption that can be exploited by the NSA. To be clear, it’s not only the VPN industry that is exposed. All other technologies that use encryption are pretty much susceptible to the same nation-state hacking.  

Encryption is the process of converting readable, plaintext data into unreadable data called ciphertext. Anyone who intercepts your traffic will see the ciphertext instead of the plaintext, so they won’t know what the traffic contains. Think of encryption like a padlock—it’s the all-familiar symbol of encryption.

Nobody will know what’s behind the lock unless they have the keys. Not all padlocks are created equal though; combination locks are generally more secure than warded locks. The same is true with encryption.

VPN encryption strength depends on three factors: encryption algorithm, key exchange algorithm, and key length.

  • Encryption algorithm: It’s the cryptographic algorithm or cipher that defines how encryption and decryption is performed. Among the most popular ciphers are AES, DES/3DES, and Blowfish, with AES being the latest standard used by VPN providers.
  • Key exchange algorithm: Aside from this, VPNs also use another algorithm for key exchange. Examples of this are the RSA and DH (Diffie-Hellman).
  • Key length: Key length is expressed in bits and usually written along with the cipher so that it becomes AES-128 or AES-256.

VPNs you’ll encounter nowadays usually employ AES-256, a secure encryption algorithm that is very tough to crack.

Types of encryption

There is also a need to understand the different types of encryption, which is where the vulnerability comes in:

  • Symmetric: Also called “private-key cryptography,” this type of encryption uses one key to encrypt and decrypt information. The most common symmetric encryption algorithm used with VPNs are Blowfish, DES, and AES. Symmetric encryption is easier to crack compared to other types of encryption since you only need to get a hold of that one key to decrypt the connection. To solve this problem, symmetric keys are often exchanged using an asymmetric algorithm.
https://twitter.com/joeloseiga/status/1116382950935994368
  • Asymmetric: Asymmetric encryption needs two different keys: one to encrypt the information, and the other one to decrypt it. This type of encryption is also called “public-key cryptography,” and one of the first algorithms of this type is the Diffie-Hellman algorithm. Both client and server using this algorithm need to agree on a large prime number in a particular format. The video below briefly shows how the Diffie-Hellman algorithm works:

This algorithm is considered as an important feature of modern cryptography and is widely used by VPNs for key exchange and Perfect Forward Secrecy. For instance, AES keys are exchanged using the Diffie-Hellman algorithm to make it more secure. Indeed, it is very secure, but the problem lies in the implementation.

Everyone seems to be using the same prime which is usually 1024 bits; several applications even hard-coded this prime. Someone (like the NSA as discussed earlier) will only need to precompute that one specific prime to gain access to all individual connections. Since 1024 prime is commonly used, the NSA only needs to crack this particular prime to decrypt trillions of VPN connections.

  • Hashing: This type of encryption is primarily used by VPNs to verify the authenticity of email messages that are sent through the network. It makes use of one-way encryption. The most commonly used hashing algorithms are MD5, SHA-1, and SHA-2. MD5 and SHA-1 are no longer considered safe.

If there’s one thing we can take from Halderman and Heninger’s discovery of this vulnerability, it’s that digital security solutions are continuously evolving, which is the same with other areas of technology. The standards considered secure nowadays may not be secure in the future.

What this means to VPN users

Using a VPN is still absolutely better than having no protection at all. It will be easy even for small-time hackers with minimal resources to gain access to your devices if you don’t use a VPN. Trust us, you don’t want to be a victim of identity theft, ransomware, and other cybercrimes that seem to be on the rise.

With the right VPN provider, hackers will need resources similar to that of the NSA to be able to gain access to data you transmit online. The vulnerability we talked about earlier only means that you have to choose your VPN provider wisely. Make sure that you look at these aspects of the VPN provider:

  • VPN protocol: There are several VPN protocols. However, the most secure is the OpenVPN protocol, so choose a VPN provider that supports this one. There’s also a new protocol called WireGuard which is still in the works. It looks promising, and we will be on the lookout for this one.
  • Encryption algorithm: AES-256 is the most secure algorithm to use. There are no reports of it being vulnerable as compared to old standards like Blowfish and DES. If the provider uses Diffie-Hellman as the key exchange, make sure that it’s 2048 bit and not the 1024-bit prime.
https://twitter.com/sudofed/status/1024005858378887168
  • Hashing algorithm: As previously mentioned, MD5 and SHA-1 hash algorithms are no longer secure. Therefore, choose a provider that uses SHA-2 hashing which gathers four kinds of hash functions, including the SHA224, SHA256, SHA384, and SHA512.

Some VPN providers publish these details on the homepage of their websites. For others, you need to know the right place to look at. You need to read their terms of service, privacy policy, or read our reviews if you want to save time. We did our own research and came up with comprehensive reviews of the top VPN providers, so you don’t have to look for such information on your own.