Discovering API usage specifications for security detection using two-stage code mining

被引:0
|
作者
Yin, Zhongxu [1 ]
Song, Yiran [2 ]
Zong, Guoxiao [1 ]
机构
[1] Informat Engn Univ, Zhengzhou 450001, Peoples R China
[2] Henan Univ Anim Husb Econ, Zhengzhou 450046, Peoples R China
来源
CYBERSECURITY | 2024年 / 7卷 / 01期
关键词
Specification mining; Frequent API sequence; Semantic relationship; Under-constrained symbolic execution; Vulnerability mining;
D O I
10.1186/s42400-024-00224-w
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
An application programming interface (API) usage specification, which includes the conditions, calling sequences, and semantic relationships of the API, is important for verifying its correct usage, which is in turn critical for ensuring the security and availability of the target program. However, existing techniques either mine the co-occurring relationships of multiple APIs without considering their semantic relationships, or they use data flow and control flow information to extract semantic beliefs on API pairs but difficult to incorporate when mining specifications for multiple APIs. Hence, we propose an API specification mining approach that efficiently extracts a relatively complete list of the API combinations and semantic relationships between APIs. This approach analyzes a target program in two stages. The first stage uses frequent API set mining based on frequent common API identification and filtration to extract the maximal set of frequent context-sensitive API sequences. In the second stage, the API relationship graph is constructed using three semantic relationships extracted from the symbolic path information, and the specifications containing semantic relationships for multiple APIs are mined. The experimental results on six popular open-source code bases of different scales show that the proposed two-stage approach not only yields better results than existing typical approaches, but also can effectively discover the specifications along with the semantic relationships for multiple APIs. Instance analysis shows that the analysis of security-related API call violations can assist in the cause analysis and patch of software vulnerabilities.
引用
收藏
页数:23
相关论文
共 50 条
  • [1] Two-Stage Patch Synthesis for API Migration from Single API Usage Example
    Yamaguchi, Daisuke
    Iwatsuka, Takuya
    2022 29TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE, APSEC, 2022, : 239 - 248
  • [2] Mining API Usage Examples from Test Code
    Zhu, Zixiao
    Zou, Yanzhen
    Xie, Bing
    Jin, Yong
    Lin, Zeqi
    Zhang, Lu
    2014 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME), 2014, : 301 - 310
  • [3] Ransomware detection by mining API call usage
    Sheen, Shina
    Yadav, Ashwitha
    2018 INTERNATIONAL CONFERENCE ON ADVANCES IN COMPUTING, COMMUNICATIONS AND INFORMATICS (ICACCI), 2018, : 983 - 987
  • [4] Mining API Error-Handling Specifications from Source Code
    Acharya, Mithun
    Xie, Tao
    FUNDAMENTAL APPROACHES TO SOFTWARE ENGINEERING, PROCEEDINGS, 2009, 5503 : 370 - 384
  • [5] Mining the Benefits of Two-stage and One-stage HOI Detection
    Zhang, Aixi
    Liao, Yue
    Liu, Si
    Lu, Miao
    Wang, Yongliang
    Gao, Chen
    Li, Xiaobo
    ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 34 (NEURIPS 2021), 2021, 34
  • [6] Improving API Usage through Automatic Detection of Redundant Code
    Kawrykow, David
    Robillard, Martin P.
    2009 IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, PROCEEDINGS, 2009, : 111 - 122
  • [7] SALIENCY DETECTION USING TWO-STAGE SCORING
    Liu, Yaqi
    Cai, Qiang
    Zhu, Xiaobin
    Cao, Jian
    Li, Haisheng
    2015 IEEE INTERNATIONAL CONFERENCE ON IMAGE PROCESSING (ICIP), 2015, : 4062 - 4066
  • [8] Two-stage natural scene image classification with noise discovering and label-correlation mining
    Zeng, Zhiqiang
    Wang, Xiaodong
    Li, Wei
    Ye, Yuandi
    KNOWLEDGE-BASED SYSTEMS, 2023, 260
  • [9] Mining API Usage Patterns by Applying Method Categorization to Improve Code Completion
    Akbar, Rizky Januar
    Omori, Takayuki
    Maruyama, Katsuhisa
    IEICE TRANSACTIONS ON INFORMATION AND SYSTEMS, 2014, E97D (05): : 1069 - 1083
  • [10] APICAD: Augmenting API Misuse Detection through Specifications from Code and Documents
    Wang, Xiaoke
    Zhao, Lei
    2023 IEEE/ACM 45TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, ICSE, 2023, : 245 - 256