Skip to main content

MMT Attack Toolkit - 26 network attacks from one CLI for authorized security testing and education

Project description

MMT-Attacker Logo

License Python PyPI CI

Network attack simulation for security education

A unified matcha CLI for running network-layer, application-layer, and replay attacks in controlled lab environments — built to teach how attacks work, not just that they exist.

Get Started | Playbook | Web Demo


How It Works

graph LR
    Install["pip install -e ."] --> CLI["matcha <attack>"]
    CLI --> Registry["Attack Registry"]
    Registry --> Validate["Validate args"]
    Validate --> Execute["Execute attack"]
    Execute --> Target["Lab Target"]
    Execute --> Log["Structured logs"]

Each attack inherits from AttackBase, which enforces argument parsing, input validation, and structured logging. The registry auto-discovers modules — adding a new attack requires only a class and a one-line registration.

Attack Coverage

Layer Attacks
Network ARP Spoofing, BGP Hijacking, DHCP Starvation, DNS Amplification, ICMP Flood, MAC Flooding, MITM, NTP Amplification, Ping of Death, Smurf, SYN Flood, UDP Flood
Application Credential Harvester, Directory Traversal, FTP Brute Force, HTTP DoS, HTTP Flood, RDP Brute Force, Slowloris, SQL Injection, SSH Brute Force, SSL Strip, VLAN Hopping, XSS, XXE
Replay PCAP Replay

Key Features

Feature What you get
Single CLI All attacks through matcha — one interface for the entire curriculum
PCAP replay Replay captured traffic with speed control and interface selection
Built-in validation IP, port, interface, and parameter checks before execution
Structured logging Every attack logs events for post-analysis and review
Pluggable architecture Add an attack by subclassing AttackBase and registering it
Web demo React-based interactive walkthroughs with Mermaid flow diagrams
Shell completions Tab-completion for bash, zsh, and fish

Quick Start

Prerequisites: Python 3.8+ and root/sudo privileges (required for raw socket attacks)

pip:

pip install mmt-attacker

One-line install (Linux / macOS — installs system deps automatically):

curl -sSL https://raw.githubusercontent.com/Montimage/mmt-attacker/main/install.sh | bash

Or with wget:

wget -qO- https://raw.githubusercontent.com/Montimage/mmt-attacker/main/install.sh | bash

From source:

git clone https://github.com/Montimage/mmt-attacker.git
cd mmt-attacker
pip install -e .

Verify:

matcha --help

List all available attacks:

matcha list

Launch an attack (in a controlled lab environment):

matcha http-dos --target-url http://example.com --threads 10

Shell Completions

# bash (~/.bashrc)
eval "$(_MATCHA_COMPLETE=bash_source matcha)"
# zsh (~/.zshrc)
eval "$(_MATCHA_COMPLETE=zsh_source matcha)"
# fish (~/.config/fish/config.fish)
_MATCHA_COMPLETE=fish_source matcha | source

Or print the activation command:

matcha completions bash   # or zsh / fish

Usage Examples

PCAP Replay

matcha pcap-replay \
    --pcap-file capture.pcap \
    --interface eth0 \
    --speed 2.0

ARP Spoofing

matcha arp-spoof \
    --target-ip 192.168.1.100 \
    --gateway-ip 192.168.1.1

HTTP DoS

matcha http-dos \
    --target-url http://example.com \
    --threads 10

Attack Info

matcha info arp-spoof

Web Interface

Install frontend dependencies:

cd frontend && npm install

Start the dev server:

npm run dev

Opens at http://localhost:3000 — interactive attack walkthroughs, Mermaid flow diagrams, command generation with validation, and simulated execution results.

Educational Use

MMT-Attacker is built for security courses, CTF preparation, and lab-based research. The web demo explains each attack's mechanism without executing real traffic. The CLI is for hands-on practice in isolated, authorized environments.

Use cases:

  • University network security courses
  • Cybersecurity workshop labs
  • IDS/IPS detection research (generate known attack traffic)
  • Personal study in a home lab

Security Warning

This tool is for authorized security testing and education only. Before use:

  • Obtain written authorization from the system owner
  • Test only in controlled, isolated environments
  • Follow responsible disclosure practices
  • Comply with all applicable laws

Unauthorized use may be illegal. See PLAYBOOK for detailed ethical guidelines.

Roadmap

  • GUI interface
  • Cloud deployment (Netlify)
  • CLI tool (matcha)
  • Shell completions
  • CI/CD pipeline
  • Additional attack vectors
  • Enhanced reporting
  • Docker containerization
  • API integration

Get Started

pip install -e .

Read the Playbook | Try the Web Demo | Contributing | Apache 2.0 Licensed


Project Structure
mmt-attacker/
├── matcha/                        # CLI package
│   ├── cli.py                    # Click-based CLI entry point
│   ├── commands/                 # CLI commands
│   │   └── completions_cmd.py   # Shell completion support
│   └── attacks/                  # Attack implementations (auto-discovered)
├── src/
│   ├── attacks/                  # Attack implementations
│   │   ├── base.py              # Base attack class (AttackBase)
│   │   ├── arp_spoof.py         # ARP spoofing
│   │   ├── syn_flood.py         # SYN flood
│   │   ├── dns_amplification.py # DNS amplification
│   │   ├── http_dos.py          # HTTP DoS
│   │   ├── slowloris.py         # Slowloris
│   │   ├── ssh_brute_force.py   # SSH brute force
│   │   ├── sql_injection.py     # SQL injection
│   │   ├── pcap_replay.py       # PCAP replay
│   │   ├── ping_of_death.py     # Ping of Death
│   │   └── credential_harvester.py
│   └── utils/                   # Validators, network utils, logger
├── frontend/                     # React + Vite web demo
├── docs/                         # Documentation + playbook
├── pyproject.toml               # Package config (matcha entry point)
└── README.md
Adding New Attacks
  1. Create a new module in src/attacks/
  2. Inherit from AttackBase
  3. Implement add_arguments(), validate(), and run()
  4. Register in src/attacks/__init__.py
from .base import AttackBase
from argparse import ArgumentParser
import logging

logger = logging.getLogger(__name__)

class NewAttack(AttackBase):
    name = "new-attack"
    description = "Description of the new attack type"

    def add_arguments(self, parser: ArgumentParser) -> None:
        parser.add_argument('--target', required=True, help='Target IP or hostname')
        parser.add_argument('--port', type=int, default=80, help='Target port')

    def validate(self, args) -> bool:
        if not self.validator.validate_ip(args.target):
            logger.error(f"Invalid target: {args.target}")
            return False
        return True

    def run(self, args) -> None:
        logger.info(f"Starting {self.name} against {args.target}:{args.port}")
        # Attack logic here

Register it:

from .new_attack import NewAttack

ATTACKS = {
    # ... existing attacks ...
    "new-attack": NewAttack,
}
Contributing
  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

Code requirements:

  • PEP 8 style
  • Include tests
  • Update docs as needed
  • Maintain backward compatibility
Support
  1. Check the documentation
  2. Search existing issues
  3. Email developer@montimage.eu
  4. Create a new issue if needed

Built by Montimage

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

mmt_attacker-0.1.0.tar.gz (41.7 kB view details)

Uploaded Source

Built Distribution

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

mmt_attacker-0.1.0-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file mmt_attacker-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for mmt_attacker-0.1.0.tar.gz
Algorithm Hash digest
SHA256 752643ca6f879e473d57d0d6b36820849bf684e3f9518f767f1e47ea3c7716a7
MD5 3c970603b12e99f035a88694fabaceb0
BLAKE2b-256 6d736eea7b3a65f7083383ab7b732f1601dbac0635cf03432b708ffe83fe65b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmt_attacker-0.1.0.tar.gz:

Publisher: publish.yml on Montimage/mmt-attacker

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

File details

Details for the file mmt_attacker-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for mmt_attacker-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96a249a8cde0aaf046885e2a6c2f85bbd522bfa42350e7aeb1b0159f5be5b1c4
MD5 6a771c902705d07cb133662939227dae
BLAKE2b-256 e32981d8ab0c76471ca97ac068fc626e972a9a71b14b15d49e2396f8b27db882

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmt_attacker-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Montimage/mmt-attacker

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