With the imminent end-of-life for Python 2 (January 1 2020), CAPEv1 will be phased out. Please upgrade to the Python 3 as soon as possible.
CAPE is a malware sandbox. It is derived from Cuckoo and is designed to automate the process of malware analysis with the goal of extracting payloads and configuration from malware. This allows CAPE to detect malware based on payload signatures, as well as automating many of the goals of malware reverse engineering and threat intelligence.
There is a community online which is free for anyone to try:
CAPE can detect a number of malware techniques or beha, as well as specific malware families, from its initial run on a sample. This detection may then trigger a further run with a specific package, in order to extract the malware payload and possibly its configuration, for further analysis.
CAPE works by controlling malware via a bespoke debugger and API hooks. Detection to trigger a CAPE package can be based on API or Yara signatures. The debugger uses Yara signatures or API hooks to allow breakpoints to be set on indi instructions, memory regions or function calls. Once a region of interest is reached, it can be manipulated and dumped for processing and analysis, and possibly configuration parsing.
The techniques or beha that CAPE detects and has packages for include:
Packages for these beha will dump the payloads being injected, extracted or decompressed for further analysis. This is often the malware payload in unpacked form.
CAPE automatically creates a process dump for each process, or, in the case of a DLL, the DLL's module image in memory. This is useful for samples packed with simple packers, where often the module image dump is fully unpacked. Yara signatures may trigger on the process dumps, possibly resulting in submission with a specific package or configuration parsing.
CAPE also has a package which can dynamically unpack samples that use 'hacked' (modified) UPX, very popular with malware authors. These samples are run in CAPE's debugger until their OEP (original entry point), whereupon they are dumped, fixed and their imports are automatically reconstructed, ready for analysis.
Currently CAPE has specific packages dumping configuration and payloads for the following malware families:
CAPE has config parsers/decoders for the following malware families, whose payloads are automatically extracted by a beha package:
Many other malware families ha payloads automatically extracted by beha packages, for which CAPE uses Yara signatures to detect the payloads. This list is growing, and includes:
Configuration data may be output from either family packages, or in payloads resulting from beha packages. Configuration parsing may then be performed on this by of Yara-based detection, and config parsing based on either of CAPE's config parsing frameworks, the RATDecoders framework from malwareconfig.com and DC3-MWCP (Defense Cyber Crime Center - Malware Configuration Parser). The many parsers/decoders from malwareconfig.com are also included, comprising among many others: Sakula, DarkComet, PredatorPain and PoisonI to Ke/TechAnarchy for this framework and parsers (), and to DC3 for their framework (). Special thanks to Jason Reaves () for the TrickBot parser and Fabien Perigaud for the PlugX parser.
Utility packages are also included: 'DumpOnAPI' allows a module to be dumped when it calls a specific API function which can be specified in the web interface. 'DumpConfigRegion' allows the memory region containing C2 information or other config data to be dumped for commonly used API calls. These packages can be useful for quickly unpacking/dumping no or configs. The 'Trace' package allows quick access to the debugger by accepting four breakpoints (R) to set on instructions, whereupon a short instruction trace will be output. An optional 'base-on-api' parameter allows the image base to be set by API call.
The CAPE debugger allows breakpoints to be set on read, write or execute of a memory address or region, as well as single-step mode. This allows fine control o execution until it is possible to dump the memory regions of interest, containing code or configuration data. Breakpoints can be set dynamically by package code, API hooks or Yara signatures. Thanks to the embedded distorm library the debugger can output the disassembly of instructions during single-step mode or when breakpoints are hit, resulting in instruction traces.
Processes, modules and memory regions can be dumped by CAPE through use of a simple API. These dumps can then be scanned and parsed for configuration information. Executable modules are fixed on being dumped, and may also ha imports automatically reconstructed (based on Scylla: ). Packages can be written based on API hooks, the CAPE debugger, or a combination of both. There are a number of other beha and malware family packages and parsers currently in the works, so watch this space.
The repository containing the code for the monitor DLLs which form the basis of these packages is a distinct one: This repository is organised in branches for the packages.
CAPE is derived from spender-sandbox (), which is derived from Cuckoo Sandbox (), so thanks to Brad Spengler, Claudio Guarnieri, Jurriaan Bremer and the countless other Cuckoo contributors without whom this work would not be possible. It also depends on Yara () from . Thanks to Decalage () for oletools, Didier Stevens and peepdf () for the PDF tools, MalwareCantFly for and Matt Holley () for binGraph. A big thanks also to doomedraven (), Sandor Nemes (), Kevin Ross and Enzo () for their support and contributions.
Please contribute to this project by helping create new packages for further malware families, packers, techniques or configuration parsers. Alternatively contact or Kevin O'Reilly for further details of CAPE de.
sudo ./k.sh all <username>sudo ./cuckoo.sh all cape\* All scripts contain __help__ -h, but please check the scripts to understand what they are doing.
开发语言:Python
Star 数:762
该项目属于病毒分析方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Malware Configuration And Payload Extraction展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | CAPE - Malware Configuration And Payload Extraction |
| 所属分类 | 病毒分析 |
| 发布作者 | admin |
| 发布时间 | 2026-10-05 23:15:35 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 174 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |