Machine Learning for Document Security: Defense and Attack
Machine learning has seen many successful applications in the context of information security for tasks such as the detection of network intrusion or spam email messages and the detection and clustering of malicious executables. One particularly popular attack vector in recent years have been malicious documents: non-executable computer files of different formats, e.g., Portable Document Format (PDF), HTML, Microsoft Office, Adobe Flash, etc. Traditional detection methods based on signature matching have difficulties handling malicious documents because of their format complexity and/or ambiguity and the ease of producing massive numbers of heterogenous malicious documents by embedding polymorphic malware inside them. This is what machine learning methods are better suitable for.
|Fig. 1: PJScan system architecture. Figure taken from |
Another approach to detect malicious PDF files takes advantage of the differences between how malicious and benign files are built, i.e., their document structure .
|Fig. 2: The raw PDF file (left) is parsed by a full-fledged PDF parser and traversed using breadth-first search (BFS) to recreate its document structure tree (center). A full walk through the tree extracts all the paths and their counts (right), which are used to discriminate malicious from benign files. Figure taken from .|
Evasion of classifiers in feature space
In security contexts, it is crucial to assure that the learning algorithm performing a security-critical task such as malware detection cannot be influenced by attackers. Therefore, it is important to evaluate and improve the security of learning algorithms themselves .
|Fig. 3: Result of an evasion attack against an SVM classifier at test time. Malicious points were manipulated to move from malicious (red) into benign (blue) area, therefore evading detection. Figure taken from .|
Evasion of classifiers in data space
Going from theoretical attacks on learning algorithms with known models in feature space to practical attacks on real-world, deployed classifier systems in data space, it was shown that the ability to modify only one third of features utilized by the classifier PDFrate can enable an attacker to severely degrade the classifier’s performance, making it label a large share of malicious PDF files as benign . Source code for the Mimicus experimental platform used for PDFrate evasion is available here.
 Nedim Šrndić, Pavel Laskov. Detection of Malicious PDF Files Based on Hierarchical Document Structure. In Network and Distributed System Security Symposium, 2013.
 Battista Biggio, Igino Corona, Davide Maiorca, Blaine Nelson, Nedim Šrndić, Pavel Laskov, Giorgio Giacinto, Fabio Roli. Evasion Attacks Against Machine Learning at Test Time. In European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases, 2013.
 Nedim Šrndić, Pavel Laskov. Practical Evasion of a Learning-Based Classifier: A Case Study. IEEE Symposium on Security and Privacy, 2014.
Nedim Šrndić, Tel.: (07071) 29-77175, nedim.srndic (at) uni-tuebingen.de