MMT Attack Toolkit - 26 network attacks from one CLI for authorized security testing and education
Project description
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
Docker — two-container lab (recommended, no host setup required):
git clone https://github.com/Montimage/mmt-attacker.git
cd mmt-attacker
docker compose up --build -d
docker compose exec attacker matcha syn-flood --target-ip target --target-port 80 --count 200
docker compose down
Starts an isolated lab with an attacker container (matcha CLI) and a
target container (nginx + SSH + FTP). Attacks stay contained to the lab
bridge network.
Docker — CLI-only (run against your own lab target):
docker build -t matcha .
docker run --rm --cap-add NET_ADMIN --cap-add NET_RAW matcha --help
See docs/DEMO.md for the full two-container guide. See docs/DOCKER.md for the CLI-only Docker guide (PCAP replay, JSON output, etc.).
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 (CLI-only image)
- Two-container attack simulation demo (attacker + target via docker compose)
- 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
- Create a new module in
src/attacks/ - Inherit from
AttackBase - Implement
add_arguments(),validate(), andrun() - 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
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
Code requirements:
- PEP 8 style
- Include tests
- Update docs as needed
- Maintain backward compatibility
Support
- Check the documentation
- Search existing issues
- Email developer@montimage.eu
- Create a new issue if needed
Built by Montimage
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mmt_attacker-0.2.1.tar.gz.
File metadata
- Download URL: mmt_attacker-0.2.1.tar.gz
- Upload date:
- Size: 49.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0901b4e3c58321023cb2cf835862d0eb3f9d856b9cb25b47bbcdcd81f79ca98c
|
|
| MD5 |
dfca6b91b4bd4e7fd09e7061ff4aff72
|
|
| BLAKE2b-256 |
bc81b8b948268c8fe7a7574430c0b9274046ec726af9bbffb9afa73c4c1c5550
|
File details
Details for the file mmt_attacker-0.2.1-py3-none-any.whl.
File metadata
- Download URL: mmt_attacker-0.2.1-py3-none-any.whl
- Upload date:
- Size: 34.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be61869efe2eef95e7ed7c5fbd89d580821b770b0a0fbe0e07f5bf9e2e695089
|
|
| MD5 |
c6e4f8c9ddf66c0ebbb9cb5c0f5fcc16
|
|
| BLAKE2b-256 |
217120bde5b8d6460263d1ba2069919d27e30db84ab92cb529a9dcf89233954d
|