Machine learning techniques for program representation and comprehension with applications to mobile security
Android has evolved to be the most popular mobile operating system over the past several years, since its inception. Millions of Android apps provide a variety of functionalities to users, such as instant messaging, gaming and online shopping. However, due to its prevalence, Android also becomes a p...
Saved in:
Main Author: | |
---|---|
Other Authors: | |
Format: | Theses and Dissertations |
Language: | English |
Published: |
2017
|
Subjects: | |
Online Access: | http://hdl.handle.net/10356/72704 |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Institution: | Nanyang Technological University |
Language: | English |
id |
sg-ntu-dr.10356-72704 |
---|---|
record_format |
dspace |
institution |
Nanyang Technological University |
building |
NTU Library |
continent |
Asia |
country |
Singapore Singapore |
content_provider |
NTU Library |
collection |
DR-NTU |
language |
English |
topic |
DRNTU::Engineering::Electrical and electronic engineering::Computer hardware, software and systems |
spellingShingle |
DRNTU::Engineering::Electrical and electronic engineering::Computer hardware, software and systems Narayanan, Annamalai Machine learning techniques for program representation and comprehension with applications to mobile security |
description |
Android has evolved to be the most popular mobile operating system over the past several years, since its inception. Millions of Android apps provide a variety of functionalities to users, such as instant messaging, gaming and online shopping. However, due to its prevalence, Android also becomes a prime attack target of cybercriminals. According to Symantec’s 2016 Annual Threat Report, 13 million Android malware have been found in the wild, so far. These malware may steal sensitive information, control devices remotely or encrypt on-device data for ransom thus putting the end users at high risk. Besides malware authors, some unscrupulous developers clone the code from popular apps and repackage it with advertisements and new functionalities, thus stealing revenue from the original developers. The sheer volume, growth rate and evolution of malware and clone apps highlight an imperative need for developing effective and scalable automated techniques to detect them. To perform automated detection, recent approaches both from academia and industry increasingly resort to Machine Learning (ML) techniques. Typically, the detection process involves extracting semantic features from suitable representations of programs (e.g., assembly code, call graphs) and identifying malice or clone code patterns. However, most of these ML algorithms could be applied only on data represented as vectors. Hence, a pivotal factor in determining the effectiveness of these detection processes, is building suitable vector representations of programs. We intend to address this as the primary motive of this thesis. Recognizing that higher level abstractions of programs such as call graphs, control and data-flow graphs retain their semantics well, we intend to learn their representations (i.e., graph embeddings) and use them to perform malware and clone detection. We use a common term, Program Representation Graphs (PRGs) to refer to any of the aforementioned graphs. Once appropriate PRG embeddings are built, as a secondary motive, we intend to address specific issues in malware and clone detection processes. In the case of malware detection, three issues: (1) population drift induced by malware’s evolution, (2) systematic integration of malware characteristics (i.e., features) from different data sources and (3) precisely locating malicious code portions in PRGs have been addressed. In the case of clone detection, detecting semantic clones (apart from detecting syntactic clones) which remains as a crucial challenge has been addressed. The following are the achievements made in this thesis: 1. We propose a novel graph kernel specifically designed to address the malware detection problem. Previous research has revealed that besides capturing topological neighbourhoods (i.e., structural information) from these graphs it is important to capture the context under which the neighbourhoods are reachable to accurately detect malicious neighbourhoods. We observe that state-of-the-art graph kernels, such as Weisfeiler-Lehman Kernel (WLK) capture the structural information well, but fail to capture contextual information. To address this, we develop the Contextual WLK (CWLK) which is capable of capturing both these types of information. To the best of our knowledge, this is the first graph kernel specifically addressing a problem from the field of program analysis. 2. It is well-known that malware constantly evolves so as to evade detection. This causes the entire malware population to be non-stationary. Contrary to this fact, most of the prior works on ML based malware detection have assumed that the distribution of the observed malware features does not change or evolve over time. We address the problem of malware population drift and propose a novel online learning based framework to detect malware, named Casandra (Context-aware, Adaptive and Scalable ANDRoid mAlware detector). Towards performing accurate and scalable detection, Casandra uses CWLK to capture and represent security-sensitive behaviors in PRGs. Towards automatically adapting to population drift, it uses an online classifier. When evaluated with more than 87,000 apps, Casandra achieves 89.92% accuracy, outperforming existing techniques by more than 25% in their typical batch learning setting and more than 7% when they are continuously retained. 3. Existing malware detection approaches have typically used classifiers with a variety of features such as security-sensitive APIs, instruction sequences and information flows. These feature sets provide complementary perspectives (interchangeably referred as views) of apps’ behaviors with inherent strengths and limitations. Meaning, some views are more amenable to detect certain attacks while they may not characterize several other attacks well. Existing approaches (incl. Casandra) use either one or a selected few of the aforementioned feature sets which prevents them from detecting a substantial majority of attacks. To address this, we propose MKLDroid, a unified framework that systematically integrates multiple views in the hopes that, while a malware app can disguise itself in some views, disguising in every view while maintaining malicious intent will prove to be substantially more difficult. MKLDroid leverages on CWLK for extracting PRG embeddings from different views and then employs Multiple Kernel Learning (MKL) to find a weighted combination of the views which yields best detection rates. Besides integrating multiple views, its salient trait is its ability to localize and rank malice code portions (e.g., classes/methods) in PRGs based on their degree of maliciousness. 4. We observe that existing graph kernels such as WLK exhibit an inherent inability to model subgraph-level similarities which results in poor generalization when used with large graphs (such as PRGs). To address this, we propose Subgraph2vec, a novel approach for learning latent representations of rooted subgraphs inspired by recent advancements in Deep Learning. We demonstrate that these subgraph vectors could be used for building a deep learning variant of WLK. This deep graph kernel exhibits potentials to detect semantic malware and clone variants. Our experiments on several large-scale datasets reveal that Subgraph2vec achieves significant improvements in generalization and thereby, on accuracies over existing kernels on both malware and clone detection tasks. In sum, this thesis proposes two methods for learning representations of PRGs namely, CWLK and Subgraph2vec. With the PRG embeddings thus built, we address four specific issues that plague Android malware and clone detection approaches, namely, population drift, integrating multi-view features for comprehensive detection, localization of malicious code portions and semantics based detection, through leveraging on ML techniques such as Online Learning, Kernel Methods, MKL and Deep Learning. |
author2 |
Chen Lihui |
author_facet |
Chen Lihui Narayanan, Annamalai |
format |
Theses and Dissertations |
author |
Narayanan, Annamalai |
author_sort |
Narayanan, Annamalai |
title |
Machine learning techniques for program representation and comprehension with applications to mobile security |
title_short |
Machine learning techniques for program representation and comprehension with applications to mobile security |
title_full |
Machine learning techniques for program representation and comprehension with applications to mobile security |
title_fullStr |
Machine learning techniques for program representation and comprehension with applications to mobile security |
title_full_unstemmed |
Machine learning techniques for program representation and comprehension with applications to mobile security |
title_sort |
machine learning techniques for program representation and comprehension with applications to mobile security |
publishDate |
2017 |
url |
http://hdl.handle.net/10356/72704 |
_version_ |
1772826369386872832 |
spelling |
sg-ntu-dr.10356-727042023-07-04T17:26:24Z Machine learning techniques for program representation and comprehension with applications to mobile security Narayanan, Annamalai Chen Lihui School of Electrical and Electronic Engineering DRNTU::Engineering::Electrical and electronic engineering::Computer hardware, software and systems Android has evolved to be the most popular mobile operating system over the past several years, since its inception. Millions of Android apps provide a variety of functionalities to users, such as instant messaging, gaming and online shopping. However, due to its prevalence, Android also becomes a prime attack target of cybercriminals. According to Symantec’s 2016 Annual Threat Report, 13 million Android malware have been found in the wild, so far. These malware may steal sensitive information, control devices remotely or encrypt on-device data for ransom thus putting the end users at high risk. Besides malware authors, some unscrupulous developers clone the code from popular apps and repackage it with advertisements and new functionalities, thus stealing revenue from the original developers. The sheer volume, growth rate and evolution of malware and clone apps highlight an imperative need for developing effective and scalable automated techniques to detect them. To perform automated detection, recent approaches both from academia and industry increasingly resort to Machine Learning (ML) techniques. Typically, the detection process involves extracting semantic features from suitable representations of programs (e.g., assembly code, call graphs) and identifying malice or clone code patterns. However, most of these ML algorithms could be applied only on data represented as vectors. Hence, a pivotal factor in determining the effectiveness of these detection processes, is building suitable vector representations of programs. We intend to address this as the primary motive of this thesis. Recognizing that higher level abstractions of programs such as call graphs, control and data-flow graphs retain their semantics well, we intend to learn their representations (i.e., graph embeddings) and use them to perform malware and clone detection. We use a common term, Program Representation Graphs (PRGs) to refer to any of the aforementioned graphs. Once appropriate PRG embeddings are built, as a secondary motive, we intend to address specific issues in malware and clone detection processes. In the case of malware detection, three issues: (1) population drift induced by malware’s evolution, (2) systematic integration of malware characteristics (i.e., features) from different data sources and (3) precisely locating malicious code portions in PRGs have been addressed. In the case of clone detection, detecting semantic clones (apart from detecting syntactic clones) which remains as a crucial challenge has been addressed. The following are the achievements made in this thesis: 1. We propose a novel graph kernel specifically designed to address the malware detection problem. Previous research has revealed that besides capturing topological neighbourhoods (i.e., structural information) from these graphs it is important to capture the context under which the neighbourhoods are reachable to accurately detect malicious neighbourhoods. We observe that state-of-the-art graph kernels, such as Weisfeiler-Lehman Kernel (WLK) capture the structural information well, but fail to capture contextual information. To address this, we develop the Contextual WLK (CWLK) which is capable of capturing both these types of information. To the best of our knowledge, this is the first graph kernel specifically addressing a problem from the field of program analysis. 2. It is well-known that malware constantly evolves so as to evade detection. This causes the entire malware population to be non-stationary. Contrary to this fact, most of the prior works on ML based malware detection have assumed that the distribution of the observed malware features does not change or evolve over time. We address the problem of malware population drift and propose a novel online learning based framework to detect malware, named Casandra (Context-aware, Adaptive and Scalable ANDRoid mAlware detector). Towards performing accurate and scalable detection, Casandra uses CWLK to capture and represent security-sensitive behaviors in PRGs. Towards automatically adapting to population drift, it uses an online classifier. When evaluated with more than 87,000 apps, Casandra achieves 89.92% accuracy, outperforming existing techniques by more than 25% in their typical batch learning setting and more than 7% when they are continuously retained. 3. Existing malware detection approaches have typically used classifiers with a variety of features such as security-sensitive APIs, instruction sequences and information flows. These feature sets provide complementary perspectives (interchangeably referred as views) of apps’ behaviors with inherent strengths and limitations. Meaning, some views are more amenable to detect certain attacks while they may not characterize several other attacks well. Existing approaches (incl. Casandra) use either one or a selected few of the aforementioned feature sets which prevents them from detecting a substantial majority of attacks. To address this, we propose MKLDroid, a unified framework that systematically integrates multiple views in the hopes that, while a malware app can disguise itself in some views, disguising in every view while maintaining malicious intent will prove to be substantially more difficult. MKLDroid leverages on CWLK for extracting PRG embeddings from different views and then employs Multiple Kernel Learning (MKL) to find a weighted combination of the views which yields best detection rates. Besides integrating multiple views, its salient trait is its ability to localize and rank malice code portions (e.g., classes/methods) in PRGs based on their degree of maliciousness. 4. We observe that existing graph kernels such as WLK exhibit an inherent inability to model subgraph-level similarities which results in poor generalization when used with large graphs (such as PRGs). To address this, we propose Subgraph2vec, a novel approach for learning latent representations of rooted subgraphs inspired by recent advancements in Deep Learning. We demonstrate that these subgraph vectors could be used for building a deep learning variant of WLK. This deep graph kernel exhibits potentials to detect semantic malware and clone variants. Our experiments on several large-scale datasets reveal that Subgraph2vec achieves significant improvements in generalization and thereby, on accuracies over existing kernels on both malware and clone detection tasks. In sum, this thesis proposes two methods for learning representations of PRGs namely, CWLK and Subgraph2vec. With the PRG embeddings thus built, we address four specific issues that plague Android malware and clone detection approaches, namely, population drift, integrating multi-view features for comprehensive detection, localization of malicious code portions and semantics based detection, through leveraging on ML techniques such as Online Learning, Kernel Methods, MKL and Deep Learning. Doctor of Philosophy (EEE) 2017-10-09T07:22:49Z 2017-10-09T07:22:49Z 2017 Thesis Narayanan, A. (2017). Machine learning techniques for program representation and comprehension with applications to mobile security. Doctoral thesis, Nanyang Technological University, Singapore. http://hdl.handle.net/10356/72704 10.32657/10356/72704 en 224 p. application/pdf |