CMPD: Context-Based Malicious Parameter Detection for APIs.

Zhangjie Zhao,Lin Zhang,Xing Zhang,Ying Wang,Yi Qin
DOI: https://doi.org/10.1007/978-981-19-8285-9_7
2022-01-01
Abstract:The Application Program Interface (API) plays an important role as the channel for data interaction between programs, while the widespread use of APIs has brought security risks that cannot be ignored. The adversary can perform various Web attacks, including SQL Injection and Cross-Site Scripting (XSS), by tampering with the parameters of API. Efficient detection of parameter tampering attacks for API is critical to ensure the system is running in the expected condition, further avoiding data leakage and property loss. Previous works always utilize the rule-based method or simple learning-based method to detect parameter tampering attacks. However, they ignore the contextual information of the API tokens and thus have a poor performance. In this paper, we propose the Context-based Malicious Parameter Detection (CMPD) framework to detect the parameter tampering attacks for APIs. We use a neural network language model to learn the distribution of the parameters, parameter names, and URLs and then use a tree model to detect the malicious query based on the high dimensional API embedding. Experiments show that CMPD outperforms all baseline, including rule-based method, Support Vector Machine (SVM), and Autoencoder, on CSIC 2010 dataset with F-1 value reaching 0.971. CMPD can also achieve a 0.895 F-1 value when training data is reduced to 20% and can achieve a 0.910 F-1 value when negative examples are reduced to 1%.
What problem does this paper attempt to address?