# Security Threats and Cryptographic Protocols for Medical Wearables
## 2 Security in Medical Devices  
Wearable health monitoring systems must adapt to strict medical criteria and consider ergonomic restrictions and hardware limitations [29]. Research in this field is focused on producing garments with functionalities that improve the lives of its users. These medical devices must be resistant to both natural or intrinsic failures and malicious attacks [30]. An intrinsic failure should be understood as a malfunctioning in the mechanism of the device, which could imply an incorrect reading in the sensing procedure or an error during the transmission of the data [31]. These situations are occasional and, in general, are either automatically solved in the next operation process or manually fixed by an expert. Hence, natural failures do not represent a threat, but just a momentary loss of usability. On the other hand, an attack executed on a WHMS by an adversary supposes a more dangerous scenario, even more critical than hacking any other device, such as a laptop or a mobile phone, as it can cause physical harm to the owner. For instance, hacking a diabetic smart  
Figure 1: Overview of the architecture of an IoT-based health device to measure the foot’s temperature. contact sensor from false readings can lead to the wearer not receiving warning or danger signals [32]. The limitations caused by vulnerabilities create attack vectors that might be utilized by an attacker to gain access to the information of a particular individual or to control the device itself. Several of these attack vectors can be identified, being the most important the followings [33; 34]:  
* [noitemsep]
* Firmware vulnerabilities: an inadequate development process of the software or the lack of authentication protocols in firmware updates facilitate the introduction of an altered, malicious firmware by an attacker. This vector is usually exploited by conducting inverse engineering to the original firmware, concretely in the cases in which there are no protection techniques as code obfuscating/packing [35]. Some authors defend that this attack vector is the most powerful, as it scales better than the others, and proportionates more benefits to the adversary, only requiring one interaction with the wearable [36]. * Communication protocols: most of the current WHMS transfer data to a database server or other electronic devices is done via BLE, Wi-Fi, and RF. These channels have been demonstrated in several studies to be vulnerable and leak the information of the patients [37; 38]. Especially harmful is the scenario in which the transmitted data are not encrypted and can be directly interpreted [39]. * Applications and sensors: excessive privileged apps and sensors might be used by attackers to attack WHMS. This scenario can be conducted by substituting the original app by a malicious one, specifically designed by the adversary to perform concrete actions. Likewise, leaks of sensors readings can be used to infer the activity the patient was executing at a certain time [39]. Additionally, an attacker may be interested in accessing a particular WHMS for different reasons. Depending on the purpose of the adversary, the malware (malicious software) may perform an attack identified as a passive attack or an active attack [37]. Passive attacks are performed while routing the measured data, and the adversary tries to sniff the communications of the WHMS, which leads to the interception of the patient information. Changes in the destination of storage by the attacker also belong to this type of attack. On the other hand, active attackers are capable of modifying the patients' data or introducing new, false data streams to compromise the WHMS records or control the device [40]. There exist other, more concrete attacks divisions depending on their nature, as exposed in [24; 29]. The most critical and common attacks are explained below:  
* [noitemsep]
* Eavesdropping: this attack takes advantage of poor communication protocols to secretly stole the transmitted data [38].