Machine Learning Methods for Software Vulnerability Detection

Boris Chernis, Rakesh M. Verma
{"title":"Machine Learning Methods for Software Vulnerability Detection","authors":"Boris Chernis, Rakesh M. Verma","doi":"10.1145/3180445.3180453","DOIUrl":null,"url":null,"abstract":"Software vulnerabilities are a primary concern in the IT security industry, as malicious hackers who discover these vulnerabilities can often exploit them for nefarious purposes. However, complex programs, particularly those written in a relatively low-level language like C, are difficult to fully scan for bugs, even when both manual and automated techniques are used. Since analyzing code and making sure it is securely written is proven to be a non-trivial task, both static analysis and dynamic analysis techniques have been heavily investigated, and this work focuses on the former. The contribution of this paper is a demonstration of how it is possible to catch a large percentage of bugs by extracting text features from functions in C source code and analyzing them with a machine learning classifier. Relatively simple features (character count, character diversity, entropy, maximum nesting depth, arrow count, \"if\" count, \"if\" complexity, \"while\" count, and \"for\" count) were extracted from these functions, and so were complex features (character n-grams, word n-grams, and suffix trees). The simple features performed unexpectedly better compared to the complex features (74% accuracy compared to 69% accuracy).","PeriodicalId":355181,"journal":{"name":"Proceedings of the Fourth ACM International Workshop on Security and Privacy Analytics","volume":"55 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-03-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"46","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the Fourth ACM International Workshop on Security and Privacy Analytics","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3180445.3180453","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 46

Abstract

Software vulnerabilities are a primary concern in the IT security industry, as malicious hackers who discover these vulnerabilities can often exploit them for nefarious purposes. However, complex programs, particularly those written in a relatively low-level language like C, are difficult to fully scan for bugs, even when both manual and automated techniques are used. Since analyzing code and making sure it is securely written is proven to be a non-trivial task, both static analysis and dynamic analysis techniques have been heavily investigated, and this work focuses on the former. The contribution of this paper is a demonstration of how it is possible to catch a large percentage of bugs by extracting text features from functions in C source code and analyzing them with a machine learning classifier. Relatively simple features (character count, character diversity, entropy, maximum nesting depth, arrow count, "if" count, "if" complexity, "while" count, and "for" count) were extracted from these functions, and so were complex features (character n-grams, word n-grams, and suffix trees). The simple features performed unexpectedly better compared to the complex features (74% accuracy compared to 69% accuracy).
软件漏洞检测的机器学习方法
软件漏洞是IT安全行业主要关注的问题,因为发现这些漏洞的恶意黑客通常可以利用它们达到恶意目的。然而,复杂的程序,特别是用C等相对低级的语言编写的程序,即使使用手动和自动技术也很难完全扫描出错误。由于分析代码并确保其安全编写已被证明是一项重要的任务,因此对静态分析和动态分析技术都进行了大量研究,本文的重点是前者。本文的贡献是演示如何通过从C源代码中的函数中提取文本特征并使用机器学习分类器对其进行分析来捕获大部分错误。相对简单的特征(字符计数、字符多样性、熵、最大嵌套深度、箭头计数、“if”计数、“if”复杂性、while“count”和“for”计数)从这些函数中提取出来,复杂的特征(字符n-grams、单词n-grams和后缀树)也是如此。与复杂特征相比,简单特征的表现出乎意料地好(准确率为74%,而准确率为69%)。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信