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 条
  • [31] A trusted source-based model of mobile code security
    Liu, Wei-Wei
    Li, Xiao-Yong
    Han, Zhen
    PROCEEDINGS OF 2007 INTERNATIONAL CONFERENCE ON MACHINE LEARNING AND CYBERNETICS, VOLS 1-7, 2007, : 2154 - 2157
  • [32] Source Code Metrics and Maintainability: A Case Study
    Hegedus, Peter
    Bakota, Tibor
    Illes, Laszlo
    Ladanyi, Gergely
    Ferenc, Rudolf
    Gyimothy, Tibor
    SOFTWARE ENGINEERING, BUSINESS CONTINUITY, AND EDUCATION, 2011, 257 : 272 - +
  • [33] Source Code Metrics for Software Defects Prediction
    Rebro, Dominik Arne
    Rossi, Bruno
    Chren, Stanislav
    38TH ANNUAL ACM SYMPOSIUM ON APPLIED COMPUTING, SAC 2023, 2023, : 1469 - 1472
  • [34] Source code metrics: A systematic mapping study
    Nunez-Varela, Alberto S.
    Perez-Gonzalez, Hector G.
    Martinez-Perez, Francisco E.
    Soubervielle-Montalvo, Carlos
    JOURNAL OF SYSTEMS AND SOFTWARE, 2017, 128 : 164 - 197
  • [35] FACTOR-ANALYSIS OF SOURCE CODE METRICS
    COUPAL, D
    ROBILLARD, PN
    JOURNAL OF SYSTEMS AND SOFTWARE, 1990, 12 (03) : 263 - 269
  • [36] Source code metrics and maintainability: A case study
    University of Szeged, Department of Software Engineering, Árpád tér 2, H-6720 Szeged, Hungary
    不详
    Commun. Comput. Info. Sci., (272-284):
  • [37] Extracting Relative Thresholds for Source Code Metrics
    Oliveira, Paloma
    Valente, Marco Tulio
    Lima, Fernando Paim
    2014 SOFTWARE EVOLUTION WEEK - IEEE CONFERENCE ON SOFTWARE MAINTENANCE, REENGINEERING, AND REVERSE ENGINEERING (CSMR-WCRE), 2014, : 254 - +
  • [38] A Catalog of Source Code Metrics - A Tertiary Study
    Iftikhar, Umar
    Bin Ali, Nauman
    Borstler, Jurgen
    Usman, Muhammad
    SOFTWARE QUALITY: HIGHER SOFTWARE QUALITY THROUGH ZERO WASTE DEVELOPMENT, SWQD 2023, 2023, 472 : 87 - 106
  • [39] RELATION BETWEEN SOURCE CODE METRICS AND STRUCTURE-ANALYSIS METRICS
    ROZMAN, I
    GYORKOS, J
    DOGSA, T
    LECTURE NOTES IN COMPUTER SCIENCE, 1991, 550 : 332 - 342
  • [40] Machine learning based software fault prediction utilizing source code metrics
    Bhandari, Guru Prasad
    Gupta, Ratneshwer
    PROCEEDINGS ON 2018 IEEE 3RD INTERNATIONAL CONFERENCE ON COMPUTING, COMMUNICATION AND SECURITY (ICCCS), 2018, : 40 - 45