skip to main content
10.1145/3468264.3468597acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
research-article
Public Access

Vulnerability detection with fine-grained interpretations

Published:18 August 2021Publication History

ABSTRACT

Despite the successes of machine learning (ML) and deep learning (DL)-based vulnerability detectors (VD), they are limited to providing only the decision on whether a given code is vulnerable or not, without details on what part of the code is relevant to the detected vulnerability. We present IVDetect, an interpretable vulnerability detector with the philosophy of using Artificial Intelligence (AI) to detect vulnerabilities, while using Intelligence Assistant (IA) to provide VD interpretations in terms of vulnerable statements.

For vulnerability detection, we separately consider the vulnerable statements and their surrounding contexts via data and control dependencies. This allows our model better discriminate vulnerable statements than using the mixture of vulnerable code and contextual code as in existing approaches. In addition to the coarse-grained vulnerability detection result, we leverage interpretable AI to provide users with fine-grained interpretations that include the sub-graph in the Program Dependency Graph (PDG) with the crucial statements that are relevant to the detected vulnerability. Our empirical evaluation on vulnerability databases shows that IVDetect outperforms the existing DL-based approaches by 43%–84% and 105%–255% in top-10 nDCG and MAP ranking scores. IVDetect correctly points out the vulnerable statements relevant to the vulnerability via its interpretation in 67% of the cases with a top-5 ranked list. IVDetect improves over the baseline interpretation models by 12.3%–400% and 9%–400% in accuracy.

References

  1. [n.d.]. Checkmarx. https://www.checkmarx.com/Google ScholarGoogle Scholar
  2. [n.d.]. Coverity. https://scan.coverity.com/Google ScholarGoogle Scholar
  3. [n.d.]. CWE-120: Buffer Overflow. https://cwe.mitre.org/data/definitions/120.htmlGoogle ScholarGoogle Scholar
  4. [n.d.]. CWE-290: Authentication Bypass by Spoofing. https://cwe.mitre.org/data/definitions/290.htmlGoogle ScholarGoogle Scholar
  5. [n.d.]. CWE-79: Cross-site Scripting. http://cwe.mitre.org/data/definitions/79.htmlGoogle ScholarGoogle Scholar
  6. [n.d.]. CWE-89: SQL Injection. https://cwe.mitre.org/data/definitions/89.htmlGoogle ScholarGoogle Scholar
  7. [n.d.]. FlawFinder. http://www.dwheeler.com/FlawFinderGoogle ScholarGoogle Scholar
  8. [n.d.]. HP Fortify. https://www.hpfod.com/Google ScholarGoogle Scholar
  9. [n.d.]. RATS: Rough Audit Tool for Security. https://code.google.com/archive/p/rough-auditing-tool-for-security/Google ScholarGoogle Scholar
  10. 2021. The GitHub Repository for This Study. https://github.com/vulnerabilitydetection/VulnerabilityDetectionResearchGoogle ScholarGoogle Scholar
  11. Saikat Chakraborty, Rahul Krishna, Yangruibo Ding, and Baishakhi Ray. 2020. Deep Learning based Vulnerability Detection: Are We There Yet? arXiv preprint arXiv:2009.07235.Google ScholarGoogle Scholar
  12. Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. 2014. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555.Google ScholarGoogle Scholar
  13. Jiahao Fan, Yi Li, Shaohua Wang, and Tien Nguyen. 2020. A C/C++ Code Vulnerability Dataset with Code Changes and CVE Summaries. In The 2020 International Conference on Mining Software Repositories (MSR).Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Jacob Harer, Onur Ozdemir, Tomo Lazovich, Christopher Reale, Rebecca Russell, and Louis Kim. 2018. Learning to repair software vulnerabilities with generative adversarial networks. In Advances in Neural Information Processing Systems. 7933–7943.Google ScholarGoogle Scholar
  15. Jacob A Harer, Louis Y Kim, Rebecca L Russell, Onur Ozdemir, Leonard R Kosta, Akshay Rangamani, Lei H Hamilton, Gabriel I Centeno, Jonathan R Key, and Paul M Ellingwood. 2018. Automated software vulnerability detection with machine learning. arXiv preprint arXiv:1803.04497.Google ScholarGoogle Scholar
  16. Fabian Keller, Lars Grunske, Simon Heiden, Antonio Filieri, Andre van Hoorn, and David Lo. 2017. A critical evaluation of spectrum-based fault localization techniques on a large-scale software system. In 2017 IEEE International Conference on Software Quality, Reliability and Security (QRS). 114–125.Google ScholarGoogle ScholarCross RefCross Ref
  17. Thomas N. Kipf and Max Welling. 2016. Semi-Supervised Classification with Graph Convolutional Networks. CoRR, abs/1609.02907 (2016), arxiv:1609.02907. arxiv:1609.02907Google ScholarGoogle Scholar
  18. Yi Li, Shaohua Wang, Tien N Nguyen, and Son Van Nguyen. 2019. Improving bug detection via context-based code representation learning and attention-based neural networks. Proceedings of the ACM on Programming Languages, 3, OOPSLA (2019), 1–30.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Zhen Li, Deqing Zou, Shouhuai Xu, Hai Jin, Yawei Zhu, and Zhaoxuan Chen. 2018. Sysevr: A framework for using deep learning to detect software vulnerabilities. arXiv preprint arXiv:1807.06756.Google ScholarGoogle Scholar
  20. Zhen Li, Deqing Zou, Shouhuai Xu, Xinyu Ou, Hai Jin, Sujuan Wang, Zhijun Deng, and Yuyi Zhong. 2018. Vuldeepecker: A deep learning-based system for vulnerability detection. arXiv preprint arXiv:1801.01681.Google ScholarGoogle Scholar
  21. Microsoft. [n.d.]. Neural Network Intelligence.. https://github.com/microsoft/nni Last Accessed August 28th, 2020.Google ScholarGoogle Scholar
  22. Stephan Neuhaus and Thomas Zimmermann. 2009. The Beauty and the Beast: Vulnerabilities in Red Hat’s Packages.. In USENIX Annual Technical Conference.Google ScholarGoogle Scholar
  23. Stephan Neuhaus, Thomas Zimmermann, Christian Holler, and Andreas Zeller. 2007. Predicting vulnerable software components. In Proceedings of the 14th ACM conference on Computer and communications security. 529–540.Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Son Nguyen, Hung Dang Phan, Trinh Le, and Tien N. Nguyen. 2020. Suggesting Natural Method Names to Check Name Consistencies. In Proceedings of the 42nd International Conference on Software Engineering (ICSE ’20). ACM Press, 12 pages.Google ScholarGoogle Scholar
  25. Tung Thanh Nguyen, Hoan Anh Nguyen, Nam H. Pham, Jafar M. Al-Kofahi, and Tien N. Nguyen. 2009. Graph-Based Mining of Multiple Object Usage Patterns. In Proceedings of the 7th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on The Foundations of Software Engineering (ESEC/FSE ’09). Association for Computing Machinery, New York, NY, USA. 383–392. isbn:9781605580012 https://doi.org/10.1145/1595696.1595767 Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Jeffrey Pennington, Richard Socher, and Christopher D. Manning. 2014. GloVe: Global Vectors for Word Representation. In Empirical Methods in Natural Language Processing (EMNLP). 1532–1543. http://www.aclweb.org/anthology/D14-1162Google ScholarGoogle Scholar
  27. Nam H. Pham, Tung Thanh Nguyen, Hoan Anh Nguyen, and Tien N. Nguyen. 2010. Detection of recurring software vulnerabilities. In Proceedings of the IEEE/ACM international conference on Automated software engineering. 447–456.Google ScholarGoogle Scholar
  28. Rebecca Russell, Louis Kim, Lei Hamilton, Tomo Lazovich, Jacob Harer, Onur Ozdemir, Paul Ellingwood, and Marc McConley. 2018. Automated vulnerability detection in source code using deep representation learning. In 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA). 757–762.Google ScholarGoogle ScholarCross RefCross Ref
  29. Riccardo Scandariato, James Walden, Aram Hovsepyan, and Wouter Joosen. 2014. Predicting vulnerable software components via text mining. IEEE Transactions on Software Engineering, 40, 10 (2014), 993–1006.Google ScholarGoogle ScholarCross RefCross Ref
  30. Min Shi, Yufei Tang, Xingquan Zhu, and Jianxun Liu. 2019. Feature-attention graph convolutional networks for noise resilient learning. arXiv preprint arXiv:1912.11755.Google ScholarGoogle Scholar
  31. Yonghee Shin, Andrew Meneely, Laurie Williams, and Jason A Osborne. 2010. Evaluating complexity, code churn, and developer activity metrics as indicators of software vulnerabilities. IEEE transactions on software engineering, 37, 6 (2010), 772–787.Google ScholarGoogle Scholar
  32. Kai Sheng Tai, Richard Socher, and Christopher D Manning. 2015. Improved semantic representations from tree-structured long short-term memory networks. arXiv preprint arXiv:1503.00075.Google ScholarGoogle Scholar
  33. John Viega, Jon-Thomas Bloch, Yoshi Kohno, and Gary McGraw. 2000. ITS4: A static vulnerability scanner for C and C++ code. In Proceedings 16th Annual Computer Security Applications Conference (ACSAC’00). 257–267.Google ScholarGoogle ScholarCross RefCross Ref
  34. Fabian Yamaguchi, Felix Lindner, and Konrad Rieck. 2011. Vulnerability extrapolation: Assisted discovery of vulnerabilities using machine learning. In Proceedings of the 5th USENIX conference on Offensive technologies. 13–13.Google ScholarGoogle Scholar
  35. Fabian Yamaguchi, Markus Lottmann, and Konrad Rieck. 2012. Generalized vulnerability extrapolation using abstract syntax trees. In Proceedings of the 28th Annual Computer Security Applications Conference. 359–368.Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Zhitao Ying, Dylan Bourgeois, Jiaxuan You, Marinka Zitnik, and Jure Leskovec. 2019. GNNExplainer: Generating Explanations for Graph Neural Networks. In Advances in Neural Information Processing Systems 32, H. Wallach, H. Larochelle, A. Beygelzimer, F. d' Alché-Buc, E. Fox, and R. Garnett (Eds.). Curran Associates, Inc., 9244–9255.Google ScholarGoogle Scholar
  37. Yaqin Zhou, Shangqing Liu, Jingkai Siow, Xiaoning Du, and Yang Liu. 2019. Devign: Effective vulnerability identification by learning comprehensive program semantics via graph neural networks. In Advances in Neural Information Processing Systems. 10197–10207.Google ScholarGoogle Scholar

Index Terms

  1. Vulnerability detection with fine-grained interpretations

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      ESEC/FSE 2021: Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering
      August 2021
      1690 pages
      ISBN:9781450385626
      DOI:10.1145/3468264

      Copyright © 2021 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 18 August 2021

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate112of543submissions,21%

      Upcoming Conference

      FSE '24

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader