🤖 AI Summary
To address the challenge of advanced persistent threat (APT) groups leveraging HTTP(S) for stealthy command-and-control (C2) communications that evade mainstream network intrusion detection systems (NIDS), this paper proposes a lightweight, real-time detection framework based on contextual summarization. Our method innovatively integrates cross-session behavioral modeling and semantic-aware traffic summarization, overcoming limitations of single-request feature analysis and encrypted-traffic black-box inspection. It jointly leverages HTTP protocol parsing, session graph construction, temporal context encoding, and contrastive learning for anomaly scoring. Evaluated on real-world APT samples and large-scale background traffic, our framework achieves 98.3% detection rate, 0.12% false positive rate, and average latency under 3.2 seconds—significantly outperforming existing state-of-the-art approaches. The core contribution is the first realization of fine-grained, low-overhead, and high-temporal-resolution contextual awareness for HTTP(S) C2 traffic.