Catalog PyPI
Back to packageRELEASE DETAILS

0.1.0

PyPI

aasm-cli

AI Attack Surface Mapper — Enterprise CLI for discovering and securing AI infrastructure

ai-securityattack-surfaceclicybersecurityllmmcppentest
Published28 Jun 2026
Direct dependencies24
Transitive dependenciesNot calculated

README

Version 0.1.0 documentation

AASM — AI Attack Surface Mapper

CI Python 3.12+ License: MIT

Enterprise CLI for discovering, fingerprinting, and securing AI infrastructure.

AASM is a professional Linux CLI cybersecurity platform built for penetration testers, AI security engineers, blue teams, and red teams. It discovers and assesses AI ecosystems including Local LLMs, MCP Servers, AI Agents, AI Gateways, and AI APIs.

Designed in the philosophy of Nmap, BloodHound, and Trivy — but specialized for AI infrastructure.


Quick Start

# Install from PyPI
pip install aasm

# Or install from source
git clone https://github.com/hashematiyat/AASM.git
cd AASM
pip install -e .

# Run a scan
aasm scan 192.168.1.0/24

# Discover AI services on localhost
aasm discover localhost

# Audit a specific service
aasm audit http://localhost:11434

# Discover MCP servers
aasm mcp 192.168.1.0/24

Features

ModuleCapability
DiscoveryScans networks for Ollama, Open WebUI, LM Studio, LiteLLM, vLLM, HuggingFace TGI, Flowise, and more
FingerprintingDeep service fingerprinting — version, models, endpoints, auth, framework
MCP ScannerJSON-RPC 2.0 MCP server discovery with tool/resource/prompt enumeration
MCP AnalyzerSecurity analysis of MCP permissions, dangerous tools, and trust boundaries
Agent AnalyzerDiscovers AI agent frameworks and maps capabilities and risk
AssessmentPrompt injection, system prompt disclosure, jailbreak, auth bypass testing
Attack Surface MapperBuilds asset inventory and discovers multi-hop attack paths
Risk EngineCVSS-style scoring with MITRE ATT&CK and OWASP LLM Top 10 mapping
ReportingHTML, JSON, and SARIF report generation
VisualizationGraphviz DOT and Mermaid attack surface diagrams

CLI Commands

aasm scan 192.168.1.0/24                  # Full AI infrastructure scan
aasm discover 10.0.0.0/24                 # Quick service discovery
aasm fingerprint http://localhost:11434    # Deep fingerprint one service
aasm audit http://localhost:3000          # Security audit a service
aasm mcp 192.168.1.0/24                  # Discover & audit MCP servers
aasm agents 10.0.0.0/24                  # Discover AI agents
aasm assess http://localhost:11434        # Offensive security assessment
aasm graph scan_result.json              # Generate infrastructure graph
aasm report scan_result.json             # Generate HTML/SARIF reports
aasm risk scan_result.json               # Risk scoring & executive summary
aasm platforms                            # List supported AI platforms
aasm version                              # Show version

Global Options

--config / -c      Config file path (default: aasm.yaml or ~/.config/aasm/config.yaml)
--verbose / -v     Verbose output
--debug            Debug mode

Scan Options

aasm scan 192.168.1.0/24 \
  --ports 11434,3000,8080 \
  --profile aggressive \
  --formats json,html,sarif \
  --output ./reports \
  --no-fingerprint \
  --no-mcp \
  --no-risk

Supported AI Platforms

PlatformTypeDefault Ports
OllamaLocal LLM11434, 11435
Open WebUIAI Web UI3000, 8080
LM StudioLocal LLM1234, 1235
LiteLLMAI Gateway4000, 8000
vLLMLocal LLM8000, 8080
HuggingFace TGILocal LLM8080, 3000
FlowiseAI Agent3000, 3001
OpenAI-Compatible APIsAI API8000, 5000, …

The plugin system allows adding new platforms without modifying core code.


Docker

# Build
docker build -t aasm .

# Scan a network
docker run --rm -it --network host aasm scan 192.168.1.0/24

# Save reports to host
docker run --rm -it \
  --network host \
  -v $(pwd)/reports:/home/aasm/aasm_reports \
  aasm scan 192.168.1.0/24 -o /home/aasm/aasm_reports

Configuration

# Generate a default config
aasm config --init

# Show effective config
aasm config --show

aasm.yaml:

version: "1"

discovery:
  timeout: 5.0
  concurrency: 50
  verify_ssl: false
  ports: [11434, 3000, 1234, 4000, 8080, 8000]

assessment:
  prompt_injection: true
  prompt_leakage: true
  jailbreak: false
  max_payloads: 20

reporting:
  output_dir: ./aasm_reports
  formats: [json, html]

profiles:
  quick:
    name: quick
    ports: [11434, 3000, 1234, 4000]
    timeout: 3.0
    concurrency: 100

Use profiles: aasm scan 192.168.1.0/24 --profile aggressive


Plugin System

Add new platform detectors or assessment modules without touching core code:

# my_plugin.py
from aasm.plugins.base import DetectorPlugin
from aasm.core.models import AIService, AIServiceType

class MyCustomDetector(DetectorPlugin):
    name = "my-platform"
    version = "1.0.0"
    description = "Detects MyCustom AI platform"
    platform_name = "MyCustom"
    default_ports = [9999]

    async def detect(self, host: str, port: int) -> AIService | None:
        # Your detection logic here
        ...

Load plugins:

aasm plugins --load ./my_plugins/

Report Formats

FormatDescription
JSONMachine-readable full scan result (suitable for SIEM ingestion)
HTMLProfessional dark-themed HTML report with risk matrix
SARIFStatic Analysis Results Interchange Format (GitHub, Azure DevOps)

Security Assessments

⚠ Only assess systems you own or have explicit written permission to test.

# Standard assessment (prompt injection + auth bypass)
aasm assess http://localhost:11434

# Full offensive assessment (includes jailbreak testing)
aasm assess http://localhost:11434 --jailbreak

# Targeted test
aasm assess http://localhost:11434 --no-prompt-injection --auth-bypass

OWASP LLM Top 10 2025 coverage:

  • LLM01 — Prompt Injection
  • LLM02 — Sensitive Information Disclosure
  • LLM06 — Excessive Agency
  • LLM07 — System Prompt Leakage
  • LLM08 — Weak Guardrails

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/ -v --cov=aasm

# Lint
ruff check aasm/

# Type check
mypy aasm/

Architecture

aasm/
├── aasm/
│   ├── cli/                    # Typer CLI commands
│   │   ├── main.py             # App entry point
│   │   ├── output.py           # Rich terminal output
│   │   └── commands/           # One file per subcommand
│   ├── core/                   # Shared domain
│   │   ├── config.py           # YAML config & profiles
│   │   ├── logger.py           # Enterprise logging
│   │   └── models.py           # Pydantic domain models
│   ├── modules/                # Feature modules (9 modules)
│   │   ├── discovery/          # Module 1 — AI Discovery Engine
│   │   │   └── platforms/      # Per-platform detectors (plugin-able)
│   │   ├── fingerprint/        # Module 2 — Fingerprinting Engine
│   │   ├── mcp/                # Module 3 — MCP Scanner & Analyzer
│   │   ├── agents/             # Module 4 — AI Agent Analyzer
│   │   ├── assessment/         # Module 5 — Security Assessment Engine
│   │   ├── mapper/             # Module 6 — Attack Surface Mapper
│   │   ├── risk/               # Module 7 — Risk Engine
│   │   ├── reporting/          # Module 8 — Reporting Engine
│   │   └── visualization/      # Module 9 — Visualization Engine
│   └── plugins/                # Plugin framework
├── tests/                      # pytest test suite
├── config/                     # Default YAML configs
├── Dockerfile
├── pyproject.toml
└── README.md

MITRE ATT&CK & OWASP Mapping

AASM maps all findings to:

  • MITRE ATT&CK (T-codes for traditional TTPs)
  • MITRE ATLAS (AML-codes for AI/ML specific threats)
  • OWASP LLM Top 10 2025 for AI-specific vulnerability categories

Roadmap

  • PDF report generation
  • Neo4j graph export for BloodHound-style visualization
  • MITRE ATLAS full mapping
  • Kubernetes AI workload discovery
  • Real-time streaming scan output
  • CI/CD pipeline integration mode
  • Langchain/LangGraph agent detection
  • OpenTelemetry tracing
  • Web dashboard (optional companion)

License

MIT — See LICENSE


AASM is intended for authorized security testing only. Always obtain written permission before scanning networks or systems you do not own.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 25

Native requirements
24 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
aiofiles
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
aiofiles>=23.2.1runtime
aiosqlite
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
aiosqlite>=0.20.0runtime
anyio
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
anyio>=4.4.0runtime
asyncio-throttle
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
asyncio-throttle>=1.0.2runtime
click
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
click>=8.1.7runtime
graphviz
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
graphviz>=0.20.3runtime
httpx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
httpx>=0.27.0runtime
ipaddress
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
ipaddressruntime
jinja2
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
jinja2>=3.1.4runtime
matplotlib
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
matplotlib>=3.9.0runtime
networkx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
networkx>=3.3runtime
pydantic-settings
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
pydantic-settings>=2.3.0runtime
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
pydantic>=2.7.0runtime
python-nmap
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
python-nmap>=0.7.1runtime
pyyaml
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
pyyaml>=6.0.1runtime
rich
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
rich>=13.7.0runtime
sqlalchemy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
sqlalchemy>=2.0.30runtime
typer
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
typer>=0.12.0runtime
weasyprint
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
weasyprint>=62.0runtime
httpx
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
httpx; extra == "dev"runtime
mypy
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
mypy>=1.10.0; extra == "dev"runtime
pytest-asyncio
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
pytest-asyncio>=0.23.7; extra == "dev"runtime
pytest-cov
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
pytest-cov>=5.0.0; extra == "dev"runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
pytest>=8.2.0; extra == "dev"runtime
ruff
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
ruff>=0.4.7; extra == "dev"runtime

Distribution files

2 collected
aasm_cli-0.1.0-py3-none-any.whl

bdist_wheel · 120.89 KB · Python py3

Source file
aasm_cli-0.1.0.tar.gz

sdist · 108.22 KB · Python source

Source file

Repository

PENDING
aasm-project/aasm

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:04 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:913da92b4d0f7efb48568e346ad5cd9d196e7da6537bd08884ce6efcdce8c014

Other collected versions

View all collected versions →