# A Survey on Secure WiFi Sensing Technology: Attacks and Defenses
## 4 Defenses for WiFi Sensing
### Active Defense  
Active defense refers to proactive measures implemented by the sensing target himself/herself/itself to counteract and mitigate the effects of malicious attacks [56; 57; 80; 81; 82; 83; 84; 85]. This strategy involves the deployment of various techniques and mechanisms that enhance the resilience of the sensing system, ensuring integrity and reliability in wireless sensing applications, including localization [57; 85], activity recognition [80], and so on, as Figure 5a,b illustrates. The main objective of active defense is to detect and neutralize threats in real time, preventing the leakage of private sensing information. For example, a secure WiFi sensing system equipped with active defense strategies may involve the proactive obfuscation of signals or the use of decoy systems to confuse and misdirect potential attackers. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  
To this extent, active defense strategies can help WiFi sensing systems stay vigilant and adaptive and significantly reduce the risk of successful attacks, ensuring the continued reliability of WiFi sensing applications. One of the major classes of defense techniques aims to avoid the leakage of the user's location. MIRAGE [57] involves utilizing the downlink physical layer information as the defense strategy against an attacker snooping on a WiFi user's location information. Specifically, MIRAGE obfuscates the AoA information of the user's devices such that the actual direction is along one of the reflected paths, in other words, making the reflected path look like the most direct path from the device to the AP. Thus, the location snooped by the attacker will be significantly deviated from the actual location. It is worth noting that this obfuscation does not affect the communication between WiFi AP and the user and can also be used to defend the ToF-based localization systems. However, MIRAGE will not only prevent the attackers from obtaining the actual locations but also confuse the legal devices that may provide location-based service to the user. In this case, WiCloak [85] addresses this problem by letting the legal devices know how to recover the deviated location. The basic idea of WiCloak is to manipulate the transmitted WiFi packet to make the calculated CSI at the eavesdropper point useless for localization. To support packet transmission at legitimate receivers, WiCloak also compensates for the CSI change in the payload field and therefore enables standard WiFi decoding on COTS devices. To manipulate the CSI, WiCloak modifies the preamble of WiFi packets and adds an extra fake channel (i.e., extra amplitude and phase) to each symbol. As a result, any Rx will obtain the changed CSI based on the preamble. However, the CSI with this fake channel does not match the actual channel and cannot be used in decoding the payload of WiFi packets, resulting in WiFi communication failure. Thus, WiCloak compensates for the fake channel at Rx by performing reverse operation of manipulation so that the manipulated CSI can be used to decode the payload. [PERSON] et al. [82] tried to secure the WiFi localization from the perspective of encryption algorithms. They designed an effective yet lightweight WiFi localization privacy algorithm, which reinforces dummy techniques with plausible dummy locations to resist attacks on the WiFi localization system. The proposed algorithm does not rely on trusted third parties and can resist spatio-temporal correlation attacks. Another common class of active defense techniques focuses on recognition and detection applications. [PERSON] et al. [84] first defined the targeted and non-targeted protection  
Figure 5: Illustration of defenses for different WiFi sensing applications (e.g., localization, activity recognition, and crowd counting): (**a**) Localization [57]; (**b**) activity recognition [80]; (**c**) crowd monitoring [88]. of CSI-based WiFi sensing. Although CSI contains a wealth of different semantics, some of which need to be recognized and others that need to be protected.