WEP In a Nutshell
Do you like this story?
WEP [Wireless Equivalent Privacy] was meant to be an encryption method to provide security
equivalent to a wired access point. WEP was originally designed with 40-bit
keys, and later WEP2 came along to increase the key size to 104 bits. At that time, it was the best encryption technology avalable. However with passage of time, it has been proved to be damn vulnerable and hence WPA 2 has holded the position of most secure wifi security technology.
Neways, lets discuss WEP. All of the
encryption is done on a per-packet basis, so each packet is essentially a
separate plaintext message to send. The packet will be called M.
First a checksum of message M is computed so
the message integrity can be checked later. This is done using a 32-bit cyclic
redundancy checksum function aptly named CRC32. This checksum will be called CS, so CS = CRC32(M). This value is appended to the end of the message, which
makes up the plaintext message P.
Now the plaintext message needs to be encrypted. This is done
using RC4, which is a stream cipher. This cipher is then initialized with a seed
value, so thta it can generate a keystream, which is just a arbitrarily long
stream of pseudo-random bytes. WEP basically uses an initialization vector (IV) for the
seed value. The IV consists of 24 bytes of varied bits that is generated for
each packet. Some older WEP implementations simply use sequential values for the
IV, while others use some form of pseudo-randomizer.
Regardless of how the 24 bits of IV are chosen, they are prepended
to the WEP key. The 24 bits of IV are included in the WEP key size in a bit of
clever marketing spin. (When a vendor talks about 64-bit or 128-bit WEP keys,
the actual keys are only 40 bits and 104 bits, respectively, with 24 bits of
IV.) The IV and the WEP key together make up the seed value, which will be
called S.
Then the seed value S is fed into RC4, which will generate a keystream. This
keystream is XORed with the plaintext message P, to
produce the ciphertext C. The IV is prepended to the
ciphertext, and the whole thing is encapsulated with yet another header and sent
out over the radio link.
When the recipient receives a WEP-encrypted packet, the process is
simply reversed. The recipient pulls the IV from the message and then
concatenates the IV with his own WEP key to produce a seed value of S. If the sender and receiver both have the same WEP key, the
seed values will be the same. This seed is fed into RC4 again to produce the
same keystream, which is XORed with the rest of the encrypted message. This will
produce the original plaintext message, which consisted of the packet message M concatenated with the integrity checksum CS. The recipient then uses the same CRC32 function to
recalculate the checksum for M and checks to make sure the
calculated value matches the received value of CS. If the
checksums match, the packet is passed on. Otherwise there were too many
transmission errors or the WEP keys didn't match, and the packet is dropped.
That's basically WEP in a nutshell. Very soon i would write on What is the Logic when we are hacking a WEP key, which vulnerabilty do we exploit and so on so forth. The tutorial for hacking WEP has already been published by me.Would upload a video very soon too. :)
Have fun, and Enjoy hacking :)
Subscribe to:
Post Comments (Atom)
0 Responses to “WEP In a Nutshell”
Post a Comment