一句话:结合差分 fuzzing 与代码变更分析,在 CI 与发布流程中自动检测并定位代码级后门。
开源软件面临代码级后门威胁:攻击者借恶意提交、被篡改的发布包或被攻陷的第三方依赖植入带秘密触发的隐蔽提权代码,现有 CI 无法检测,下游二进制分析又需大量人工。作者提出 Lily,将后门检测嵌入 CI 流水线以拦截恶意提交,并嵌入发布审查流程以阻止被篡改的发布或依赖进入 Linux 发行版等大型生态。其核心是增强 CI 兼容的 fuzzing,通过对比历史与当前执行来发现可疑行为的触发条件;再将代码变更分析与 fuzzing 数据结合,在更新改动数百万行代码时仍能定位暴露后门的代码区域。作者还分析五种规避策略及相应防御。在数百个良性/含后门提交与发布上的实验中,Lily 准确率高、误报低,能可靠定位恶意代码、抵御对抗规避,并可阻止真实后门事件。
Code-level backdoors—stealthy code changes that grant hidden privileges via secret triggers—pose a persistent threat to open-source software. Known attempts to inject such backdoors into widely used projects through malicious commits, tampered release packages, or compromised third-party dependencies, were stopped only by luck and manual review. Existing Continuous Integration (CI) pipelines cannot detect these attacks, and downstream binary analysis tools require substantial manual effort. In this work, we present Lily, an automated approach that strengthens open-source development and release processes against backdoor injection. Lily integrates a backdoor detection mechanism into (1) CI pipelines to block malicious commits, and (2) release vetting workflows to prevent tampered releases or compromised dependencies from entering large ecosystems, such as Linux distributions. Lily offers two key contributions. First, it enhances CI-compatible fuzzing with the capability to detect triggers of suspicious behavior based on historical and current software executions. This enables fast, precise backdoor detection suitable for both CI and update validation workflows. Second, it combines code change analysis with fuzzing data to precisely point maintainers to backdoor-revealing code regions, even when release updates modify millions of lines of code. We also outline five strategies attackers could use to evade Lily, and evaluate corresponding defenses. Our experiments across hundreds of benign and backdoored commits and releases show that Lily achieves high detection accuracy with low false alarm rates, reliably identifies malicious code, resists adversarial attempts, and would have prevented real-world backdoor incidents.