Jisuanji kexue yu tansuo (Aug 2020)

Application Research of BiLSTM in Cross-Site Scripting Detection

  • CHENG Qiqin, WAN Liang

DOI
https://doi.org/10.3778/j.issn.1673-9418.1909035
Journal volume & issue
Vol. 14, no. 8
pp. 1338 – 1347

Abstract

Read online

At present, machine learning methods are used in the most traditional cross-site scripting (XSS) detection technologies, which have some defects, such as bad readability because of maliciously confused code, insufficient feature extraction and low efficiency, resulting in poor performance. According to these problems, a way used bidirectional long-short term memory (BiLSTM) network is proposed to detect the XSS attack. First, the data need to be preprocessed, the decoding technology is used to restore the XSS codes to the state before encoding to improve the readability, and the deep learning tool word2vec is used to convert the decoded codes into vectors as the input of the neural network. Then, BiLSTM network is used to bilaterally learn the abstract features of the attack. Finally, the softmax classifier is used to classify the learned abstract features and the dropout algorithm is used to avoid over fitting. The experimental results based on the collected datasets show that compared with several traditional machine learning methods and deep learning methods, this method has better detection performance.

Keywords