CAPEv2  by kevoreilly

Malware sandbox for dynamic analysis and payload extraction

created 5 years ago
2,564 stars

Top 18.7% on sourcepulse

GitHubView on GitHub
Project Summary

CAPE (Configuration And Payload Extraction) is a sophisticated malware analysis sandbox designed for automated dynamic unpacking, configuration extraction, and behavioral analysis of malicious software on Windows. It targets security researchers, incident responders, and malware analysts seeking deep insights into malware operations. CAPE builds upon the legacy of Cuckoo Sandbox, offering enhanced capabilities for automated unpacking, YARA-based classification, and a programmable debugger for advanced analysis and anti-evasion bypasses.

How It Works

CAPE leverages a combination of API hooking (via Microsoft Detours and Cuckoo-modified's engine) and a novel debugger for precise control and instrumentation of malware execution. This approach allows for the capture of unpacked payloads from various injection techniques (e.g., process hollowing, shellcode injection) and memory regions. The debugger, programmable via YARA signatures, enables dynamic countermeasures against sandbox evasion and facilitates detailed instruction tracing.

Quick Start & Requirements

  • Installation: Execute kvm-qemu.sh and cape2.sh scripts (requires root privileges for setup).
  • Prerequisites: Ubuntu 24.04 LTS recommended for host, Windows 10 21H2 for target VMs. KVM is the recommended hypervisor. Python 3.7.2 or 3.8 (x86) for the agent within the VM.
  • Resources: Requires significant setup time for KVM and VM creation.
  • Documentation: CAPE Sandbox Documentation (demo instance available).

Highlighted Details

  • Automated dynamic unpacking via process injection techniques and memory region analysis.
  • Programmable debugger integrated with YARA signatures for dynamic anti-evasion bypasses and control-flow manipulation.
  • Supports multiple classification mechanisms: YARA scans of unpacked payloads, Suricata network analysis, and behavioral signatures.
  • Extensive configuration extraction support for various frameworks (RATDecoders, DC3-MWCP, MalDuck, MaCo) and a native Python framework.

Maintenance & Community

  • Significant contributions from community members, including the port to Python 3.
  • Community signature repository available for contributions.
  • Active development to keep pace with malware and OS advancements.

Licensing & Compatibility

  • The README does not explicitly state the license. However, forks of Cuckoo Sandbox often use Apache 2.0 or similar permissive licenses. Compatibility for commercial use or closed-source linking would require explicit license confirmation.

Limitations & Caveats

  • The project relies heavily on specific OS versions (Ubuntu 24.04, Windows 10 21H2) and hypervisors (KVM) for optimal compatibility.
  • Third-party dependencies, particularly pefile, can cause installation issues due to version pinning; manual management or forking of dependencies may be necessary.
  • The effectiveness of automated unpacking and bypasses is dependent on the sophistication of the malware and the quality of custom YARA rules.
Health Check
Last commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
15
Issues (30d)
11
Star History
192 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.