# Defacement Detection with Passive Adversaries
## 2 Defacement Response
### Previous Work in Defacement Detection  
A number of papers strictly related to defacement detection and response have been published [1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11]. Some commercial monitoring services are also available [12].  
The simplest approach is based on direct comparison of downloaded content with trusted and separately stored content [4; 8; 10; 12]. Most commercial services [12] detect any minor change and fire an email alert, based, for example, on the difference in the hash codes of downloaded and trusted content. The same approach is used in [10], where the check is embedded in a ready-to-use Apache module. The module will prevent a defaced page from being served to a client. A similar method, based on a more involved difference computation, is described in [8]. The authors have done some experimentation and have realized that such difference checks can be computationally demanding, hence they propose efficient but partial difference evaluation algorithms. In [4] an extreme approach is adopted, where reference content is stored in a read-only local storage, so as to avoid the very possibility of content injection that could be so pervasive as to avoid detection. Similarly, in [11] the operating system's features are used, in combination with a secure hardware component, to monitor file systems changes and detected unwanted modifications.  
More involved approaches, that are more directly related to the present paper, are adaptive in nature, and rely on Pattern Recognition and Machine Learning techniques, in order to classify a currently downloaded page as either \"normal\" or \"defaced\" (e.g., [1, 3, 5, 6, 7]). As such, these approaches are part of a more general notion of anomaly detection, with applications to computer security. We will not cite papers from this broader area, but excellent recent surveys are available, e.g., [28, 29]. In [6] a number of different or parametric approaches to anomaly detection for defacement monitoring are surveyed and quantitatively compared. In particular, the use of different learning algorithms is evaluated in the light of performance (false positive and false negative rate).  
In [1] a novel \"Delta Framework\" is described, using a Machine Learning approach, and introducing a concept of \"Fuzzy tree difference\". This is interesting, because it overcomes the limitations of an exact match, and it addresses the issue of the computational workload that such monitoring services typically involve. In both [1] and [9] linguistic and semantic issues are addressed. In particular, in [9] the notion of \"semantic consistency\" is introduced, a notion that can be effective for detecting undercover defacements, where page look and feel is maintained, but nonsense, or totally out of context sentences are injected.  
Quite in the opposite direction, the approach described in [2] is based on image difference and can be effective when text is unchanged or not involved in the defacement attack, because everything is obtained with the final visual effect facing the user.  
Defacement approaches based on image recognition are challenged with a very difficult goal, being related to a kind of Turing test, this time a form of \"reversed CAPTCHA\":  
* in a standard CAPTCHA, the \"good guy\" is a human user, who reads and types text from an image. The \"bad guy\" is an automated algorithm, also trying to correctly _read_ some words, in order to bypass robot detection.
* in this reversed CAPTCHA, applied to image-based defacement detection, the \"good guy\" is an automated algorithm (the monitoring system), trying to extract meaning from an image and checking that it is consistent with the site's profile. The \"bad guy\" is a human attacker, wanting to _write_ unwanted text in the image.  
Since this reverse CAPTCHA challenge is intrinsically difficult, most defacement detection approaches are not based on image recognition and labeling.