On the Feasibility of Adversarial Sample Creation Using the Android System API
Abstract
:1. Introduction
- We discuss the constraints required to create concrete, working Android adversarial samples through API call injection;
- We evaluate the feasibility of injecting system API calls by both identifying the subset of the usable ones and explaining their relevance to evasion through a gradient-based interpretability technique;
- We evaluate the effectiveness of mimicry and random noise addition attacks against a state-of-the-art ransomware detector that employs non-binary features;
- We develop a basic implementation of the considered injection strategy that creates working adversarial malicious samples.
2. Android Background
2.1. Android Applications
- AndroidManifest.xml: This specifies the structure and the main components of the application; for example, it lists the permissions required by the app and its activities, i.e., the components that usually show a user interface;
- Resources: graphical elements and .xml files used to define the layout properties of the application;
- Assets: external resources of the application, such as multimedia files and native libraries;
- Classes.dex: dex stands for Dalvik EXecutable. Android apps have one or more of these files, which contain the executable code of the application. Since our work focuses on the alteration of dex code, we describe the content of .dex files in the following.
- Header: This contains information about the file composition, such as the offsets and the size of other parts of the file (such as constants and data structures). This data collection is crucial to reconstruct the bytecode in the correct way when the code is compiled to ARM;
- Constants: They represent the addresses of the strings, flags, variables, classes, and method names of the application;
- Classes: This is the definition of all the class parameters, like the superclass, the access type, and the list of methods with all the references to the data contained in the data structure;
- Data structure: This is the container for the actual data of the application, such as the method code or the content of static variables.
2.2. Android Malware Detection
2.3. Detection Evasion and Defense
3. Related Work
4. Model Description And Methodology
4.1. Threat Model
- (a)
- the dataset ;
- (b)
- the feature space ;
- (c)
- the classification function .
4.2. The Problem Space Domain
4.2.1. Constraints
4.2.2. API Injection Feasibility
4.3. Adversarial Malware Creation
5. Experimental Results
5.1. Setting
5.2. API Injection Evaluation
5.3. Attack Results
5.3.1. Mimicry Attack
5.3.2. Random Noise Attack
5.4. Injection Impact
6. Conclusions, Limitations, and Future Work
Author Contributions
Funding
Conflicts of Interest
References
- McAfee. McAfee Mobile Threat Report; McAfee: Santa Clara, CA, USA, 2020. [Google Scholar]
- Kaspersky. IT Threat Evolution Q3 2019. Statistics. Available online: https://securelist.com/it-threat-evolution-q3-2019-statistics/95269 (accessed on 29 October 2019).
- Feng, Y.; Anand, S.; Dillig, I.; Aiken, A. Apposcopy: Semantics-based detection of Android malware through static analysis. In Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, Hong Kong, China, 16–22 November 2014; pp. 576–587. [Google Scholar] [CrossRef] [Green Version]
- Arzt, S.; Rasthofer, S.; Fritz, C.; Bodden, E.; Bartel, A.; Klein, J.; Le Traon, Y.; Octeau, D.; McDaniel, P. FlowDroid: Precise context, flow, field, object-sensitive and lifecycle-aware taint analysis for Android apps. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation—PLDI’14, Edinburgh, UK, 9–11 June 2014; ACM Press: New York, NY, USA, 2013; pp. 259–269. [Google Scholar] [CrossRef]
- Zhou, Y.; Wang, Z.; Zhou, W.; Jiang, X. Hey, you, get off of my market: Detecting malicious apps in official and alternative android markets. NDSS 2012, 25, 50–52. [Google Scholar]
- Tam, K.; Khan, S.J.; Fattori, A.; Cavallaro, L. CopperDroid: Automatic Reconstruction of Android Malware Behaviors. In Proceedings of the 2015 Network and Distributed System Security Symposium, Internet Society, San Diego, CA, USA, 8–11 February 2015. [Google Scholar] [CrossRef] [Green Version]
- Zhang, Y.; Yang, M.; Xu, B.; Yang, Z.; Gu, G.; Ning, P.; Wang, X.S.; Zang, B. Vetting undesirable behaviors in android apps with permission use analysis. In Proceedings of the 2013 ACM SIGSAC Conference on Computer & Communications Security—CCS ’13, Berlin, Germany, 4–8 November 2013; ACM Press: New York, NY, USA, 2013; pp. 611–622. [Google Scholar] [CrossRef] [Green Version]
- Chen, J.; Wang, C.; Zhao, Z.; Chen, K.; Du, R.; Ahn, G.J. Uncovering the Face of Android Ransomware: Characterization and Real-Time Detection. IEEE Trans. Inf. Forensics Secur. 2018, 13, 1286–1300. [Google Scholar] [CrossRef]
- Fereidooni, H.; Conti, M.; Yao, D.; Sperduti, A. ANASTASIA: ANdroid mAlware detection using STatic analySIs of Applications. In Proceedings of the 2016 8th IFIP International Conference on New Technologies, Mobility and Security (NTMS), Larnaca, Cyprus, 21–23 November 2016. [Google Scholar] [CrossRef]
- Arp, D.; Spreitzenbarth, M.; Hübner, M.; Gascon, H.; Rieck, K. Drebin: Effective and Explainable Detection of Android Malware in Your Pocket. In Proceedings of the 2014 Network and Distributed System Security Symposium. Internet Society, San Diego, CA, USA, 23–26 February 2014. [Google Scholar] [CrossRef] [Green Version]
- Chen, S.; Xue, M.; Tang, Z.; Xu, L.; Zhu, H. StormDroid: A Streaminglized Machine Learning-Based System for Detecting Android Malware. In Proceedings of the 11th ACM on Asia Conference on Computer and Communications Security—ASIA CCS’16, Xi’an, China, 30 May–3 June 2016; ACM Press: New York, NY, USA, 2016; pp. 377–388. [Google Scholar] [CrossRef]
- Maiorca, D.; Mercaldo, F.; Giacinto, G.; Visaggio, C.A.; Martinelli, F. R-PackDroid: API package-based characterization and detection of mobile ransomware. In Proceedings of the Symposium on Applied Computing—SAC’17, Santa Fe, NM, USA, 13–17 March 2005; ACM Press: New York, NY, USA, 2017; pp. 1718–1723. [Google Scholar] [CrossRef]
- Yuan, Z.; Lu, Y.; Wang, Z.; Xue, Y. Droid-Sec: Deep learning in android malware detection. In Proceedings of the 2014 ACM Conference on SIGCOMM—SIGCOMM’14, Chicago, IL, USA, 17–22 August 2014; ACM Press: New York, NY, USA, 2014; pp. 371–372. [Google Scholar] [CrossRef]
- Demontis, A.; Melis, M.; Biggio, B.; Maiorca, D.; Arp, D.; Rieck, K.; Corona, I.; Giacinto, G.; Roli, F. Yes, Machine Learning Can Be More Secure! A Case Study on Android Malware Detection. IEEE Trans. Dependable Secur. Comput. 2019, 16, 711–724. [Google Scholar] [CrossRef] [Green Version]
- Biggio, B.; Corona, I.; Maiorca, D.; Nelson, B.; Šrndić, N.; Laskov, P.; Giacinto, G.; Roli, F. Evasion Attacks against Machine Learning at Test Time. In Advanced Information Systems Engineering; Springer: Berlin/Heidelberg, Germany, 2013; Volume 7908, pp. 387–402. [Google Scholar] [CrossRef] [Green Version]
- Maiorca, D.; Corona, I.; Giacinto, G. Looking at the bag is not enough to find the bomb: An evasion of structural methods for malicious pdf files detection. In Proceedings of the 8th ACM SIGSAC Symposium on Information, Computer and Communications Security, Hangzhou, China, 8–10 May 2013; pp. 119–130. [Google Scholar]
- Melis, M.; Maiorca, D.; Biggio, B.; Giacinto, G.; Roli, F. Explaining black-box android malware detection. In Proceedings of the IEEE 2018 26th European Signal Processing Conference (EUSIPCO), Rome, Italy, 3–7 September 2018; pp. 524–528. [Google Scholar]
- Quiring, E.; Maier, A.; Rieck, K. Misleading Authorship Attribution of Source Code using Adversarial Learning | USENIX. In Proceedings of the 28th USENIX Security Symposium (USENIX Security 19), Santa Clara, CA, USA, 14–16 August 2019; pp. 479–496. [Google Scholar]
- Pierazzi, F.; Pendlebury, F.; Cortellazzi, J.; Cavallaro, L. Intriguing Properties of Adversarial ML Attacks in the Problem Space. In Proceedings of the 2020 IEEE Symposium on Security and Privacy (SP), San Francisco, CA, USA, 18–21 May 2020; pp. 1332–1349. [Google Scholar] [CrossRef]
- Song, W.; Li, X.; Afroz, S.; Garg, D.; Kuznetsov, D.; Yin, H. Automatic Generation of Adversarial Examples for Interpreting Malware Classifiers. arXiv 2020, arXiv:2003.03100. [Google Scholar]
- Scalas, M.; Maiorca, D.; Mercaldo, F.; Visaggio, C.A.; Martinelli, F.; Giacinto, G. On the effectiveness of system API-related information for Android ransomware detection. Comput. Secur. 2019, 86, 168–182. [Google Scholar] [CrossRef] [Green Version]
- Maiorca, D.; Ariu, D.; Corona, I.; Aresu, M.; Giacinto, G. Stealth attacks: An extended insight into the obfuscation effects on android malware. Comput. Secur. 2015, 51, 16–31. [Google Scholar] [CrossRef]
- Faruki, P.; Bharmal, A.; Laxmi, V.; Ganmoor, V.; Gaur, M.S.; Conti, M.; Rajarajan, M. Android Security: A Survey of Issues, Malware Penetration, and Defenses. IEEE Commun. Surv. Tutor. 2015, 17, 998–1022. [Google Scholar] [CrossRef] [Green Version]
- Zhang, F.; Huang, H.; Zhu, S.; Wu, D.; Liu, P. ViewDroid: Towards obfuscation-resilient mobile application repackaging detection. In Proceedings of the 2014 ACM Conference on Security and Privacy in Wireless & Mobile Networks, Oxford, UK, 23–25 July 2014; pp. 25–36. [Google Scholar]
- Barreno, M.; Nelson, B.; Joseph, A.D.; Tygar, J.D. The security of machine learning. Mach. Learn. 2010, 81, 121–148. [Google Scholar] [CrossRef] [Green Version]
- Barreno, M.; Nelson, B.; Sears, R.; Joseph, A.D.; Tygar, J.D. Can machine learning be secure? In Proceedings of the 2006 ACM Symposium on Information, Computer and Communications Security—ASIACCS ’06, Taipei, Taiwan, 21–24 March 2006; p. 16. [Google Scholar] [CrossRef] [Green Version]
- Dalla Preda, M.; Madou, M.; De Bosschere, K.; Giacobazzi, R. Opaque Predicates Detection by Abstract Interpretation. In Algebraic Methodology and Software Technology; Springer: Berlin/Heidelberg, Germany, 2006; Volume 4019, pp. 81–95. [Google Scholar] [CrossRef] [Green Version]
- Ming, J.; Xu, D.; Wang, L.; Wu, D. LOOP: Logic-Oriented Opaque Predicate Detection in Obfuscated Binary Code. In Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security—CCS’15, Denver, CO, USA, 12–16 October 2015; pp. 757–768. [Google Scholar] [CrossRef]
- Grosse, K.; Papernot, N.; Manoharan, P.; Backes, M.; McDaniel, P. Adversarial Examples for Malware Detection. In Proceedings of the Computer Security—ESORICS 2017, Oslo, Norway, 11–15 September 2017; pp. 62–79. [Google Scholar]
- Yang, W.; Kong, D.; Xie, T.; Gunter, C.A. Malware Detection in Adversarial Settings: Exploiting Feature Evolutions and Confusions in Android Apps. In Proceedings of the 33rd Annual Computer Security Applications Conference, Orlando, FL, USA, 4–8 December 2017; pp. 288–302. [Google Scholar] [CrossRef]
- Yang, W.; Xiao, X.; Andow, B.; Li, S.; Xie, T.; Enck, W. AppContext: Differentiating Malicious and Benign Mobile App Behaviors Using Context. In Proceedings of the 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering, Florence, Italy, 16–24 May 2015; Volume 1, pp. 303–313. [Google Scholar] [CrossRef]
- Rosenberg, I.; Shabtai, A.; Rokach, L.; Elovici, Y. Generic Black-Box End-to-End Attack Against State of the Art API Call Based Malware Classifiers. arXiv 2018, arXiv:1707.05970. [Google Scholar]
- Hu, W.; Tan, Y. Generating Adversarial Malware Examples for Black-Box Attacks Based on GAN. arXiv 2017, arXiv:1702.05983. [Google Scholar]
- Li, J.; Madry, A.; Peebles, J.; Schmidt, L. Towards Understanding the Dynamics of Generative Adversarial Networks. arXiv 2017, arXiv:1706.09884. [Google Scholar]
- Sundararajan, M.; Taly, A.; Yan, Q. Axiomatic Attribution for Deep Networks. In Proceedings of the 34th International Conference on Machine Learning, Sydney, Australia, 6–11 August 2017; pp. 3319–3328. [Google Scholar]
- Ancona, M.; Ceolini, E.; Öztireli, C.; Gross, M. Gradient-Based Attribution Methods. In Explainable AI: Interpreting, Explaining and Visualizing Deep Learning; Springer: Cham, Switzerlands, 2019; Volume 11700, pp. 169–191. [Google Scholar] [CrossRef]
- Melis, M.; Scalas, M.; Demontis, A.; Maiorca, D.; Biggio, B.; Giacinto, G.; Roli, F. Do Gradient-based Explanations Tell Anything About Adversarial Robustness to Android Malware? arXiv 2020, arXiv:2005.01452. [Google Scholar]
- Smali/Baksmali. Available online: https://github.com/JesusFreke/smali (accessed on 29 October 2019).
- Apktool. Available online: https://ibotpeaches.github.io/Apktool (accessed on 29 October 2019).
- VirusTotal. Available online: https://www.virustotal.com (accessed on 29 October 2019).
- Andronio, N.; Zanero, S.; Maggi, F. HelDroid: Dissecting and Detecting Mobile Ransomware. In Research in Attacks, Intrusions, and Defenses; Springer International Publishing: Cham, Switzerlands, 2015; pp. 382–404. [Google Scholar]
- Python Market Android Library. Available online: https://github.com/liato/android-market-API-py (accessed on 29 October 2019).
- Allix, K.; Bissyandé, T.F.; Klein, J.; Le Traon, Y. AndroZoo: Collecting millions of Android apps for the research community. In Proceedings of the 13th International Workshop on Mining Software Repositories—MSR ’16, Austin, TX, USA, 14–15 May 2016; pp. 468–471. [Google Scholar] [CrossRef]
- Android API Reference. Available online: https://developer.android.com/reference/packages (accessed on 29 October 2019).
- Keras. Available online: https://keras.io (accessed on 29 October 2019).
- DeepExplain. Available online: https://github.com/marcoancona/DeepExplain (accessed on 29 October 2019).
Granularity (%) | Android API Level | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | |
Packages | 53 | 54 | 55 | 56 | 56 | 56 | 55 | 55 | 55 | 56 | 57 | 57 | 56 | 56 | 55 | 55 | 55 | 55 | 55 | 54 | 53 | 53 | 53 | 53 | 51 | 51 | 51 | 51 |
Classes | 27 | 26 | 26 | 25 | 25 | 25 | 24 | 24 | 24 | 24 | 24 | 24 | 23 | 23 | 22 | 22 | 21 | 21 | 21 | 19 | 19 | 18 | 18 | 18 | 17 | 17 | 16 | 15 |
(a) | ||||||||||||||||||||||||||||
Granularity (%) | Android API Level | |||||||||||||||||||||||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | |
Packages | 58 | 59 | 59 | 61 | 61 | 61 | 60 | 59 | 59 | 60 | 61 | 61 | 60 | 60 | 59 | 59 | 58 | 58 | 58 | 57 | 58 | 58 | 58 | 58 | 56 | 56 | 55 | 55 |
Classes | 33 | 32 | 32 | 31 | 31 | 31 | 30 | 29 | 29 | 29 | 29 | 29 | 28 | 28 | 27 | 26 | 26 | 25 | 25 | 23 | 23 | 22 | 21 | 21 | 20 | 20 | 19 | 18 |
(b) |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Cara, F.; Scalas, M.; Giacinto, G.; Maiorca, D. On the Feasibility of Adversarial Sample Creation Using the Android System API. Information 2020, 11, 433. https://doi.org/10.3390/info11090433
Cara F, Scalas M, Giacinto G, Maiorca D. On the Feasibility of Adversarial Sample Creation Using the Android System API. Information. 2020; 11(9):433. https://doi.org/10.3390/info11090433
Chicago/Turabian StyleCara, Fabrizio, Michele Scalas, Giorgio Giacinto, and Davide Maiorca. 2020. "On the Feasibility of Adversarial Sample Creation Using the Android System API" Information 11, no. 9: 433. https://doi.org/10.3390/info11090433
APA StyleCara, F., Scalas, M., Giacinto, G., & Maiorca, D. (2020). On the Feasibility of Adversarial Sample Creation Using the Android System API. Information, 11(9), 433. https://doi.org/10.3390/info11090433