arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2606.02196cs.CR
收藏

PyFEX: 通过弹性和穷举路径探索发现规避型Python威胁

PyFEX: Uncovering Evasive Python-based Threats via Resilient and Exhaustive Path Exploration

CISPA Helmholtz Center for Information Security(CISPA赫尔姆霍兹信息安全中心);University of Electronic Science and Technology(电子科技大学);Shanghai Jiao Tong University(上海交通大学);Max Planck Institute for Security and Privacy(马克斯·普朗克安全与隐私研究所)

Meng Wang, Yue Ma, Majid Garoosi, Wenting Fan, Liwei Guo, Jianqiang Wang, Ali Abbasi

AI总结:

提出PyFEX弹性强制执行引擎,通过强制遍历所有条件分支、崩溃恢复和路径合并等技术,系统性地探索程序行为空间,以检测现有工具遗漏的恶意行为。

摘要:

Python生态系统的快速扩张催生了两种不同但趋同的威胁:攻击者越来越多地通过Python包索引(PyPI)针对软件供应链,同时构建从Python源代码编译的规避型、跨平台恶意二进制文件。当前程序分析技术难以应对这种双重威胁。基于静态分析的工具常常被运行时混淆和编译字节码所迷惑,而基于动态分析的工具则脆弱易受环境检查规避,并常因依赖不满足而过早终止。为克服这些限制,我们提出了PyFEX,一种弹性强制执行引擎。PyFEX通过强制在所有条件分支上执行来系统性地探索程序的行为空间,以绕过规避检查。为解决动态执行的脆弱性,它引入了一种新颖的弹性崩溃恢复机制,该机制合成虚拟对象以满足运行时的失败操作,使分析能够越过致命错误继续执行,并采用路径合并来缓解路径爆炸。PyFEX还集成了自动入口识别机制,主动发现并调用休眠函数,暴露隐藏在未调用API中的恶意逻辑。为展示该引擎的有效性,我们构建了PyFEXScan,一个基于PyFEX的概念验证恶意软件检测器。针对已知恶意PyPI包和真实世界编译二进制文件的评估表明,PyFEX揭示了现有最先进工具遗漏的关键行为。在PyPI上的实时部署中,PyFEXScan发现了212个先前未知的恶意包,累计下载量超过91,648次,强调了弹性、穷举分析对于保护Python生态系统的必要性。

英文摘要:

The rapid expansion of the Python ecosystem has fueled two distinct but converging threats: adversaries increasingly target the software supply chain via the Python Package Index (PyPI), while also building evasive, cross-platform malicious binaries compiled from source code written in Python. Current program analysis techniques struggle to address this dual threat. Static analysis based tools are often blinded by runtime obfuscation and compiled bytecode, while dynamic analysis based ones are fragile, prone to evasion by environmental guardrails, and often terminates prematurely due to unsatisfied dependencies. To overcome these limitations, we present PyFEX, a resilient forced-execution engine. PyFEX explores a program's behavioral space systematically by forcing execution across all conditional branches to bypass evasion checks. To address the fragility of dynamic execution, it introduces a novel resilient crash recovery mechanism that synthesizes dummy objects to satisfy failed operations at the runtime, allowing analysis to proceed past fatal errors, and employs path merging to mitigate path explosion. PyFEX further incorporates an automated entry identification mechanism that proactively discovers and invokes dormant functions, exposing malicious logic hidden within uncalled APIs. To demonstrate the efficacy of this engine, we built PyFEXScan, a proof-of-concept malware detector built on top of PyFEX. Evaluated against both known malicious PyPI packages and real-world compiled binaries, PyFEX exposes critical behaviors missed by the existing state-of-the-art tools. In a live deployment on PyPI, PyFEXScan discovered 212 previously unknown malicious packages accounting for over 91,648 downloads, underscoring the necessity of resilient, exhaustive analysis for securing the Python ecosystem.

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

↑