A security vulnerability predictor based on source code metrics

被引:3
|
作者
Pakshad, Puya [1 ]
Shameli-Sendi, Alireza [1 ]
Abbasi, Behzad Khalaji Emamzadeh [1 ]
机构
[1] Shahid Beheshti Univ SBU, Fac Comp Sci & Engn, Tehran, Iran
关键词
Security testing; Vulnerability detection; Program metric; Code property graph;
D O I
10.1007/s11416-023-00469-y
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Detecting security vulnerabilities in the source code of software systems is one of the most important challenges in the field of software security. We need an effective solution to discover and patch vulnerabilities before our valuable information is compromised. Security testing is a type of software testing that checks whether software is vulnerable to cyber attacks. This study aimed to pursue three main objectives: (1) The first goal is to identify the vulnerable functions of a C/C++ software program based on code metrics. This can reduce the cost of software security testing and also redirect the related activities to identified vulnerable functions rather than to the entire software, (2) The second goal is to identify the type of attack related to the vulnerability function, and (3) Finally, the ultimate goal is to analyze the relationship between code metrics and the vulnerabilities. This goal can help us understand which code structure is most likely to contain vulnerable code. This paper first aimed to create a comprehensive view of the source code of the target software using graph concepts. Second, a set of source code metrics and calculated by crawling on the related graph using the static analysis approach. Finally, the vulnerability prediction model presented in this paper is based on machine learning technique applied on metrics extracted from program source code. Compared to previous work, new achievements have been made in this paper. One of the most important ones is the very high accuracy detection of the proposed model in detecting the type of vulnerability. Moreover, 15 code metrics are used to predict vulnerabilities. Our analysis on feature importance indicates that what structure the software program code has, most likely, it will be vulnerable. Experimental results in 10 real projects (OpenSSL, SQLite, FreeType, LibTiff, Libxslt, Binutils, FFmpeg, ImageMagick, OpenSC, and rdesktop) indicated that the security testing predictor proposed in this paper could predict on average 89% of the really vulnerable functions of the source code and 86% of the vulnerability type of the detected functions correctly.
引用
收藏
页码:615 / 633
页数:19
相关论文
共 50 条
  • [1] A security vulnerability predictor based on source code metrics
    Puya Pakshad
    Alireza Shameli-Sendi
    Behzad Khalaji Emamzadeh Abbasi
    Journal of Computer Virology and Hacking Techniques, 2023, 19 : 615 - 633
  • [2] Predicting Security Vulnerabilities using Source Code Metrics
    Ganesh, Sundarakrishnan
    Ohlsson, Tobias
    Palma, Francis
    PROCEEDINGS OF THE 2021 SWEDISH WORKSHOP ON DATA SCIENCE (SWEDS), 2021,
  • [3] Are Source Code Metrics "Good Enough" in Predicting Security Vulnerabilities?
    Ganesh, Sundarakrishnan
    Palma, Francis
    Olsson, Tobias
    DATA, 2022, 7 (09)
  • [4] Detecting Violations of Security Requirements for Vulnerability Discovery in Source Code
    Li, Hongzhe
    Oh, Jaesang
    Lee, Heejo
    IEICE TRANSACTIONS ON INFORMATION AND SYSTEMS, 2016, E99D (09): : 2385 - 2389
  • [5] Environmental Metrics for Software Security Based on a Vulnerability Ontology
    Wang, Ju An
    Guo, Minzhe
    Wang, Hao
    Xia, Min
    Zhou, Linfeng
    2009 THIRD IEEE INTERNATIONAL CONFERENCE ON SECURE SOFTWARE INTEGRATION AND RELIABILITY IMPROVEMENT, PROCEEDINGS, 2009, : 159 - 168
  • [6] Vulnerability Metrics for Graph-based Configuration Security
    Igartibo, Ibifubara
    Albanese, Massimiliano
    Mosko, Marc
    Bier, Eric
    Brito, Alejandro E.
    SECRYPT 2021: PROCEEDINGS OF THE 18TH INTERNATIONAL CONFERENCE ON SECURITY AND CRYPTOGRAPHY, 2021, : 259 - 270
  • [7] Metrics based optimization of functional source code
    Kiraly, Roland
    Kitlei, Robert
    ANNALES MATHEMATICAE ET INFORMATICAE, 2011, 38 : 59 - 74
  • [8] A catalog of metrics at source code level for vulnerability prediction: A systematic mapping study
    Codabux, Zadia
    Zakia Sultana, Kazi
    Chowdhury, Md Naseef-Ur-Rahman
    JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2024, 36 (07)
  • [9] Vulnerability Detection Method Based on Structured Text and Code Metrics
    Yang H.
    Ying L.
    Zhang L.
    Hunan Daxue Xuebao/Journal of Hunan University Natural Sciences, 2022, 49 (04): : 58 - 68
  • [10] Automatic Vulnerability Identification and Security Installation with Type Checking for Source Code
    Hinatsu, Shun
    Shimizu, Koichi
    Ueda, Takeshi
    Boyer, Benoit
    Mentre, David
    ADVANCES IN NETWORKED-BASED INFORMATION SYSTEMS, NBIS-2019, 2020, 1036 : 292 - 304