3

I'm working on an implementation of Klein's wep attack.

For that, I've set up a router with wep encryption and collected 50,000 unique IVs from it. I tried only calculating K[0], meaning - the first byte of the key.

I run on all my IVs and calculated the equation as the paper says while keeping a record of the number of times each calculated value was repeated. And finally I am printing the top 30 results.

My problem:

  1. The correct first byte of the key is not in one of the first 30 results.
  2. I keep getting negative numbers as keys.

Maybe there is something wrong with my calculation? Maybe I'm not understanding the algorithm properly?

I will put my code here if needed, but since the calculations are fairly simple, I think there is something else wrong.

I am using this as reference: http://www.item.ntnu.no/_media/people/personalpages/phd/anton/kleins_and_ptw_attacks_on_wep.pdf

Shai
  • 31
  • 2

1 Answers1

1

I'm not a crypto expert, but I have looked into attacks on WEP. Assuming you've implemented the calculations correctly, there are two possible issues I'm aware of:

  1. Some keys are unusually difficult to crack, requiring far more IVs than normal. You may have picked one of them.
  2. The attack is a known-plaintext attack. Traditionally, the attack is performed using ARP packets because they can be identified easily and have a known prefix. The attack won't work if you've got more than a few non-ARP packets mixed in with your ARP packets.
Mark
  • 34,390
  • 9
  • 85
  • 134