用网络流量的节奏而非内容检测攻击,无需解密即可识别威胁。
A Protocol-Language Model for Network Intrusion (Without Deep Packet Inspection)

- 将网络流视为语言,用包长、时间间隔等元数据建模语法结构。
- 零标签训练下攻击与正常流量分离效果好,PR-AUC达0.93。
- 适合需要低延迟、抗加密的实时入侵检测场景。
现代网络入侵检测系统面临结构性矛盾:最具威胁性的协议均采用TLS 1.3和QUIC加密,载荷内容无法通过深度包检测获取。本文提出新思路——攻击特征可能不在字节中,而在流量节奏里。将网络流视为语言,其语法完全由L3/L4包元数据(包长、到达时间间隔、TTL、TCP标志位、哈希端口)构成。提出PLM-NIDS模型,验证三个结论:(1) 语法存在且可学习:在344,232条未标注的Monday数据流上,使用RWKV-4状态空间模型训练,因果语言模型验证损失为0.204,表明正常流量具有可预测的统计一致性。(2) 攻击破坏该语法:每流困惑度分数可清晰区分良性与攻击流,零攻击标签训练下PR-AUC达0.93。(3) 该分离能力非平凡:相同序列输入下,LSTM退化为多数类预测器(ROC-AUC≈0.50,F1=0.91,始终预测“攻击”)。经监督微调后,PR-AUC提升至0.94,ROC-AUC达0.75,校准阈值下精确率达97.7%。RWKV骨干的O(T)递归推理支持逐包流式处理,无需流缓存,实现线速运行。因仅读取IP/TCP/UDP头,对加密透明,适用于TLS 1.3、QUIC及未来加密协议。
原文摘要 · Abstract (English)
Modern network intrusion detection systems (NIDS) are caught in a structural contradiction: the protocols carrying the highest threat intelligence are precisely those encrypted under TLS 1.3 and QUIC, where payload inspection yields nothing. We ask a simpler question -- what if the attack signature is not in the bytes, but in the rhythm? -- and answer it by treating network flows as a language whose grammar is written entirely in L3/L4 packet metadata: length, inter-arrival time, TTL, TCP flags, and hashed port numbers. We present PLM-NIDS, which proves three claims in sequence. (1) The grammar exists and is learnable: a RWKV-4 state-space model trained on 344,232 unlabelled Monday flows achieves a causal LM validation loss of 0.204, demonstrating that benign traffic has predictable, statistically consistent structure. (2) Attacks violate this grammar: the per-flow perplexity score cleanly separates benign from attack flows with PR-AUC = 0.93 using zero attack labels at training time. (3) This separation is architecturally nontrivial: an LSTM trained on identical token sequences degenerates to a majority-class predictor (ROC-AUC approximately 0.50, F1 = 0.91 by always predicting "attack"), proving that RWKV's causal pre-training provides an inductive bias unavailable to direct classifiers. Supervised fine-tuning further raises PR-AUC to 0.94 and ROC-AUC to 0.75, with a precision of 97.7% at the calibrated operating threshold. The RWKV backbone's O(T) recurrent inference enables per-packet streaming without flow buffering, making PLM-NIDS operationally viable at line rate. Because it reads only IP/TCP/UDP headers, it is inherently encryption-agnostic: TLS 1.3, QUIC, and future encrypted protocols are handled transparently.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。