capa answers the first question anyone asks about an unknown executable: what can this thing do? Run it against a Windows PE, a Linux ELF, a .NET module or raw shellcode and it disassembles the file and matches it against more than a thousand community-written rules, then prints a table of capabilities such as create a service, encode data with XOR, send HTTP requests or execute shell commands, together with the MITRE ATT&CK techniques and Malware Behavior Catalog entries they map to. It works statically, so the sample is never executed, and it can also read sandbox reports from CAPE, DRAKVUF and VMRay to describe what a program did at run time.
It is made by the FLARE team at Mandiant, now part of Google Cloud, and has been developed in the open since 2020: about 6,300 stars, 93 contributors, more than 6,300 commits and a 10.0.0 release in October 2026. It is Apache-2.0 licensed. Standalone binaries for Windows, macOS and Linux need no install, the flare-capa package is on PyPI for use as a library, and there are plugins for IDA Pro, Ghidra and Binary Ninja plus capa Explorer Web, a browser viewer for its JSON results.
- Repository: github.com/mandiant/capa
- Licence: Apache-2.0 (Apache License 2.0)
- Language: Python. Stars: 6,278. Forks: 743. Last push: Oct 25, 2026.
- Scan: safe, Oct 28, 2026, commit 2bdf7a4
Who it is for
Malware analysts and incident responders triaging suspicious files, SOC teams deciding which samples deserve a full reverse-engineering effort, students learning malware analysis, and researchers who want capability summaries for large sample sets.
Getting started
1. Download the standalone binary for your system from the releases page and unzip it
open https://github.com/mandiant/capa/releases/latest2. Run it against a suspicious file (the standalone build includes the default rules)
./capa suspicious.exe3. Or install the library with pip and point it at a capa-rules release
pip install flare-capa && capa -r capa-rules-10.0.0/ suspicious.exe4. Show every matching rule and where it matched, or write JSON for capa Explorer Web
capa -vv suspicious.exe; capa -j suspicious.exe > results.jsoncapa never runs the sample, but you are still handling live malware: analyse files in an isolated VM, keep them in password-protected archives, and do not open them on a machine you care about. The pip install does not include rules; download a matching capa-rules release or the tool has nothing to match against.
Safety scan
We cloned mandiant/capa at commit 2bdf7a4 on Oct 28, 2026 and ran the checks described on the GitHub Tools page: credential patterns, decode-and-execute code, install-time scripts, committed binaries, risky CI workflows, every host the code talks to, known vulnerabilities in pinned dependencies, and project hygiene. A person read every hit. This is what we found.
- No secrets, no install hooks and no committed binaries across 370 files and about 100,000 lines. The three pattern hits are very long lines with ordinary explanations: capa/render/proto/capa_pb2.py and capa/features/extractors/binexport2/binexport2_pb2.py are protobuf files generated by protoc, each holding a serialised schema on one line, and capa/ida/plugin/icon.py is the project's PNG logo as a base64 string, embedded so the IDA plugin has an icon without extra packaging.
- 11 known advisories, none critical and 3 high. Two of the highs are in web/explorer/package-lock.json, both dev dependencies of the Explorer Web build: cross-spawn through ESLint and vite through Vitest. Neither reaches the published web page or the Python tool.
- The third high is msgpack 1.2.1, pinned in requirements.txt, the file used to build the standalone binary. It comes in through vivisect, the disassembler backend, which uses it for saved .viv workspace files, so it does ship in the binary. The advisory is a memory leak, and capa ignores existing .viv workspaces unless you set an environment variable to allow them, so analysing a sample does not touch it. The pip package itself does not pin it.
- Eleven workflows. One uses pull_request_target, to check that a PR updates the changelog and leave a review; it never checks out or runs the PR's code and passes the PR body through an environment variable. All 8 third-party actions are pinned to commits. Releases are built in CI with PyInstaller, and pip-audit runs on the Python dependencies.
- The hosted capa Explorer Web and the project website load Umami, a cookieless analytics script; the command-line tool sends nothing, and Explorer Web reads result files in your browser rather than uploading them. Dependabot, CodeQL, licence and contributing guide present; no SECURITY.md in the repository. Scorecard 6.5.
What the scanner counted
| Check | Result |
|---|---|
| Secrets | None found. |
| Suspicious code | 3 pattern hits found and read; every one is listed under the raw findings. |
| Install-time code | None: nothing runs at install beyond the package manager itself. |
| Committed binaries | None. |
| CI workflows | 11 workflows. 1 uses pull_request_target, none check out the pull request head. 0 of 8 third-party actions pinned to a tag rather than a commit. |
| Network hosts | 30 distinct hosts referenced from source; most often www.apache.org, github.com, stackoverflow.com, raw.githubusercontent.com. No URLs to bare IP addresses. |
| Known vulnerabilities | 11 advisories across 361 pinned packages: 0 critical, 3 high, 6 moderate, 2 low. requirements.txt: 37 packages, 2 advisories; web/explorer/package-lock.json: 333 packages, 9 advisories; web/rules/requirements.txt: 2 packages, 0 advisories. |
| Project hygiene | Has automated dependency updates, CodeQL, licence file, contributing guide. Missing security policy. |
| OpenSSF Scorecard | 6.5 out of 10, as of Oct 28, 2026. |
The raw findings
Every hit the scanner wrote out, with a link to the exact line at the scanned commit. Secrets candidates are redacted.
Pattern hits (3)
| Where | Rule | Match |
|---|---|---|
| capa/features/extractors/binexport2/binexport2_pb2.py:16 | very-long-line | 5656 chars |
| capa/ida/plugin/icon.py:20 | very-long-line | 8774 chars |
| capa/render/proto/capa_pb2.py:27 | very-long-line | 17344 chars |
Worst known vulnerabilities (11 of 11)
| Advisory | Severity | Package | Summary |
|---|---|---|---|
| GHSA-j586-36cw-2gc2 | high | msgpack@1.2.1 | MessagePack: Unbounded memory leak in msgpack C extension on strict_map_key validation failure |
| GHSA-3xgq-45jj-v275 | high | cross-spawn@7.0.3 | Regular Expression Denial of Service (ReDoS) in cross-spawn |
| GHSA-587h-7wmj-h5pm | high | vite@8.0.16 | launch-editor: `fs.existsSync()` existence check can be bypassed on Windows |
| GHSA-qxg6-89mg-rqv8 | moderate | @vitest/mocker@4.1.11 | Vitest: Code injection via unauthenticated manual mock registration |
| GHSA-xp26-3454-mjgp | moderate | @vitest/mocker@4.1.11 | Vitest: Windows backslash traversal bypasses the @vitest/mocker redirect allowlist fix |
| GHSA-2g4f-4pwh-qvx6 | moderate | ajv@6.12.6 | ajv has ReDoS when using `$data` option |
| GHSA-698v-4r3x-3vcv | moderate | vite@8.0.16 | launch-editor: escapeCmdArgs() omits % escaping on Windows |
| GHSA-r825-w8mm-5pxw | moderate | vite@8.0.16 | launch-editor: Editor CLI flag misinterpretation causing arbitrary command execution for some editors |
| GHSA-rq7h-c2jc-7f22 | moderate | vite@8.0.16 | Vite: Files outside `server.fs.allow` could be served when project paths match system paths on non-Windows machine |
| GHSA-xmj3-9gf7-h52w | low | setuptools@84.0.0 | setuptools: Windows path escape via namespace_packages.txt during legacy wheel installation Description |
| GHSA-9jrq-w75r-8gcw | low | vite@8.0.16 | Vite: Cross origin script execution through Vite custom middleware |
Workflows worth a look
- .github/workflows/changelog.yml: pull_request_target
By the numbers
| Stars | 6,278 |
|---|---|
| Forks | 743 |
| Contributors | 93 |
| Commits | 6,331 |
| Open issues | 252 |
| Open pull requests | 62 |
| Releases | 44 |
| Latest release | v10.0.0 |
| Licence | Apache-2.0 |
| Main language | Python |
| Project age | 6 years |
| Last push | Oct 25, 2026 |
| Tracked files | 370 |
| Lines of code | 100.8K |
| Checkout size | 26 MB |
Lines by language: Python 82.6K, JSON 5,451, Markdown 4,288, YAML 3,275, Vue 1,851, JavaScript 1,555.
Questions
Is capa free?
Yes. capa is Apache-2.0 licensed and free for any use, commercial included, and so are the capa-rules. The standalone binaries, the PyPI package, the disassembler plugins and capa Explorer Web all cost nothing.
Is it safe and legal to analyse malware with capa?
capa only reads the file, it never executes it, which makes it one of the safer first steps. The risk is in handling the sample itself, so work in an isolated virtual machine and keep samples zipped with a password. Analysing malware for defence and research is legal in most places; spreading samples or using what you learn against systems you do not own is not.
Does capa replace an antivirus or a sandbox?
No. capa does not decide whether a file is malicious; it tells you what the code is capable of so you can decide what to look at next. Packed or heavily obfuscated samples can hide most of their capabilities until they are unpacked, so pair it with a sandbox, YARA rules or a disassembler for anything that matters.
This post is part of GitHub Tools, where every repository is cloned and scanned before it is written up. The scan is a snapshot of one commit on one day; the repository has moved on since, so check it before you install.
