MCPcopy Index your code
hub / github.com/facebookincubator/TTPForge

github.com/facebookincubator/TTPForge @v1.5.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.5.0 ↗ · + Follow
642 symbols 2,257 edges 140 files 389 documented · 61% updated 14d agov1.5.0 · 2026-06-03★ 4238 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

TTPForge

License Tests 🚨 Semgrep Analysis Coverage Status

TTPForge is a cyber attack simulation platform designed and built by Sam Manzer (@d3sch41n), Alek Straumann (@CrimsonK1ng), and Geoff Pamerleau (@Sy14r), and including subsequent contributions from many good folks in Meta’s Red, Blue, and Purple security teams. Jayson Grace (@l50) migrated the project to GitHub and assisted with preparation for the project’s open source release.

This project promotes a Purple Team approach to cybersecurity with the following goals:

  • To help blue teams accurately measure their detection and response capabilities through high-fidelity simulations of real attacker activity.
  • To help red teams improve the ROI/actionability of their findings by packaging their attacks as automated, repeatable simulations.

TTPForge allows you to automate attacker tactics, techniques, and procedures (TTPs) using a powerful but easy-to-use YAML format. Check out the links below to learn more!


Table of Contents


Installation

  1. Get latest TTPForge release:

bash curl \ https://raw.githubusercontent.com/facebookincubator/TTPForge/main/dl-rl.sh \ | bash

At this point, the latest ttpforge release should be in $HOME/.local/bin/ttpforge and subsequently, the $USER's $PATH.

If running in a stripped down system, you can add TTPForge to your $PATH with the following command:

bash export PATH=$HOME/.local/bin:$PATH

  1. Initialize TTPForge configuration

This command will place a configuration file at the default location ~/.ttpforge/config.yaml and configure the examples and forgearmory TTP repositories:

bash ttpforge init

  1. List available TTP repositories (should show examples and forgearmory)

bash ttpforge list repos

The examples repository contains the TTPForge examples found in this repository. The ForgeArmory repository contains our arsenal of attacker TTPs powered by TTPForge.

  1. List available TTPs that you can run:

bash ttpforge list ttps

  1. Examine an example TTP:

bash ttpforge show ttp examples//args/basic.yaml

  1. Run the specified example:

bash ttpforge run examples//args/basic.yaml \ --arg str_to_print=hello \ --arg run_second_step=true

Extension points exported contracts — how you extend this code

Executor (Interface)
Executor is an interface that defines the Execute method. [21 implementers]
pkg/blocks/executor.go
Condition (Interface)
Condition is the common interface implemented by all condition types [3 implementers]
pkg/checks/condition.go
ExecutionBackend (Interface)
ExecutionBackend abstracts the execution environment so that actions can run locally or on a remote host transparently. [3 …
pkg/backends/backend.go
Filter (Interface)
Filter can be used to extract an output value from the provided string using Apply(...) [2 implementers]
pkg/outputs/outputs.go
RepoCollection (Interface)
RepoCollection provides useful methods for resolving and navigating TTPs stored in various different repositories [1 implementers]
pkg/repos/repocollection.go
Action (Interface)
Action is an interface that is implemented by all action types used in steps/cleanups (such as create_file, inline, etc)
pkg/blocks/actions.go
Repo (Interface)
Repo provides an interface for finding TTPs and templates from a repo such as ForgeArmory [1 implementers]
pkg/repos/repo.go

Core symbols most depended-on inside this repo

L
called by 141
pkg/logging/logger.go
NewTTPExecutionContext
called by 40
pkg/blocks/context.go
Close
called by 38
pkg/backends/backend.go
templateStep
called by 36
pkg/blocks/context.go
Execute
called by 33
pkg/blocks/actions.go
String
called by 25
pkg/platforms/spec.go
Validate
called by 22
pkg/blocks/actions.go
AddError
called by 19
pkg/validation/validator.go

Shape

Method 286
Function 258
Struct 89
Interface 8
TypeAlias 1

Languages

Go100%

Modules by API surface

pkg/backends/ssh.go33 symbols
pkg/backends/sftpfs.go29 symbols
pkg/blocks/connectstep_test.go25 symbols
pkg/repos/repo.go24 symbols
pkg/repos/repocollection.go21 symbols
pkg/blocks/expectstep_test.go17 symbols
pkg/blocks/step.go15 symbols
pkg/blocks/actions.go15 symbols
pkg/blocks/httprequest.go13 symbols
pkg/validation/integration.go11 symbols
pkg/blocks/ttps.go11 symbols
pkg/logging/logger.go10 symbols

For agents

$ claude mcp add TTPForge \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact