arXiv:2607.20832cs.LGcs.AI2026-07

用语言模型困惑度检测黑客攻击,无需复杂预处理

Beyond Heavy Log Curation: Perplexity-Based APT Detection via Unsupervised, Context-Augmented Language Models

论文配图:Beyond Heavy Log Curation: Perplexity-Based APT Detection via Unsupervised, Context-Augmented Language Models
图 1 · 摘自论文原文
  • 基于困惑度的无监督检测,仅需简单日志输入
  • 在多个测试集上表现接近强基线,且更稳定
  • 适合想降低日志分析成本的安全团队

高级持续性威胁(APTs)难以检测,因大规模日志中攻击事件占比极低,且人工排查成本高、难扩展。现有机器学习方法虽能减轻工作量,但依赖大量人工标注数据和复杂的预处理流程,开发维护成本高。基于对一个强基线模型的分析,我们提出CAPTAIN(Context-Augmented Perplexity-based Threat Activity log detectIoN),一种基于困惑度的检测器,利用通用预训练语言模型,仅需极少、领域无关的预处理,即可对长串原始日志进行鲁棒评分。CAPTAIN通过编码器与类似Q-Former的桥接结构编码近期上下文,将紧凑的上下文令牌注入解码器输入,使困惑度反映时间上下文。为提升稳定性,额外对困惑度时间序列应用平滑滤波。在多个面向APT的基准测试中,CAPTAIN表现媲美现有强基线,且在显著减少日志清洗的情况下仍保持鲁棒,大幅降低先进日志预处理的开发与运维成本。

原文摘要 · Abstract (English)

Advanced Persistent Threats (APTs) remain difficult to detect because only a small fraction of events in large-scale logs are attack-related, and investigation is expensive and hard to scale. Prior machine-learning approaches can reduce analyst workload, but they often rely on heavily curated training data and sophisticated preprocessing pipelines. Building and maintaining such pipelines require substantial domain expertise and engineering cost. Motivated by insights from a study of a strong APT detection baseline, we propose CAPTAIN (Context-Augmented Perplexity-based Threat Activity log detectIoN), a perplexity-based detector that leverages general, pre-trained language models with minimal, domain-agnostic preprocessing, enabling robust scoring of long, minimally processed log entries. CAPTAIN encodes recent history with an encoder model and a Q-Former-style bridge, then injects the compact context tokens into the decoder input so that perplexity reflects temporal context. To improve stability, CAPTAIN additionally applies smoothing filters to the perplexity time series. Across APT-oriented benchmarks, CAPTAIN competes with strong existing baselines and remains robust under substantially less curated inputs, that reduces the development and operational cost of advanced log preprocessing.

APT检测语言模型无监督日志分析

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。