1.1. Fog Computing
A new virtualized platform (i.e. Fog Computing) is developed that outspreads the infrastructure of cloud platforms to the edge of the network (Bonomi et al., 2012). Fog computing performs the computation of resources in the edge of the network (very close to the ground). It generally performs its computation between the cloud data centres and the network of smart devices. Figure 1 highlights the three-way hierarchy, that clearly highlights the devices of fog computing will be act as an intermediary nodes between the cloud data centres and the network of end smart devices (Stojmenovic et al., 2014). The arrow ‘location’ highlights the location of smart devices that are positioned at an edge (close to the ground level) of an associated network. The cloud data centres and its related applications are located at the core of the network (which is very far away from the edge of network) (Almorsy et al., 2016; Mather et al., 2009; Modi et al., 2013). The fog devices (possibly a router, a remote machine, etc.) acts as an intermediary between the distributed intelligence network of cloud data centres and smart devices.
1.2. Cross-Site Scripting (XSS) Attack
XSS vulnerabilities are considered to be the topmost threat that have turned out to be a plague for the modern web applications like facebook, twitter, linkedIn, etc. (Gupta et al., 2015a, 2015b, 2014). Such worms steal the sensitive credentials of the active users by injecting the malicious JavaScript code in the form of some posts on such web applications. The statistics of acunetix web application vulnerability report 2015 (Acunetix Web Application Vulnerability Report, 2015) clearly reveals that nearly 38% of web sites were vulnerable to XSS attacks and falls first in the list. In addition, the statistics of 2015 website security statistics report by white hat (Website Security Statistics Report, 2015) undoubtedly discloses that XSS was a significant issue across all platforms of diverse languages utilized by modern web applications. Figure 2 illustrates the simple scenario of exploitation of XSS attack on the web server installed on the backbone of Fog device.
Figure 2. A scenario of XSS attack on fog
Here, web server is deployed on the node of Fog computing, that acts as an intermediary between the data centres of cloud platforms and the network of smart end devices (placed at the edge of the network). The malicious smart devices can also inject the vulnerable JavaScript code on this Fog device that can also be replicated to the cloud data centres. Later on, such vulnerable piece of JavaScript code will get fetched by the smart devices network. The XSS attack will get exploited on the web browsers of smart devices on the execution of this suspicious JavaScript code (Gupta et al., 2017a, 2017b). The speciality of such vulnerable strings of JavaScript is that they simply replicate themselves onto the different adjacent nodes of Fog network and data centres of Cloud computing. Figure 3 highlights the detailed pattern of exploitation of XSS attack on the OSN web server deployed at the fog computing network. The exploitation of XSS attack will get executed on the web browser of smart devices and the credentials (cookies, password, etc.) of the victim are being re-directed to the attacker’s domain.
Figure 3. Exploitation of XSS attack on fog devices