JSContana: Malicious JavaScript detection using adaptable context analysis and key feature extraction

Yunhua Huang,Tao Li,Lijia Zhang,Beibei Li,Xiaojie Liu
DOI: https://doi.org/10.1016/j.cose.2021.102218
2021-05-01
Abstract:<p>JavaScript has played a crucial role in web development, making it a primary tool for hackers to launch assaults. Although malicious JavaScript detection methods are becoming increasingly effective, the existing methods based on feature matching or static word embeddings are difficult to detect different versions and obfuscation of JavaScript code. To solve this problem, we present JSContana, a novel detection method that consists of adaptable context analysis and efficient key feature extraction. The key to our approach is context analysis based on dynamic word embeddings. We convert JavaScript code to syntax unit sequences with detailed information and get the real contextual representation of code by dynamic word embeddings. Furthermore, as a classification module in the method, TextCNN can effectively extract key features. To demonstrate the performance of the method, we have conducted extensive comparison experiments under five-fold cross-validation. Numerical results show that the method achieves 0.990 in AUC-score, and outperforms the state-of-the-art method by up to 3.5%.</p>
computer science, information systems
What problem does this paper attempt to address?