Detecting man-in-the-middle attack in fog computing for social media

Farouq Aliyu*, Tarek Sheltami, Ashraf Mahmoud, Louai Al-Awami, Ansar Yasar

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

6 Scopus citations


Fog computing (FC) is a networking paradigm where wireless devices known as fog nodes are placed at the edge of the network (close to the Internet of Things (IoT) devices). Fog nodes provide services in lieu of the cloud. Thus, improving the performance of the network and making it attractive to social media-based systems. Security issues are one of the most challenges encountered in FC. In this paper, we propose an anomaly-based Intrusion Detection and Prevention System (IDPS) against Man-in-the-Middle (MITM) attack in the fog layer. The system uses special nodes known as Intrusion Detection System (IDS) nodes to detect intrusion in the network. They periodically monitor the behavior of the fog nodes in the network. Any deviation from normal network activity is categorized as malicious, and the suspected node is isolated. Exponentially Weighted Moving Average (EWMA) is added to the system to smooth out the noise that is typically found in social media communications. Our results (with 95% confidence) show that the accuracy of the proposed system increases from 80% to 95% after EWMA is added. Also, with EWMA, the proposed system can detect the intrusion from 0.25–0.5 s seconds faster than that without EWMA. However, it affects the latency of services provided by the fog nodes by at least 0.75–1.3 s. Finally, EWMA has not increased the energy overhead of the system, due to its lightweight.

Original languageEnglish
Pages (from-to)1159-1181
Number of pages23
JournalComputers, Materials and Continua
Issue number1
StatePublished - 2021

Bibliographical note

Publisher Copyright:
© 2021 Tech Science Press. All rights reserved.


  • Fog computing
  • Intrusion detection system and prevention system
  • Man-in-the-middle attack
  • Network security
  • Social media

ASJC Scopus subject areas

  • Biomaterials
  • Modeling and Simulation
  • Mechanics of Materials
  • Computer Science Applications
  • Electrical and Electronic Engineering


Dive into the research topics of 'Detecting man-in-the-middle attack in fog computing for social media'. Together they form a unique fingerprint.

Cite this