Visible to the public Analyzing Cryptographic API Usages for Android Applications Using HMM and N-Gram

TitleAnalyzing Cryptographic API Usages for Android Applications Using HMM and N-Gram
Publication TypeConference Paper
Year of Publication2020
AuthorsXu, Zhiwu, Hu, Xiongya, Tao, Yida, Qin, Shengchao
Conference Name2020 International Symposium on Theoretical Aspects of Software Engineering (TASE)
KeywordsAnalytical models, android, API analysis, composability, compositionality, cryptographic API, cryptography, hidden Markov model, Hidden Markov models, Libraries, Markov processes, N-gram, Probabilistic logic, pubcrawl, theoretical cryptography, Tools
AbstractA recent research shows that 88 % of Android applications that use cryptographic APIs make at least one mistake. For this reason, several tools have been proposed to detect crypto API misuses, such as CryptoLint, CMA, and CogniCryptSAsT. However, these tools depend heavily on manually designed rules, which require much cryptographic knowledge and could be error-prone. In this paper, we propose an approach based on probabilistic models, namely, hidden Markov model and n-gram model, to analyzing crypto API usages in Android applications. The difficulty lies in that crypto APIs are sensitive to not only API orders, but also their arguments. To address this, we have created a dataset consisting of crypto API sequences with arguments, wherein symbolic execution is performed. Finally, we have also conducted some experiments on our models, which shows that ( i) our models are effective in capturing the usages, detecting and locating the misuses; (ii) our models perform better than the ones without symbolic execution, especially in misuse detection; and (iii) compared with CogniCryptSAsT, our models can detect several new misuses.
DOI10.1109/TASE49443.2020.00029
Citation Keyxu_analyzing_2020