mandiant / mandiant/capa

Detection of patterns of obfuscated code

Open
#1,531 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I came across the works by Tim Blazytko that seem relevant to capa.

In https://synthesis.to/2021/08/10/obfuscation_detection.html and https://synthesis.to/2021/03/03/flattening_detection.html, Tim mentioned some ways to automatically detect certain patterns of obfuscated code that might be interesting to reverse engineer. For example, long basic blocks, large functions, control-flow flatten code/code that implements state machine. I feel like capa's extractor could extract these info.

Tim has also implemented the detection algorithm using Binary Ninja: https://github.com/mrphrazer/obfuscation_detection

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

Start by reading capa's extractor and the linked obfuscation-detection and control-flow-flattening articles. Compare the suggested patterns with the detection algorithm in the linked Binary Ninja project. Done would mean defining and implementing a concrete set of obfuscation detections in capa, with behavior and validation agreed for the selected patterns.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.