Skip to main content

MITRE EMB3D: Library & CLI for working with the MITRE EMB3D framework.

Project description

MITRE EMB3D

Documentation build status pre-commit

A CLI, TUI, MCP Server & AI based Threat Analysis for https://emb3d.mitre.org/

Run

Via uvx

uvx mitre-emb3d --help
uvx mitre-emb3d --pprint properties Networking --level 3

Add to your project

The project can be used both as a tool & library

uv add mitre-emb3d

What this project enables!!

AI Driven Embedded Project Threat Analysis

  • Determine which device properties are applicable to your project
  • Do threat analysis
  • Generate a detailed project report and heatmap
uvx mitre-emb3d ai --repo <path-to-repo> --config config.toml map-properties
uvx mitre-emb3d ai --repo <path-to-repo> --config config.toml threat-analysis
uvx mitre-emb3d ai --repo <path-to-repo> --config config.toml gen-site

See the documentation & guides for more information on configuration https://mitre-emb3d.readthedocs.io/en/latest/guides/

CLI, MCP Server & TUI

You can use the CLI or MCP server or both to build your own solutions

  • List device properties for a given category
  • List threats for a given category
  • List threats for a given device property
  • List device properties for a certain threat
  • List mitigations for a given threat
  • Get detailed information about a threat
  • Get detailed information about a mitigation
  • A CLI - AI Agent first (returns JSON output) / For humans add --pprint to see beautiful ouput
  • A TUI - Heatmap creation, reading & update (See TUI section below for screenshots)
  • An MCP Server

Example -

$ uvx mitre-emb3d --pprint list-threats-for-category "Networking"
- TID-221: Authentication Bypass By Message Replay
- TID-222: Critical System Service May Be Disabled
- TID-310: Remotely Accessible Unauthenticated Services
- TID-316: Incorrect Certificate Verification Allows Authentication Bypass
- TID-317: Predictable Cryptographic Key
- TID-318: Insecure Cryptographic Implementation
- TID-401: Undocumented Protocol Features
- TID-404: Remotely Triggerable Deadlock/DoS
- TID-405: Network Stack Resource Exhaustion
- TID-406: Unauthorized Messages or Connections
- TID-407: Missing Message Replay Protection
- TID-408: Unencrypted Sensitive Data Communication
- TID-410: Cryptographic Protocol Side Channel
- TID-411: Weak/Insecure Cryptographic Protocol
- TID-412: Network Routing Capability Abuse

Note --pprint (default is OFF, default output is JSON) for display

Explore other commands using the CLI help

 Usage: med [OPTIONS] COMMAND [ARGS]...

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --version                                        Show the version of CLI and exit                                        │
│ --release                                TEXT    2.0.1, 2.0 ... [default: 2.0.1]                                         │
│ --heatmap-storage                        [json]  Storage type for heatmaps (e.g. json) [default: json]                   │
│ --loglevel            -l                 TEXT    Set the logging level (debug, info, warning, error, critical)           │
│                                                  [default: warning]                                                      │
│ --pprint                  --no-pprint            Whether to pretty-print the output (e.g. JSON lists)                    │
│                                                  [default: no-pprint]                                                    │
│ --install-completion                             Install completion for the current shell.                               │
│ --show-completion                                Show completion for the current shell, to copy it or customize the      │
│                                                  installation.                                                           │
│ --help                                           Show this message and exit.                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ list-categories               List the categories                                                                        │
│ list-properties-for-category  List properties for a certain category                                                     │
│ list-properties-for-threat    List properties for a certain threat                                                       │
│ list-threats-for-category     List threats for a certain category                                                        │
│ list-threats-for-property     List threats for a certain device property                                                 │
│ list-mitigations              List mitigations for a certain threat                                                      │
│ threat                        Threat Information                                                                         │
│ mitigation                    Mitigation Information                                                                     │
│ mcp                           Launch the MCP server                                                                      │
│ heatmap                       HeatMap related commands                                                                   │
│ ai                            AI related commands                                                                        │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Heatmap TUI

You can use TUI to inspect & edit the Heatmap

# Make sure to initialize the heatmap
uvx mitre-emb3d heatmap init "MyProject" "Description of Project"
# Show the current state (and edit) using TUI
uvx mitre-emb3d heatmap tui MyProject

You can override the default data directory by setting MITRE_EMB3D_HEATMAP_JSON_STORAGE_DIR environment variable

Heatmap TUI

Clicking on Threat Entry will open a screen that presents a Form, Information about Threat & Mitigations

Heatmap TUI

MCP Server

At the moment only STDIO is supported

For your mcp.json add the server like this

{
  "servers": {
    "mitre-emb3d": {
      "command": "uvx",
      "args": ["mitre-emb3d", "mcp"]
    }
  }
}

Use mcp inspector to play with the MCP Server

npx -y @modelcontextprotocol/inspector uvx mitre-emb3d mcp

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mitre_emb3d-0.5.0.tar.gz (312.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mitre_emb3d-0.5.0-py3-none-any.whl (63.3 kB view details)

Uploaded Python 3

File details

Details for the file mitre_emb3d-0.5.0.tar.gz.

File metadata

  • Download URL: mitre_emb3d-0.5.0.tar.gz
  • Upload date:
  • Size: 312.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mitre_emb3d-0.5.0.tar.gz
Algorithm Hash digest
SHA256 780cab6296443b63f4764da23a4a900d3533bddb518ed40b61629bd18a7e90a6
MD5 26f2a201257f11d80c5bbe7f709bb763
BLAKE2b-256 eef13a2ba93ed799c296e8209905d298c92ec7975c7d5a3b6c892eb24c6b06ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for mitre_emb3d-0.5.0.tar.gz:

Publisher: publish.yaml on ksachdeva/mitre-emb3d

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mitre_emb3d-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: mitre_emb3d-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 63.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mitre_emb3d-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 997bd395f83b33c8a47cc826c9733c5a1f9c601ec56cdd8a35066e2ee3555878
MD5 7aa3629b7943a8aed3d5131ca9dd7a45
BLAKE2b-256 ffa59d633025c2886a27483e7f21109761ee1723dd2646bf121277acc6d6d8b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for mitre_emb3d-0.5.0-py3-none-any.whl:

Publisher: publish.yaml on ksachdeva/mitre-emb3d

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page