In this note we will talk about some common ways to attack wireless based devices.
Attacking an automated door
Usually these doors are opened by radio frequency keys, and can be opened easily (e.g. replay attacks, Jam the frequency)
Jamming
This is the easiest way to attack. Just send many signals to make a certain frequency un-usable in our space. But with Frequency hopping this attack is solved. See Tecnologia Wireless#Frequency Hopping But this method could be easily known and observed (enables eavesdropping, against confidentiality, a principle in Theoretical Notions of Security#CIAA principles of security.) if the initial seed is known.
From this we conclude that
- If the modulation used is known
- If the initial seed is known. We can eavesdrop.
Rolling code
In some systems like automated doors, they just check for a sequence of signals, if that is present open the door. This is clearly easily attacked by replay attacks. So, a common way to protect against those types of attacks is to use a rolling code. With rolling code both transmitter and receiver have a PRNG. The transmitter sends codes based on the PRNG, and receiver tries to get those messages. He tries to see codes in a large frame window, so that a missed code doesn’t dis-align it too much. This makes replay attacks more difficult (usually it is good enough), but does not prevent them: if the attacker captures too many codes then it can be broken!
Challenge and response
More secure way to handle these is using challenge-response protocols. The door generates a nonce to the receiver. The receiver than uses a common secret to cipher it and return back to the door. This needs a back and forth not present in the previous methods. With these in place, we can authenticate the client, and solve replay attacks.
Defenses of IEEE 802.11
The physical layer
There are usually no defenses against attacks on the physical layer of the wifi network stack. Electromagnetic radiations are transmitted freely in the space. Some solutions are for example use paints that absorb most of the radio waves.
The Mac layer
Inter-Frame spaces DoS
Remember that the mac layer uses silent periods, called SIFS, PIFS, DIFS to orchestrate the communication Mac Wifi#Inter-Frame spaces. There is a easy denial of service attack with this protocol: just permanently communicate before the end of a PIFS, so it’s just you that does it.
SSID Hiding
This link is an interesting resource regarding this topic. Let’s ask: is it secure to hid the SSID of your wi-fi network? Answer: No, you are using security by obscurity Classical Cyphers#On security of cipher explains why it is a bad idea.
MAC whitelisting
Also, this is not a good idea, because it is easy to spoof the wanted MAC if an attacker really wanted to.
Disassociation attack🟨+
Some packets, like disassociation packets are sent in clear, with no need for authentication of the request. This makes easy to send disassociation packets to make a terminal disconnect from the access point.
See here. The solution for this problem is to authenticate the terminal with WPA or other ciphers.
Rogue AP
As SSID (see briefly Wifi 802-11), are public, it’s possible to spoof the network, and put an access point that is not the real one, but pretends to be. In this way, you can receive passwords or other secrets that pass through this AP.
Wifi Cryptography
WEP protocol
Has two operating modes, shared key and open system.
WEP: Shared Key
Challenge and response framework is used, like this:
But as the nonce is in clear, the key can be recovered using Known plain-text attacks and other similar to those! And it’s possible to do it in every session.
WEP: Open System
With this protocol, the sender and receiver already have the secret key in common.
Then the sender does this to create the cipher text:
RC4_seed(IV | k)
, then uses this OTP and Stream Ciphers#Stream Ciphers to generate the key used to cipher the messages.
The message is split to $n$ blocks at the beginning, so there are like blocks of messages.
The problem is that after 30k packages is almost sure collision that would allow an attacker to recover the plain-text, as they share the same IV.
So this is not secure at all.
WPA protocol
Stands for WiFi protected access. This protocol solves some of the common problems of WEP security. It can be divided into 3 channel based categories and two cipher-based categories.
- PSK
- Enterprise
- WPS For the channels And TKIP(Temporal Key Integrity Protocol) and CCMP (Counter Mode Cipher Block Chaining Message Authentication Code Protocol) for cipher modes. TKIP is wep compatible. CCMP uses AES with CBC.
WPA with TKIP has been deprecated.
WPA-PSK🟩
So, a WPA that uses phase shift keying to send the messages. Using the TKIP, it has problems like WEP, so it is not used anymore.
CCMP version is still quite used, usually in domestic systems. It is still reliable.
WPS🟩
With these system, there is no need for a password. But it needs a physical access to the access point. Example of this method is a button or PIN on the wifi router.
WPA-Enterprise🟩
This method is used on WANs, for example Unibo WAN uses this method. They use an external server for authentication, called RADIUS (Remote Authentication Dial-In User Service).
WPA3🟨
WPA2 was possible to have a Replay attack, as the used nonce was cached to make the authentication faster. WPA3 solved this problem, so it can be considered as the most secure method.