Skip to content

AIMap - AI Infrastructure Exposure Scanner Cheatsheet

AIMap - AI Infrastructure Exposure Scanner Cheatsheet

AIMap is an open-source platform for finding exposed AI infrastructure on the internet. As teams rushed to self-host LLMs, a large number of Ollama servers, MCP endpoints, and inference proxies ended up reachable from the public internet with no authentication. AIMap discovers these at scale, fingerprints what is running, scores the exposure, and can run protocol-specific attack tests against targets you are authorized to assess. Think of it as nmap for the AI serving layer.

Authorized targets only. Discovery at internet scale and active protocol testing have legal implications. Scan only assets you own or are explicitly permitted to test.

Installation

MethodCommand
pippip install aimap
Dockerdocker run -it aimap/aimap
From sourcegit clone the repo, then pip install -e .
Verifyaimap --version

Core Usage

CommandDescription
aimap scan 10.0.0.0/24Scan a CIDR you own for AI services
aimap scan --target host:11434Check a specific endpoint
aimap fingerprint <target>Identify the service and version
aimap score <target>Produce an exposure score
aimap --helpFull option list

What It Discovers

ServiceDefault portRisk when exposed
Ollama11434Model listing, prompt abuse, resource theft
MCP endpointsvariesTool invocation, data access
Inference proxies8000/8080Unmetered model access
vLLM / OpenAI-compatible8000Free inference, prompt exfiltration
Vector databases6333/8080Embedded document leakage

Exposure Scoring

FactorRaises score
No authenticationAnyone can call the API
Model listing enabledReveals internal model inventory
Tool access (MCP)Endpoint can take actions
Verbose errorsLeaks configuration/paths
Writable endpointsModel upload/deletion possible

Protocol Tests

TestChecks
Unauthenticated accessDoes the API answer without a key?
Model enumerationCan models be listed?
Prompt injection surfaceAre system prompts reachable?
Resource abuseCan an attacker run inference for free?
MCP tool inventoryWhat tools can be invoked?

Common Workflows

# Audit your own infrastructure for accidentally-exposed AI services
aimap scan 10.0.0.0/16 --output exposure.json

# Verify a specific self-hosted Ollama is not publicly reachable
aimap fingerprint ollama.internal.example.com:11434

# Score and report for a compliance review
aimap score --target api.internal.example.com --format json

Defensive Checklist

ControlWhy
Bind to localhostOLLAMA_HOST=127.0.0.1 rather than 0.0.0.0
Auth proxyPut an authenticating reverse proxy in front
Network policyFirewall/VPC rules; never expose 11434 publicly
Rate limitsBlunt resource-abuse attacks
MonitorAlert on unexpected inference traffic

The most common real-world finding is simply an Ollama server bound to 0.0.0.0 on a host with a public IP.

AIMap vs General Scanners

AspectAIMapnmapShodan
FocusAI/LLM serving layerGeneric ports/servicesInternet-wide index
FingerprintingAI-protocol awareGeneric service probesBanner-based
Attack testsAI-specificScripts (NSE)None
Best forAI infra exposure auditsGeneral reconPassive discovery

Resources