# An Overview of Fog Computing and Edge Computing Security and Privacy Issues
## 6 Fog and Edge Computing Attacks Countermeasures
### Countermeasures for Attacks in Fog Computing  
Fog computing is currently at a beginner's stage and there is still a long way to go facing different challenges due to its unique features. It utilizes idle resources created by user devices which are not examined carefully by any standard body, as a result of which security and privacy concerns are raised in the fog network. Therefore, secure and fast authentication mechanisms are need of the time for fog as many devices are part of the fog application processing. Some of the countermeasures proposed for mitigating the malicious attacks and privacy issues include:  
* Efficient Encryption Techniques: With the help of efficient encryption techniques, the privacy issue can be resolved as the attackers will be unable to decode the complex encryption algorithms. However, the developers should consider one fact while developing an encryption technique that as technology is advancing, the attackers are also getting equipped with modern systems and techniques. Hence, they are always one step ahead of the developers as the modern technology would help them to decode any encryption algorithm. * Decoy Technique: It is a security technique that is used to authenticate the data of a user present in the computing network. It replaces the original information with the fake one which is then provided to the attackers. When an attacker causes a security breach in the system, it finds a fake information file in place of the original file. This file is known as the decoy file and the proposed method is called as decoy technique. The decoy files are formed in the start to ensure improved security. The system hides the original data, which can only be accessed by the authenticated users, and replaces it with the decoy file by default for system intruders. * In [41], the author proposes a data privacy preserving technique in fog computing network by using decoy technique. This technique is split into two steps where in the first stage, both verified and the unverified users will be provided decoy data file by default. Furthermore, in the second step, the verified user will be given access to the original data file in the system by passing all the security authentication challenges. When any abnormal activity is observed in the network, the system quickly generates a decoy file in the network with the help of decoy technique which is then sent towards the intruder looking same as the original file. The decoy file contains fake and bogus data. The legitimate user will identify the fake information right away, whereas the attacker will be confused with it. * Modified Decoy Technique: It is a modified version of the original decoy technique in which the attackers are given fake data and nodes which are run by the attackers and in the meantime, information regarding identity (such as Mac address) is collected by the hidden files. * Intrusion Detection System (IDS): Intrusion detection system (IDS) is employed in fog computing to detect and protect from attacks including DoS, insider attacks, port scanning attacks, flooding attacks on virtual machine, man-in-the-middle attacks, hypervisors and many other [42]. To secure the fog system, a perimeter IDS system is deployed that is able to coordinate different IDS in the fog system [43]. However, it can create several challenges as well for ensuring delay-less requirements. The author of [44] proposes an Intrusion Detection and Prevention (IDPS) mechanism to deal with the man-in-the-middle attacks in the fog network. This mechanism consists of IDS nodes that detect any anomaly happening in the network by monitoring it after regular time intervals. In case of a malicious node detection, that node is isolated from the network. * Authentication Schemes: Authentication allows verification of user's identity by verifying user's given credentials that whether they match with information present in the database through an authentication server. This help in defending against the intrusions of malicious entities.