CompTIA Security+ Exam Notes

CompTIA Security+ Exam Notes
Let Us Help You Pass
Showing posts with label RC4. Show all posts
Showing posts with label RC4. Show all posts

Thursday, November 14, 2024

WEP Explained: How It Works and Why It's Obsolete

 WEP (Wired Equivalent Privacy)

Wired Equivalent Privacy (WEP) is a security protocol designed to provide a level of security for wireless networks comparable to wired networks. Introduced in 1997 as part of the IEEE 802.11 standard, WEP encrypts data transmitted over Wi-Fi to protect it.

How WEP Works

  • Encryption: WEP uses a static encryption key, either 64-bit or 128-bit, to encrypt data. This key is shared among all devices on the network.
  • Data Protection: The encrypted data is intended to be unreadable to anyone who intercepts it, ensuring that only authorized devices can decrypt and understand the information.
  • Authentication: WEP also provides a basic form of authentication, ensuring that only devices with the correct WEP key can join the network.

Limitations and Vulnerabilities

Despite its initial promise, WEP has several significant weaknesses:

  • Static Keys: Static keys mean that all devices use the same key, making it easier for attackers to crack the encryption.
  • Weak Encryption: Advances in computing power have made it relatively easy to break WEP encryption using freely available tools.
  • Security Flaws: Various vulnerabilities in the WEP protocol itself have been discovered, allowing attackers to bypass its security measures.

Built on the RC4 cipher.

A WEP IV (Initialization Vector) attack exploits a significant vulnerability in the WEP (Wired Equivalent Privacy) protocol. Here's how it works:

How WEP IV Attacks Work

  • Initialization Vector (IV): WEP uses a 24-bit IV to add randomness to the encryption process. However, the small size of the IV means that it repeats frequently.
  • IV Reuse: Because the IV is only 24 bits, it can be reused quickly, especially in busy networks. This reuse allows attackers to collect multiple packets with the same IV.
  • Packet Collection: Attackers capture a large number of encrypted packets. Since the IV is transmitted in plaintext, they can identify packets with the same IV.
  • Key Recovery: Attackers can use statistical techniques to deduce the WEP key by analyzing these packets. Tools like Aircrack-ng automate this process, making it relatively easy to crack WEP encryption.

Impact and Mitigation

  • Impact: Once the WEP key is cracked, attackers can decrypt all traffic on the network, potentially leading to data theft or unauthorized access.
  • Mitigation: The best defense against IV attacks is to avoid using WEP. Instead, more secure protocols like WPA2 or WPA3, which have stronger encryption and larger IVs, reduce the reuse risk.

Replacement by WPA and WPA2

Due to these vulnerabilities, the Wi-Fi Alliance officially retired WEP in 2004. It replaced it with more secure protocols like WPA (Wi-Fi Protected Access) and WPA2, which offer stronger encryption and improved security features.

Today, WEP is considered obsolete and should not be used to secure wireless networks. Modern networks should use WPA2 or WPA3 for better protection.

This is covered in A+, Network+, Pentest+, and Security+.

Saturday, August 11, 2018

SYMMETRIC ENCRYPTION

Symmetric encryption uses the same key to encrypt and decrypt. Because this is a shared key, the keys have to be kept private. Symmetric Encryption is known as Private Key encryption. Remember, "YOU HAVE TO KEEP YOUR PRIVATES: PRIVATE".

With symmetric encryption, you do not want to send the key with the message, if the message were to be intercepted, they would have access to the key and be able to read (decrypt) the message.

The keys are exchanged out-of-band. For a secure exchange of symmetric keys, you would use some form of Diffie Hellman (DH, ECDHE, DHE).

Symmetric encryption uses less overhead than asymmetric encryption and decryption.

Stream ciphers and block ciphers are forms of symmetric encryption, The following are all symmetric encryptions:

Stream Cipher: 
RC4 (encrypts one bit at a time, used for audio & video streaming. WEP, WPA (TKIP), and SSL/TLS are built on RC4). Considered weak encryption and has been deprecated.

Block Ciphers:
DES: Data Encryption Standard - a symmetric block cipher that encrypts in 64-bit blocks. It uses a 56-bit key. Considered weak encryption and has been deprecated.

3DES: Triple-DES - uses 3 different keys to encrypt 3 different times. Encrypts in 64-bit blocks, easy upgrade from DES without changing hardware. 
Considered weak encryption and has been deprecated.

AES: Advanced Encryption Standard - encrypts data in 128-bit blocks. It has 3 different key sizes, 128-bit, 192-bit, and 256-bit. The most widely used encryption.

Blowfish: Encrypts in 64-bit blocks and uses key sizes between 32-bit and 64-bit.

Twofish: Encrypts data in 128-bit blocks and uses key sizes of 128-bit, 192-bit, or 256-bit.

IF THE ENCRYPTION IS A STREAM CIPHER OR BLOCK CIPHER, THEN IT IS SYMMETRIC ENCRYPTION: