[Paper Review] DeepHTTP: Semantics-Structure Model with Attention for Anomalous HTTP Traffic Detection and Pattern Mining
DeepHTTP proposes a semantics-structure integrated deep learning model using Bidirectional LSTM with attention mechanism to detect anomalous HTTP traffic and mine malicious patterns. By treating HTTP requests as natural language sequences and combining content semantics with structural features, the model achieves high detection accuracy and effective pattern discovery, with attention mechanisms highlighting key attack indicators like 'wscript' and 'shell'.
In the Internet age, cyber-attacks occur frequently with complex types. Traffic generated by access activities can record website status and user request information, which brings a great opportunity for network attack detection. Among diverse network protocols, Hypertext Transfer Protocol (HTTP) is widely used in government, organizations and enterprises. In this work, we propose DeepHTTP, a semantics structure integration model utilizing Bidirectional Long Short-Term Memory (Bi-LSTM) with attention mechanism to model HTTP traffic as a natural language sequence. In addition to extracting traffic content information, we integrate structural information to enhance the generalization capabilities of the model. Moreover, the application of attention mechanism can assist in discovering critical parts of anomalous traffic and further mining attack patterns. Additionally, we demonstrate how to incrementally update the data set and retrain model so that it can be adapted to new anomalous traffic. Extensive experimental evaluations over large traffic data have illustrated that DeepHTTP has outstanding performance in traffic detection and pattern discovery.
Motivation & Objective
- To address the limitations of traditional anomaly detection methods in handling complex, evolving cyberattacks on HTTP traffic.
- To improve model generalization and robustness by integrating semantic and structural features of HTTP requests.
- To enable automated detection of malicious traffic and discovery of attack patterns without prior knowledge.
- To support incremental learning for adapting to new attack variants over time.
- To provide interpretable results through attention mechanisms that highlight critical keywords in malicious traffic.
Proposed method
- Treat HTTP request content as natural language sequences, mapping tokens to embeddings for semantic modeling.
- Extract structural features by segmenting HTTP entries and converting content clips into structured representations.
- Use two separate Bi-LSTM networks to learn semantic and structural features independently, then concatenate their outputs.
- Apply an attention mechanism to focus on critical words in the input sequence, generating attention weights for interpretability.
- Combine semantic and structural feature vectors for final classification using a fully connected layer.
- Perform clustering on detected malicious traffic and apply pattern mining using attention-weighted keywords to identify recurring attack signatures.
Experimental results
Research questions
- RQ1Can a deep learning model that combines semantic and structural features of HTTP traffic improve anomaly detection performance?
- RQ2How effectively can attention mechanisms highlight key indicators of malicious HTTP traffic?
- RQ3Can the model detect and mine patterns from known attack families such as SQL injection, XSS, and webshells?
- RQ4To what extent can the model adapt to new malicious traffic through incremental learning and dataset updates?
- RQ5Can the attention mechanism provide interpretable insights into the characteristics of malicious traffic?
Key findings
- For the Structs2 vulnerability, the model achieved a recall rate of 0.822 for the top 5 attention-weighted words, rising to 0.964 for the top 20 words.
- The model demonstrated strong performance in detecting SQL injection patterns, with 0.871 recall for 'select' and 0.799 for 'limit' in the top 20 attention words.
- For XSS attacks, the model correctly identified 'script' and 'iframe' as high-importance keywords, achieving 0.820 and 0.721 recall in the top 10 attention words, respectively.
- The attention mechanism successfully highlighted critical attack terms such as 'wscript', 'execute', and 'action', closely matching ground truth indicators.
- Pattern mining visualization revealed co-occurrence clusters like { '¡', '/', 'textarea', 'script', '¿', 'alert' }, indicating detection of script-based attacks.
- The model maintained high performance across diverse attack types, including file inclusion and webshell patterns, with over 0.948 recall for 'etc' and 'passwd' in top 20 words.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.