mandiant / mandiant/capa

Using debuggers as a dynamic analysis backend for capa

Open
#1,853 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dynamic enhancement
Dominant language
Python
Stars
6.2k
Forks
726
Avg merge
11d 11h
Merged PRs (30d)
7

Description

...
I am really excited to hear that capa is adding the capacity to work with dynamic traces! I think dealing with API traces generated from a sandbox is a great start since it will provide more info than static analysis.

I think it would also be possible to run the feature extractor at instruction level on an execution trace recorded by tools like Windbg TTD/Reven/RR/Undo, etc. The immediate benefit is to see some behavior that we cannot see if the relevant code is encrypted. For example, if the sample uses a cyrpto function, but the code is encrypted, capa would not be able to see it directly. Besides, we can also see the concrete register/memory value at any time, this makes it possible to not only detect certain operations, but also obtain the data it actually operated on.

There would also be some challenges. For example, the trace can be quite long even for a few seconds of execution. Also, the boundary of function is not as clear when it comes to an execution trace. However, from my own experience of working with execution traces, despite the whole trace being very long, the unique instructions/basic blocks are pretty manageable.
...

_Originally posted by @xusheng6 in [#1517 \(comment\)](https://github.com/mandiant/capa/discussions/1517#discussioncomment-6118170)_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests; start by reviewing capa’s existing dynamic-trace support and the feature extractor entry point. Compare the proposed debugger trace sources, including WinDbg TTD, Reven, RR, and Undo, and define what a completed backend would support for instruction-level traces, long traces, and unclear function boundaries.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
reverse-engineering, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.