arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.22182cs.CRcs.AI
收藏

ShellForge: 基于对抗性共进化的小壳生成与多视角检测的稳健小壳防御

ShellForge: Adversarial Co-Evolution of Webshell Generation and Multi-View Detection for Robust Webshell Defense

Beijing Electronic Science and Technology Institute(北京电子科技研究所);Technology Institute(技术研究所)

Yizhong Ding

AI总结:

ShellForge通过对抗性共进化框架,结合自动化小壳生成与多视角检测,提升Webshell防御的鲁棒性与准确性。

摘要:

Webshells仍然是攻击者入侵服务器的主要立足点,特别是在PHP生态系统中。然而,现有的检测机制往往难以跟上快速变异和复杂的伪装技术的发展步伐。此外,许多当前的防御措施在面对使用重加密保护知识产权的良性管理脚本时,会出现较高的误报率。为了解决这些挑战,我们提出了ShellForge,一个对抗性共进化框架,将自动化的小壳生成与多视角检测相结合,以持续加强防御边界。该框架通过迭代共训练循环运行,生成器和检测器通过交换困难样本相互强化。生成器通过监督微调和基于偏好的强化学习进行优化,以合成功能性强且高度逃避的变种。同时,我们开发了多视角融合检测器,整合了长字符串压缩的语义特征、剪枝后的抽象语法树的结构特征以及全局统计指标如香农熵。为了减少误报,ShellForge利用基于大语言模型的转换来创建去恶意样本——保留复杂加密模式但没有有害载荷的脚本,作为训练中的高质量困难负样本。在公共FWOID基准上的评估显示,ShellForge显著增强了防御的鲁棒性。在收敛后,检测器保持0.981的F1分数,而生成器在VirusTotal商业引擎上的逃避率达到0.939。

英文摘要:

Webshells remain a primary foothold for attackers to compromise servers, particularly within PHP ecosystems. However, existing detection mechanisms often struggle to keep pace with rapid variant evolution and sophisticated obfuscation techniques that camouflage malicious intent. Furthermore, many current defenses suffer from high false-alarm rates when encountering benign administrative scripts that employ heavy obfuscation for intellectual property protection. To address these challenges, we present ShellForge, an adversarial co-evolution framework that couples automated webshell generation with multi-view detection to continuously harden defensive boundaries. The framework operates through an iterative co-training loop where a generator and a detector mutually reinforce each other via the exchange of hard samples. The generator is optimized through supervised fine-tuning and preference-based reinforcement learning to synthesize functional, highly evasive variants. Simultaneously, we develop a multi-view fusion detector that integrates semantic features from long-string compression, structural features from pruned abstract syntax trees, and global statistical indicators such as Shannon entropy. To minimize false positives, ShellForge utilizes a LLM-based transformation to create de-malicious samples--scripts that retain complex obfuscation patterns but lack harmful payloads--serving as high-quality hard negatives during training. Evaluations on the public FWOID benchmark demonstrate that ShellForge significantly enhances defensive robustness. Upon convergence, the detector maintains a 0.981 F1-score while the generator achieves a 0.939 evasion rate against commercial engines on VirusTotal.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑