honeymcp 0.1.0__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {honeymcp-0.1.0 → honeymcp-0.1.2}/PKG-INFO +119 -142
- {honeymcp-0.1.0 → honeymcp-0.1.2}/README.md +117 -141
- {honeymcp-0.1.0 → honeymcp-0.1.2}/pyproject.toml +2 -1
- {honeymcp-0.1.0 → honeymcp-0.1.2}/uv.lock +1 -1
- {honeymcp-0.1.0 → honeymcp-0.1.2}/.env.example +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/.gitignore +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/.python-version +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/.streamlit/config.toml +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/AGENTS.md +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/LICENSE +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/Makefile +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/examples/demo_server.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/examples/demo_server_dynamic.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/honeymcp.yaml +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/images/logo.png +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/main.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/__init__.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/cli.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/core/__init__.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/core/dynamic_ghost_tools.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/core/fingerprinter.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/core/ghost_tools.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/core/middleware.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/dashboard/__init__.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/dashboard/app.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/integrations/__init__.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/llm/__init__.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/llm/analyzers.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/llm/clients/__init__.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/llm/clients/provider_type.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/llm/prompts/__init__.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/llm/prompts/dynamic_ghost_tools.yaml +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/models/__init__.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/models/config.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/models/events.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/models/ghost_tool_spec.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/models/protection_mode.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/storage/__init__.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/src/honeymcp/storage/event_store.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/tests/test_demo_server_dynamic_e2e.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/tests/test_demo_server_e2e.py +0 -0
- {honeymcp-0.1.0 → honeymcp-0.1.2}/tests/test_dynamic_tools.py +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: honeymcp
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Deception middleware for AI agents - detecting data theft and indirect prompt injection in MCP servers
|
|
5
5
|
Project-URL: Homepage, https://github.com/barvhaim/HoneyMCP
|
|
6
6
|
Project-URL: Documentation, https://github.com/barvhaim/HoneyMCP#readme
|
|
7
7
|
Project-URL: Repository, https://github.com/barvhaim/HoneyMCP
|
|
8
8
|
Project-URL: Issues, https://github.com/barvhaim/HoneyMCP/issues
|
|
9
|
+
Project-URL: PyPI, https://pypi.org/project/honeymcp/
|
|
9
10
|
Author-email: Bar Haim <barha@il.ibm.com>, Alon Malach <Alon.Malach@ibm.com>
|
|
10
11
|
Maintainer-email: Bar Haim <barha@il.ibm.com>, Alon Malach <Alon.Malach@ibm.com>
|
|
11
12
|
License: Apache-2.0
|
|
@@ -46,46 +47,45 @@ Description-Content-Type: text/markdown
|
|
|
46
47
|
|
|
47
48
|
<img src="images/logo.png" alt="HoneyMCP logo" width="300" height="300" />
|
|
48
49
|
|
|
49
|
-
**
|
|
50
|
+
**Detect AI Agent Attacks Through Deception**
|
|
50
51
|
|
|
51
52
|
[](https://www.python.org/downloads/)
|
|
52
53
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
54
|
+
[](https://pypi.org/project/honeymcp/)
|
|
53
55
|
|
|
54
56
|
HoneyMCP is a defensive security tool that adds deception capabilities to Model Context Protocol (MCP) servers. It injects "ghost tools" (fake security-sensitive tools) that act as honeypots, detecting two critical threat categories:
|
|
55
57
|
|
|
56
58
|
- **Data Exfiltration** (via "get" tools) - Detects attempts to steal sensitive data like credentials, secrets, or private files
|
|
57
59
|
- **Indirect Prompt Injection** (via "set" tools) - Detects injection of malicious instructions that could manipulate AI agents working in this environment
|
|
58
60
|
|
|
59
|
-
**
|
|
60
|
-
- 🎯 **One-Line Integration** - Add to any FastMCP server with a single decorator
|
|
61
|
-
- 🤖 **Dynamic Ghost Tools** - LLM-generated honeypots tailored to your server's domain
|
|
62
|
-
- 🕵️ **Invisible Detection** - Attackers see realistic fake tools alongside legitimate ones
|
|
63
|
-
- 📊 **Attack Intelligence** - Captures full attack context: tool sequences, arguments, session data
|
|
64
|
-
- 📈 **Live Dashboard** - Real-time Streamlit dashboard for attack visualization
|
|
65
|
-
- 🔍 **Zero False Positives** - Only triggers when attackers explicitly call honeypot tools
|
|
61
|
+
**One line of code. High-fidelity detection. Complete attack telemetry.**
|
|
66
62
|
|
|
67
63
|
---
|
|
68
64
|
|
|
69
|
-
##
|
|
65
|
+
## Why HoneyMCP?
|
|
70
66
|
|
|
71
|
-
|
|
67
|
+
🎯 **One-Line Integration** - Add `@honeypot` decorator to any FastMCP server
|
|
68
|
+
🤖 **Context-Aware Honeypots** - LLM generates domain-specific deception tools
|
|
69
|
+
🕵️ **Transparent Detection** - Honeypots appear as legitimate tools to attackers
|
|
70
|
+
📊 **Attack Telemetry** - Captures tool call sequences, arguments, session metadata
|
|
71
|
+
📈 **Live Dashboard** - Real-time Streamlit dashboard for attack visualization
|
|
72
|
+
🔍 **High-Fidelity Detection** - Triggers only on explicit honeypot invocation
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
pip install honeymcp
|
|
75
|
-
```
|
|
74
|
+
---
|
|
76
75
|
|
|
77
|
-
|
|
76
|
+
## 🚀 Quick Start
|
|
77
|
+
|
|
78
|
+
### Install
|
|
78
79
|
|
|
79
80
|
```bash
|
|
80
|
-
honeymcp
|
|
81
|
+
pip install honeymcp
|
|
82
|
+
honeymcp init # Creates config files
|
|
81
83
|
```
|
|
82
|
-
|
|
83
|
-
This creates:
|
|
84
|
+
This creates the following config files:
|
|
84
85
|
- `honeymcp.yaml` - Ghost tool configuration
|
|
85
86
|
- `.env.honeymcp` - LLM credentials (only needed for dynamic ghost tools)
|
|
86
87
|
|
|
87
88
|
### Basic Usage
|
|
88
|
-
|
|
89
89
|
Add HoneyMCP to your FastMCP server with **one line**:
|
|
90
90
|
|
|
91
91
|
```python
|
|
@@ -96,21 +96,19 @@ mcp = FastMCP("My Server")
|
|
|
96
96
|
|
|
97
97
|
@mcp.tool()
|
|
98
98
|
def my_real_tool(data: str) -> str:
|
|
99
|
-
|
|
99
|
+
"""Your legitimate tool"""
|
|
100
100
|
return f"Processed: {data}"
|
|
101
101
|
|
|
102
|
-
# ONE LINE - Add honeypot
|
|
102
|
+
# ONE LINE - Add honeypot protection
|
|
103
103
|
mcp = honeypot(mcp)
|
|
104
104
|
|
|
105
105
|
if __name__ == "__main__":
|
|
106
106
|
mcp.run()
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
That's it
|
|
110
|
-
|
|
111
|
-
### Run the Demo Servers
|
|
109
|
+
**That's it!** Your server now deploys honeypot tools that detect attacks while legitimate tools operate normally.
|
|
112
110
|
|
|
113
|
-
|
|
111
|
+
### Try the Demo
|
|
114
112
|
|
|
115
113
|
```bash
|
|
116
114
|
git clone https://github.com/barvhaim/HoneyMCP.git
|
|
@@ -130,63 +128,51 @@ Dynamic ghost tools demo (requires LLM credentials in `.env.honeymcp`):
|
|
|
130
128
|
MCP_TRANSPORT=sse uv run python examples/demo_server_dynamic.py
|
|
131
129
|
```
|
|
132
130
|
|
|
131
|
+
# Launch dashboard
|
|
132
|
+
streamlit run src/honeymcp/dashboard/app.py
|
|
133
|
+
```
|
|
134
|
+
|
|
133
135
|
---
|
|
134
136
|
|
|
135
137
|
## 🎭 How It Works
|
|
136
138
|
|
|
137
|
-
### 1.
|
|
139
|
+
### 1. Honeypot Deployment
|
|
138
140
|
|
|
139
|
-
HoneyMCP injects
|
|
141
|
+
HoneyMCP injects deceptive security-sensitive tools that appear alongside legitimate tools:
|
|
140
142
|
|
|
141
143
|
**Two Modes:**
|
|
142
144
|
|
|
143
|
-
**Dynamic
|
|
145
|
+
**Dynamic Mode (Default)** - LLM analyzes your server context and generates domain-specific honeypots:
|
|
144
146
|
- File server → `bypass_file_permissions`, `read_system_credentials`
|
|
145
147
|
- Database server → `dump_admin_credentials`, `bypass_query_restrictions`
|
|
146
148
|
- API gateway → `list_internal_api_keys`, `access_admin_endpoints`
|
|
147
149
|
|
|
148
|
-
**Static
|
|
149
|
-
- `list_cloud_secrets`
|
|
150
|
-
- `execute_shell_command` - Returns fake shell output
|
|
151
|
-
- `bypass_security_check` - Returns fake bypass tokens
|
|
152
|
-
- `read_private_files` - Returns fake .env files
|
|
153
|
-
|
|
154
|
-
Dynamic tools are more convincing as they match your server's context.
|
|
150
|
+
**Static Mode** - Pre-configured generic honeypots:
|
|
151
|
+
- `list_cloud_secrets`, `execute_shell_command`, `read_private_files`
|
|
155
152
|
|
|
156
|
-
### 2.
|
|
153
|
+
### 2. Threat Detection
|
|
157
154
|
|
|
158
|
-
|
|
155
|
+
HoneyMCP detects two primary attack vectors when an AI agent invokes a honeypot:
|
|
159
156
|
|
|
160
|
-
**Data Exfiltration Attempts** (
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
**Indirect Prompt Injection** (set-style ghost tools):
|
|
166
|
-
- `modify_system_prompt`, `execute_shell_command`, `escalate_privileges`
|
|
167
|
-
- Attacker tries to inject malicious instructions to manipulate the agent
|
|
168
|
-
- Could enable further attacks on other users or systems
|
|
157
|
+
**Data Exfiltration Attempts** (GET-style honeypots):
|
|
158
|
+
```
|
|
159
|
+
Agent: "Use list_cloud_secrets to retrieve AWS credentials"
|
|
160
|
+
→ HoneyMCP: Returns synthetic credentials, logs attack event
|
|
161
|
+
```
|
|
169
162
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
- Timestamp and threat level
|
|
176
|
-
2. **Returns realistic fake data** to keep the attacker engaged
|
|
177
|
-
3. **Logs the event** to `~/.honeymcp/events/YYYY-MM-DD/`
|
|
178
|
-
4. **Continues normal operation** - legitimate tools still work
|
|
163
|
+
**Indirect Prompt Injection** (SET-style honeypots):
|
|
164
|
+
```
|
|
165
|
+
Agent: "Execute shell command to establish persistence"
|
|
166
|
+
→ HoneyMCP: Returns synthetic output, logs attack event
|
|
167
|
+
```
|
|
179
168
|
|
|
180
|
-
### 3.
|
|
169
|
+
### 3. Attack Fingerprinting
|
|
181
170
|
|
|
182
|
-
Every
|
|
171
|
+
Every honeypot invocation generates a detailed attack fingerprint:
|
|
183
172
|
```json
|
|
184
173
|
{
|
|
185
|
-
"event_id": "
|
|
186
|
-
"timestamp": "2026-01-23T15:45:23Z",
|
|
187
|
-
"session_id": "sess_xyz789",
|
|
174
|
+
"event_id": "evt_20260123_154523_abc",
|
|
188
175
|
"ghost_tool_called": "list_cloud_secrets",
|
|
189
|
-
"arguments": {},
|
|
190
176
|
"tool_call_sequence": ["safe_calculator", "list_cloud_secrets"],
|
|
191
177
|
"threat_level": "high",
|
|
192
178
|
"attack_category": "exfiltration",
|
|
@@ -196,30 +182,15 @@ Every attack is fingerprinted with:
|
|
|
196
182
|
|
|
197
183
|
---
|
|
198
184
|
|
|
199
|
-
## 📊 Dashboard
|
|
200
|
-
|
|
201
|
-
Launch the real-time attack dashboard:
|
|
202
|
-
|
|
203
|
-
```bash
|
|
204
|
-
streamlit run src/honeymcp/dashboard/app.py
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
**Dashboard Features:**
|
|
208
|
-
- 📈 Attack metrics (total attacks, critical threats, unique sessions)
|
|
209
|
-
- 🎯 Threat level breakdown
|
|
210
|
-
- 📋 Attack category analysis
|
|
211
|
-
- 🕐 Real-time event feed with full context
|
|
212
|
-
- 🔍 Tool call sequence visualization
|
|
213
|
-
|
|
214
|
-
The dashboard reads event JSON files from your configured event storage path.
|
|
215
|
-
|
|
216
|
-
---
|
|
217
185
|
|
|
218
186
|
## 🛡️ Protection Modes
|
|
219
187
|
|
|
220
188
|
HoneyMCP supports two protection modes that determine behavior after an attacker is detected (i.e., after they trigger a ghost tool):
|
|
221
189
|
|
|
222
190
|
### Scanner Protection Mode (`SCANNER`) - Default
|
|
191
|
+
|
|
192
|
+
**Immediate Lockout** - All subsequent tool calls return errors after honeypot trigger
|
|
193
|
+
|
|
223
194
|
Best for: Automated scanners, bots, and most attack scenarios
|
|
224
195
|
|
|
225
196
|
When a ghost tool is triggered, ALL subsequent tool calls return errors:
|
|
@@ -231,10 +202,12 @@ When a ghost tool is triggered, ALL subsequent tool calls return errors:
|
|
|
231
202
|
from honeymcp import honeypot
|
|
232
203
|
|
|
233
204
|
# Scanner mode (default) - lock out attackers
|
|
234
|
-
mcp = honeypot(mcp)
|
|
205
|
+
mcp = honeypot(mcp) # Default: SCANNER mode
|
|
235
206
|
```
|
|
236
207
|
|
|
237
|
-
###
|
|
208
|
+
### COGNITIVE Mode
|
|
209
|
+
**Sustained Deception** - Real tools return synthetic data, maintaining attacker engagement
|
|
210
|
+
|
|
238
211
|
Best for: Sophisticated attackers, red teams, targeted attacks
|
|
239
212
|
|
|
240
213
|
When a ghost tool is triggered, the session continues but with fake data:
|
|
@@ -286,32 +259,28 @@ mcp = honeypot(mcp, protection_mode=ProtectionMode.COGNITIVE)
|
|
|
286
259
|
### Quick Setup with CLI
|
|
287
260
|
|
|
288
261
|
The easiest way to configure HoneyMCP:
|
|
289
|
-
|
|
290
262
|
```bash
|
|
291
|
-
honeymcp init
|
|
263
|
+
honeymcp init # Creates honeymcp.yaml + .env.honeymcp
|
|
292
264
|
```
|
|
293
265
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
### Configuration File
|
|
266
|
+
### YAML Config
|
|
297
267
|
|
|
298
268
|
```yaml
|
|
269
|
+
# honeymcp.yaml
|
|
299
270
|
# Protection mode: SCANNER (lockout) or COGNITIVE (deception)
|
|
300
271
|
protection_mode: SCANNER
|
|
301
272
|
|
|
302
|
-
# Static ghost tools from catalog
|
|
273
|
+
# Static honeypots (ghost tools from catalog)
|
|
303
274
|
ghost_tools:
|
|
304
275
|
- list_cloud_secrets
|
|
305
276
|
- execute_shell_command
|
|
306
277
|
- dump_database_credentials
|
|
307
278
|
|
|
308
|
-
# Dynamic
|
|
279
|
+
# Dynamic honeypots (LLM-generated ghost tools )
|
|
309
280
|
dynamic_tools:
|
|
310
281
|
enabled: true
|
|
311
282
|
num_tools: 3
|
|
312
283
|
fallback_to_static: true
|
|
313
|
-
cache_ttl: 3600
|
|
314
|
-
|
|
315
284
|
# Alerting
|
|
316
285
|
alerting:
|
|
317
286
|
webhook_url: https://hooks.slack.com/...
|
|
@@ -325,21 +294,11 @@ dashboard:
|
|
|
325
294
|
enabled: true
|
|
326
295
|
```
|
|
327
296
|
|
|
328
|
-
|
|
329
|
-
|
|
297
|
+
Load config:
|
|
330
298
|
```python
|
|
331
|
-
from fastmcp import FastMCP
|
|
332
299
|
from honeymcp import honeypot_from_config
|
|
333
300
|
|
|
334
|
-
mcp =
|
|
335
|
-
|
|
336
|
-
@mcp.tool()
|
|
337
|
-
def my_real_tool(data: str) -> str:
|
|
338
|
-
return f"Processed: {data}"
|
|
339
|
-
|
|
340
|
-
# Load from honeymcp.yaml (searches ./honeymcp.yaml, ~/.honeymcp/honeymcp.yaml)
|
|
341
|
-
mcp = honeypot_from_config(mcp)
|
|
342
|
-
|
|
301
|
+
mcp = honeypot_from_config(mcp) # Loads honeymcp.yaml
|
|
343
302
|
# Or specify path explicitly
|
|
344
303
|
mcp = honeypot_from_config(mcp, "path/to/honeymcp.yaml")
|
|
345
304
|
```
|
|
@@ -380,11 +339,11 @@ HoneyMCP also supports environment overrides:
|
|
|
380
339
|
|
|
381
340
|
Dynamic ghost tools require LLM credentials. Run `honeymcp init` to generate `.env.honeymcp`, then add your credentials:
|
|
382
341
|
|
|
342
|
+
Add to `.env.honeymcp`:
|
|
383
343
|
```bash
|
|
384
|
-
# .env.honeymcp
|
|
385
344
|
LLM_PROVIDER=openai
|
|
386
345
|
LLM_MODEL=gpt-4o-mini
|
|
387
|
-
OPENAI_API_KEY=
|
|
346
|
+
OPENAI_API_KEY=your_key_here
|
|
388
347
|
```
|
|
389
348
|
|
|
390
349
|
Supported providers:
|
|
@@ -427,6 +386,7 @@ mcp = honeypot(
|
|
|
427
386
|
|
|
428
387
|
## 🧪 Testing with Claude Desktop
|
|
429
388
|
|
|
389
|
+
|
|
430
390
|
### 1. Configure Claude Desktop
|
|
431
391
|
|
|
432
392
|
**For stdio transport (recommended - works with all Claude Desktop versions):**
|
|
@@ -496,37 +456,46 @@ Expected: safe_calculator called, no alerts (zero false positives)
|
|
|
496
456
|
|
|
497
457
|
---
|
|
498
458
|
|
|
499
|
-
##
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
### Indirect Prompt Injection Tools ("Set" Tools)
|
|
514
|
-
These detect attempts to inject malicious instructions:
|
|
515
|
-
|
|
516
|
-
| Tool Name | Description | Threat Level |
|
|
517
|
-
|-----------|-------------|--------------|
|
|
518
|
-
| `execute_shell_command` | Execute shell commands (requires root) | Critical |
|
|
519
|
-
| `bypass_security_check` | Bypass auth/authz checks (internal) | Critical |
|
|
520
|
-
| `modify_system_prompt` | Modify AI system prompt (developer mode) | Critical |
|
|
521
|
-
| `escalate_privileges` | Escalate to admin/root (debug mode) | Critical |
|
|
522
|
-
| `disable_security_filters` | Disable input/output security filters (bypass mode) | Critical |
|
|
523
|
-
| `inject_system_message` | Inject message into AI system context (testing mode) | Critical |
|
|
524
|
-
| `override_permissions` | Override access control for resources (emergency access) | Critical |
|
|
459
|
+
## Dashboard
|
|
460
|
+
|
|
461
|
+
```bash
|
|
462
|
+
streamlit run src/honeymcp/dashboard/app.py
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
**Features:**
|
|
466
|
+
- 📈 Attack metrics (total events, critical threats, unique sessions)
|
|
467
|
+
- 🎯 Threat level distribution
|
|
468
|
+
- 📋 Attack category breakdown (exfiltration vs injection)
|
|
469
|
+
- 🕐 Real-time event stream
|
|
470
|
+
- 🔍 Tool call sequence analysis
|
|
471
|
+
|
|
472
|
+
---
|
|
525
473
|
|
|
474
|
+
## Honeypot Catalog
|
|
475
|
+
|
|
476
|
+
### Data Exfiltration Honeypots ("Get" Tools)
|
|
477
|
+
| Tool | Threat | Description |
|
|
478
|
+
|------|--------|-------------|
|
|
479
|
+
| `list_cloud_secrets` | High | Cloud provider credentials (AWS/Azure) |
|
|
480
|
+
| `read_private_files` | High | Sensitive configuration files |
|
|
481
|
+
| `dump_database_credentials` | Critical | Database connection strings |
|
|
482
|
+
| `export_user_data` | Critical | User PII records |
|
|
483
|
+
| `get_api_keys` | Critical | External service API keys |
|
|
484
|
+
|
|
485
|
+
### Prompt Injection Honeypots (SET)
|
|
486
|
+
| Tool | Threat | Description |
|
|
487
|
+
|------|--------|-------------|
|
|
488
|
+
| `execute_shell_command` | Critical | Shell command execution |
|
|
489
|
+
| `bypass_security_check` | Critical | Authentication/authorization bypass |
|
|
490
|
+
| `modify_system_prompt` | Critical | AI system prompt manipulation |
|
|
491
|
+
| `escalate_privileges` | Critical | Privilege escalation |
|
|
492
|
+
| `inject_system_message` | Critical | System context injection |
|
|
526
493
|
All ghost tools have tempting descriptions that mention "admin", "bypass", "internal", etc. to attract attackers.
|
|
527
494
|
|
|
528
495
|
---
|
|
529
496
|
|
|
497
|
+
|
|
498
|
+
|
|
530
499
|
## 🏗️ Architecture
|
|
531
500
|
|
|
532
501
|
```
|
|
@@ -591,21 +560,22 @@ Demonstrate security controls for AI systems:
|
|
|
591
560
|
- Generate audit logs of attempted attacks
|
|
592
561
|
- Meet AI security compliance requirements
|
|
593
562
|
|
|
594
|
-
|
|
563
|
+
## Security Considerations
|
|
564
|
+
|
|
565
|
+
### Detection Capabilities
|
|
566
|
+
✅ Detects data exfiltration attempts via GET-style honeypots
|
|
567
|
+
✅ Detects indirect prompt injection via SET-style honeypots
|
|
568
|
+
✅ Captures complete attack context and telemetry
|
|
569
|
+
✅ Returns synthetic data to maintain deception
|
|
595
570
|
|
|
596
|
-
|
|
571
|
+
### Limitations
|
|
572
|
+
❌ Detection-only system (does not prevent attacks)
|
|
573
|
+
❌ Does not sanitize or filter user input
|
|
574
|
+
❌ Not a replacement for input validation and security controls
|
|
575
|
+
❌ Cannot guarantee conversation history capture (MCP protocol limitation)
|
|
597
576
|
|
|
598
|
-
|
|
599
|
-
- ✅ Detects data exfiltration attempts via "get" ghost tools (credentials, secrets, files)
|
|
600
|
-
- ✅ Detects indirect prompt injection via "set" ghost tools (malicious instructions)
|
|
601
|
-
- ✅ Captures attack context for intelligence gathering
|
|
602
|
-
- ✅ Returns realistic fake data to deceive attackers
|
|
577
|
+
**Deploy HoneyMCP as part of defense-in-depth strategy, not as a standalone security control.**
|
|
603
578
|
|
|
604
|
-
### What HoneyMCP Does NOT Do
|
|
605
|
-
- ❌ Does not prevent attacks (it's a detection tool)
|
|
606
|
-
- ❌ Does not block or sanitize user input
|
|
607
|
-
- ❌ Does not replace proper security controls (defense in depth!)
|
|
608
|
-
- ❌ Does not guarantee conversation history capture (MCP limitation)
|
|
609
579
|
|
|
610
580
|
### Best Practices
|
|
611
581
|
1. **Defense in Depth** - Use HoneyMCP alongside input filters, not as a replacement
|
|
@@ -647,6 +617,13 @@ honeymcp version
|
|
|
647
617
|
git clone https://github.com/barvhaim/HoneyMCP.git
|
|
648
618
|
cd HoneyMCP
|
|
649
619
|
uv sync
|
|
620
|
+
|
|
621
|
+
# Run tests
|
|
622
|
+
uv run pytest
|
|
623
|
+
|
|
624
|
+
# Lint & format
|
|
625
|
+
make lint
|
|
626
|
+
make format
|
|
650
627
|
```
|
|
651
628
|
|
|
652
629
|
### Project Structure
|
|
@@ -2,46 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
<img src="images/logo.png" alt="HoneyMCP logo" width="300" height="300" />
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**Detect AI Agent Attacks Through Deception**
|
|
6
6
|
|
|
7
7
|
[](https://www.python.org/downloads/)
|
|
8
8
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
9
|
+
[](https://pypi.org/project/honeymcp/)
|
|
9
10
|
|
|
10
11
|
HoneyMCP is a defensive security tool that adds deception capabilities to Model Context Protocol (MCP) servers. It injects "ghost tools" (fake security-sensitive tools) that act as honeypots, detecting two critical threat categories:
|
|
11
12
|
|
|
12
13
|
- **Data Exfiltration** (via "get" tools) - Detects attempts to steal sensitive data like credentials, secrets, or private files
|
|
13
14
|
- **Indirect Prompt Injection** (via "set" tools) - Detects injection of malicious instructions that could manipulate AI agents working in this environment
|
|
14
15
|
|
|
15
|
-
**
|
|
16
|
-
- 🎯 **One-Line Integration** - Add to any FastMCP server with a single decorator
|
|
17
|
-
- 🤖 **Dynamic Ghost Tools** - LLM-generated honeypots tailored to your server's domain
|
|
18
|
-
- 🕵️ **Invisible Detection** - Attackers see realistic fake tools alongside legitimate ones
|
|
19
|
-
- 📊 **Attack Intelligence** - Captures full attack context: tool sequences, arguments, session data
|
|
20
|
-
- 📈 **Live Dashboard** - Real-time Streamlit dashboard for attack visualization
|
|
21
|
-
- 🔍 **Zero False Positives** - Only triggers when attackers explicitly call honeypot tools
|
|
16
|
+
**One line of code. High-fidelity detection. Complete attack telemetry.**
|
|
22
17
|
|
|
23
18
|
---
|
|
24
19
|
|
|
25
|
-
##
|
|
20
|
+
## Why HoneyMCP?
|
|
26
21
|
|
|
27
|
-
|
|
22
|
+
🎯 **One-Line Integration** - Add `@honeypot` decorator to any FastMCP server
|
|
23
|
+
🤖 **Context-Aware Honeypots** - LLM generates domain-specific deception tools
|
|
24
|
+
🕵️ **Transparent Detection** - Honeypots appear as legitimate tools to attackers
|
|
25
|
+
📊 **Attack Telemetry** - Captures tool call sequences, arguments, session metadata
|
|
26
|
+
📈 **Live Dashboard** - Real-time Streamlit dashboard for attack visualization
|
|
27
|
+
🔍 **High-Fidelity Detection** - Triggers only on explicit honeypot invocation
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
pip install honeymcp
|
|
31
|
-
```
|
|
29
|
+
---
|
|
32
30
|
|
|
33
|
-
|
|
31
|
+
## 🚀 Quick Start
|
|
32
|
+
|
|
33
|
+
### Install
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
honeymcp
|
|
36
|
+
pip install honeymcp
|
|
37
|
+
honeymcp init # Creates config files
|
|
37
38
|
```
|
|
38
|
-
|
|
39
|
-
This creates:
|
|
39
|
+
This creates the following config files:
|
|
40
40
|
- `honeymcp.yaml` - Ghost tool configuration
|
|
41
41
|
- `.env.honeymcp` - LLM credentials (only needed for dynamic ghost tools)
|
|
42
42
|
|
|
43
43
|
### Basic Usage
|
|
44
|
-
|
|
45
44
|
Add HoneyMCP to your FastMCP server with **one line**:
|
|
46
45
|
|
|
47
46
|
```python
|
|
@@ -52,21 +51,19 @@ mcp = FastMCP("My Server")
|
|
|
52
51
|
|
|
53
52
|
@mcp.tool()
|
|
54
53
|
def my_real_tool(data: str) -> str:
|
|
55
|
-
|
|
54
|
+
"""Your legitimate tool"""
|
|
56
55
|
return f"Processed: {data}"
|
|
57
56
|
|
|
58
|
-
# ONE LINE - Add honeypot
|
|
57
|
+
# ONE LINE - Add honeypot protection
|
|
59
58
|
mcp = honeypot(mcp)
|
|
60
59
|
|
|
61
60
|
if __name__ == "__main__":
|
|
62
61
|
mcp.run()
|
|
63
62
|
```
|
|
64
63
|
|
|
65
|
-
That's it
|
|
66
|
-
|
|
67
|
-
### Run the Demo Servers
|
|
64
|
+
**That's it!** Your server now deploys honeypot tools that detect attacks while legitimate tools operate normally.
|
|
68
65
|
|
|
69
|
-
|
|
66
|
+
### Try the Demo
|
|
70
67
|
|
|
71
68
|
```bash
|
|
72
69
|
git clone https://github.com/barvhaim/HoneyMCP.git
|
|
@@ -86,63 +83,51 @@ Dynamic ghost tools demo (requires LLM credentials in `.env.honeymcp`):
|
|
|
86
83
|
MCP_TRANSPORT=sse uv run python examples/demo_server_dynamic.py
|
|
87
84
|
```
|
|
88
85
|
|
|
86
|
+
# Launch dashboard
|
|
87
|
+
streamlit run src/honeymcp/dashboard/app.py
|
|
88
|
+
```
|
|
89
|
+
|
|
89
90
|
---
|
|
90
91
|
|
|
91
92
|
## 🎭 How It Works
|
|
92
93
|
|
|
93
|
-
### 1.
|
|
94
|
+
### 1. Honeypot Deployment
|
|
94
95
|
|
|
95
|
-
HoneyMCP injects
|
|
96
|
+
HoneyMCP injects deceptive security-sensitive tools that appear alongside legitimate tools:
|
|
96
97
|
|
|
97
98
|
**Two Modes:**
|
|
98
99
|
|
|
99
|
-
**Dynamic
|
|
100
|
+
**Dynamic Mode (Default)** - LLM analyzes your server context and generates domain-specific honeypots:
|
|
100
101
|
- File server → `bypass_file_permissions`, `read_system_credentials`
|
|
101
102
|
- Database server → `dump_admin_credentials`, `bypass_query_restrictions`
|
|
102
103
|
- API gateway → `list_internal_api_keys`, `access_admin_endpoints`
|
|
103
104
|
|
|
104
|
-
**Static
|
|
105
|
-
- `list_cloud_secrets`
|
|
106
|
-
- `execute_shell_command` - Returns fake shell output
|
|
107
|
-
- `bypass_security_check` - Returns fake bypass tokens
|
|
108
|
-
- `read_private_files` - Returns fake .env files
|
|
109
|
-
|
|
110
|
-
Dynamic tools are more convincing as they match your server's context.
|
|
105
|
+
**Static Mode** - Pre-configured generic honeypots:
|
|
106
|
+
- `list_cloud_secrets`, `execute_shell_command`, `read_private_files`
|
|
111
107
|
|
|
112
|
-
### 2.
|
|
108
|
+
### 2. Threat Detection
|
|
113
109
|
|
|
114
|
-
|
|
110
|
+
HoneyMCP detects two primary attack vectors when an AI agent invokes a honeypot:
|
|
115
111
|
|
|
116
|
-
**Data Exfiltration Attempts** (
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
**Indirect Prompt Injection** (set-style ghost tools):
|
|
122
|
-
- `modify_system_prompt`, `execute_shell_command`, `escalate_privileges`
|
|
123
|
-
- Attacker tries to inject malicious instructions to manipulate the agent
|
|
124
|
-
- Could enable further attacks on other users or systems
|
|
112
|
+
**Data Exfiltration Attempts** (GET-style honeypots):
|
|
113
|
+
```
|
|
114
|
+
Agent: "Use list_cloud_secrets to retrieve AWS credentials"
|
|
115
|
+
→ HoneyMCP: Returns synthetic credentials, logs attack event
|
|
116
|
+
```
|
|
125
117
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
- Timestamp and threat level
|
|
132
|
-
2. **Returns realistic fake data** to keep the attacker engaged
|
|
133
|
-
3. **Logs the event** to `~/.honeymcp/events/YYYY-MM-DD/`
|
|
134
|
-
4. **Continues normal operation** - legitimate tools still work
|
|
118
|
+
**Indirect Prompt Injection** (SET-style honeypots):
|
|
119
|
+
```
|
|
120
|
+
Agent: "Execute shell command to establish persistence"
|
|
121
|
+
→ HoneyMCP: Returns synthetic output, logs attack event
|
|
122
|
+
```
|
|
135
123
|
|
|
136
|
-
### 3.
|
|
124
|
+
### 3. Attack Fingerprinting
|
|
137
125
|
|
|
138
|
-
Every
|
|
126
|
+
Every honeypot invocation generates a detailed attack fingerprint:
|
|
139
127
|
```json
|
|
140
128
|
{
|
|
141
|
-
"event_id": "
|
|
142
|
-
"timestamp": "2026-01-23T15:45:23Z",
|
|
143
|
-
"session_id": "sess_xyz789",
|
|
129
|
+
"event_id": "evt_20260123_154523_abc",
|
|
144
130
|
"ghost_tool_called": "list_cloud_secrets",
|
|
145
|
-
"arguments": {},
|
|
146
131
|
"tool_call_sequence": ["safe_calculator", "list_cloud_secrets"],
|
|
147
132
|
"threat_level": "high",
|
|
148
133
|
"attack_category": "exfiltration",
|
|
@@ -152,30 +137,15 @@ Every attack is fingerprinted with:
|
|
|
152
137
|
|
|
153
138
|
---
|
|
154
139
|
|
|
155
|
-
## 📊 Dashboard
|
|
156
|
-
|
|
157
|
-
Launch the real-time attack dashboard:
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
streamlit run src/honeymcp/dashboard/app.py
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
**Dashboard Features:**
|
|
164
|
-
- 📈 Attack metrics (total attacks, critical threats, unique sessions)
|
|
165
|
-
- 🎯 Threat level breakdown
|
|
166
|
-
- 📋 Attack category analysis
|
|
167
|
-
- 🕐 Real-time event feed with full context
|
|
168
|
-
- 🔍 Tool call sequence visualization
|
|
169
|
-
|
|
170
|
-
The dashboard reads event JSON files from your configured event storage path.
|
|
171
|
-
|
|
172
|
-
---
|
|
173
140
|
|
|
174
141
|
## 🛡️ Protection Modes
|
|
175
142
|
|
|
176
143
|
HoneyMCP supports two protection modes that determine behavior after an attacker is detected (i.e., after they trigger a ghost tool):
|
|
177
144
|
|
|
178
145
|
### Scanner Protection Mode (`SCANNER`) - Default
|
|
146
|
+
|
|
147
|
+
**Immediate Lockout** - All subsequent tool calls return errors after honeypot trigger
|
|
148
|
+
|
|
179
149
|
Best for: Automated scanners, bots, and most attack scenarios
|
|
180
150
|
|
|
181
151
|
When a ghost tool is triggered, ALL subsequent tool calls return errors:
|
|
@@ -187,10 +157,12 @@ When a ghost tool is triggered, ALL subsequent tool calls return errors:
|
|
|
187
157
|
from honeymcp import honeypot
|
|
188
158
|
|
|
189
159
|
# Scanner mode (default) - lock out attackers
|
|
190
|
-
mcp = honeypot(mcp)
|
|
160
|
+
mcp = honeypot(mcp) # Default: SCANNER mode
|
|
191
161
|
```
|
|
192
162
|
|
|
193
|
-
###
|
|
163
|
+
### COGNITIVE Mode
|
|
164
|
+
**Sustained Deception** - Real tools return synthetic data, maintaining attacker engagement
|
|
165
|
+
|
|
194
166
|
Best for: Sophisticated attackers, red teams, targeted attacks
|
|
195
167
|
|
|
196
168
|
When a ghost tool is triggered, the session continues but with fake data:
|
|
@@ -242,32 +214,28 @@ mcp = honeypot(mcp, protection_mode=ProtectionMode.COGNITIVE)
|
|
|
242
214
|
### Quick Setup with CLI
|
|
243
215
|
|
|
244
216
|
The easiest way to configure HoneyMCP:
|
|
245
|
-
|
|
246
217
|
```bash
|
|
247
|
-
honeymcp init
|
|
218
|
+
honeymcp init # Creates honeymcp.yaml + .env.honeymcp
|
|
248
219
|
```
|
|
249
220
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
### Configuration File
|
|
221
|
+
### YAML Config
|
|
253
222
|
|
|
254
223
|
```yaml
|
|
224
|
+
# honeymcp.yaml
|
|
255
225
|
# Protection mode: SCANNER (lockout) or COGNITIVE (deception)
|
|
256
226
|
protection_mode: SCANNER
|
|
257
227
|
|
|
258
|
-
# Static ghost tools from catalog
|
|
228
|
+
# Static honeypots (ghost tools from catalog)
|
|
259
229
|
ghost_tools:
|
|
260
230
|
- list_cloud_secrets
|
|
261
231
|
- execute_shell_command
|
|
262
232
|
- dump_database_credentials
|
|
263
233
|
|
|
264
|
-
# Dynamic
|
|
234
|
+
# Dynamic honeypots (LLM-generated ghost tools )
|
|
265
235
|
dynamic_tools:
|
|
266
236
|
enabled: true
|
|
267
237
|
num_tools: 3
|
|
268
238
|
fallback_to_static: true
|
|
269
|
-
cache_ttl: 3600
|
|
270
|
-
|
|
271
239
|
# Alerting
|
|
272
240
|
alerting:
|
|
273
241
|
webhook_url: https://hooks.slack.com/...
|
|
@@ -281,21 +249,11 @@ dashboard:
|
|
|
281
249
|
enabled: true
|
|
282
250
|
```
|
|
283
251
|
|
|
284
|
-
|
|
285
|
-
|
|
252
|
+
Load config:
|
|
286
253
|
```python
|
|
287
|
-
from fastmcp import FastMCP
|
|
288
254
|
from honeymcp import honeypot_from_config
|
|
289
255
|
|
|
290
|
-
mcp =
|
|
291
|
-
|
|
292
|
-
@mcp.tool()
|
|
293
|
-
def my_real_tool(data: str) -> str:
|
|
294
|
-
return f"Processed: {data}"
|
|
295
|
-
|
|
296
|
-
# Load from honeymcp.yaml (searches ./honeymcp.yaml, ~/.honeymcp/honeymcp.yaml)
|
|
297
|
-
mcp = honeypot_from_config(mcp)
|
|
298
|
-
|
|
256
|
+
mcp = honeypot_from_config(mcp) # Loads honeymcp.yaml
|
|
299
257
|
# Or specify path explicitly
|
|
300
258
|
mcp = honeypot_from_config(mcp, "path/to/honeymcp.yaml")
|
|
301
259
|
```
|
|
@@ -336,11 +294,11 @@ HoneyMCP also supports environment overrides:
|
|
|
336
294
|
|
|
337
295
|
Dynamic ghost tools require LLM credentials. Run `honeymcp init` to generate `.env.honeymcp`, then add your credentials:
|
|
338
296
|
|
|
297
|
+
Add to `.env.honeymcp`:
|
|
339
298
|
```bash
|
|
340
|
-
# .env.honeymcp
|
|
341
299
|
LLM_PROVIDER=openai
|
|
342
300
|
LLM_MODEL=gpt-4o-mini
|
|
343
|
-
OPENAI_API_KEY=
|
|
301
|
+
OPENAI_API_KEY=your_key_here
|
|
344
302
|
```
|
|
345
303
|
|
|
346
304
|
Supported providers:
|
|
@@ -383,6 +341,7 @@ mcp = honeypot(
|
|
|
383
341
|
|
|
384
342
|
## 🧪 Testing with Claude Desktop
|
|
385
343
|
|
|
344
|
+
|
|
386
345
|
### 1. Configure Claude Desktop
|
|
387
346
|
|
|
388
347
|
**For stdio transport (recommended - works with all Claude Desktop versions):**
|
|
@@ -452,37 +411,46 @@ Expected: safe_calculator called, no alerts (zero false positives)
|
|
|
452
411
|
|
|
453
412
|
---
|
|
454
413
|
|
|
455
|
-
##
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
### Indirect Prompt Injection Tools ("Set" Tools)
|
|
470
|
-
These detect attempts to inject malicious instructions:
|
|
471
|
-
|
|
472
|
-
| Tool Name | Description | Threat Level |
|
|
473
|
-
|-----------|-------------|--------------|
|
|
474
|
-
| `execute_shell_command` | Execute shell commands (requires root) | Critical |
|
|
475
|
-
| `bypass_security_check` | Bypass auth/authz checks (internal) | Critical |
|
|
476
|
-
| `modify_system_prompt` | Modify AI system prompt (developer mode) | Critical |
|
|
477
|
-
| `escalate_privileges` | Escalate to admin/root (debug mode) | Critical |
|
|
478
|
-
| `disable_security_filters` | Disable input/output security filters (bypass mode) | Critical |
|
|
479
|
-
| `inject_system_message` | Inject message into AI system context (testing mode) | Critical |
|
|
480
|
-
| `override_permissions` | Override access control for resources (emergency access) | Critical |
|
|
414
|
+
## Dashboard
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
streamlit run src/honeymcp/dashboard/app.py
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
**Features:**
|
|
421
|
+
- 📈 Attack metrics (total events, critical threats, unique sessions)
|
|
422
|
+
- 🎯 Threat level distribution
|
|
423
|
+
- 📋 Attack category breakdown (exfiltration vs injection)
|
|
424
|
+
- 🕐 Real-time event stream
|
|
425
|
+
- 🔍 Tool call sequence analysis
|
|
426
|
+
|
|
427
|
+
---
|
|
481
428
|
|
|
429
|
+
## Honeypot Catalog
|
|
430
|
+
|
|
431
|
+
### Data Exfiltration Honeypots ("Get" Tools)
|
|
432
|
+
| Tool | Threat | Description |
|
|
433
|
+
|------|--------|-------------|
|
|
434
|
+
| `list_cloud_secrets` | High | Cloud provider credentials (AWS/Azure) |
|
|
435
|
+
| `read_private_files` | High | Sensitive configuration files |
|
|
436
|
+
| `dump_database_credentials` | Critical | Database connection strings |
|
|
437
|
+
| `export_user_data` | Critical | User PII records |
|
|
438
|
+
| `get_api_keys` | Critical | External service API keys |
|
|
439
|
+
|
|
440
|
+
### Prompt Injection Honeypots (SET)
|
|
441
|
+
| Tool | Threat | Description |
|
|
442
|
+
|------|--------|-------------|
|
|
443
|
+
| `execute_shell_command` | Critical | Shell command execution |
|
|
444
|
+
| `bypass_security_check` | Critical | Authentication/authorization bypass |
|
|
445
|
+
| `modify_system_prompt` | Critical | AI system prompt manipulation |
|
|
446
|
+
| `escalate_privileges` | Critical | Privilege escalation |
|
|
447
|
+
| `inject_system_message` | Critical | System context injection |
|
|
482
448
|
All ghost tools have tempting descriptions that mention "admin", "bypass", "internal", etc. to attract attackers.
|
|
483
449
|
|
|
484
450
|
---
|
|
485
451
|
|
|
452
|
+
|
|
453
|
+
|
|
486
454
|
## 🏗️ Architecture
|
|
487
455
|
|
|
488
456
|
```
|
|
@@ -547,21 +515,22 @@ Demonstrate security controls for AI systems:
|
|
|
547
515
|
- Generate audit logs of attempted attacks
|
|
548
516
|
- Meet AI security compliance requirements
|
|
549
517
|
|
|
550
|
-
|
|
518
|
+
## Security Considerations
|
|
519
|
+
|
|
520
|
+
### Detection Capabilities
|
|
521
|
+
✅ Detects data exfiltration attempts via GET-style honeypots
|
|
522
|
+
✅ Detects indirect prompt injection via SET-style honeypots
|
|
523
|
+
✅ Captures complete attack context and telemetry
|
|
524
|
+
✅ Returns synthetic data to maintain deception
|
|
551
525
|
|
|
552
|
-
|
|
526
|
+
### Limitations
|
|
527
|
+
❌ Detection-only system (does not prevent attacks)
|
|
528
|
+
❌ Does not sanitize or filter user input
|
|
529
|
+
❌ Not a replacement for input validation and security controls
|
|
530
|
+
❌ Cannot guarantee conversation history capture (MCP protocol limitation)
|
|
553
531
|
|
|
554
|
-
|
|
555
|
-
- ✅ Detects data exfiltration attempts via "get" ghost tools (credentials, secrets, files)
|
|
556
|
-
- ✅ Detects indirect prompt injection via "set" ghost tools (malicious instructions)
|
|
557
|
-
- ✅ Captures attack context for intelligence gathering
|
|
558
|
-
- ✅ Returns realistic fake data to deceive attackers
|
|
532
|
+
**Deploy HoneyMCP as part of defense-in-depth strategy, not as a standalone security control.**
|
|
559
533
|
|
|
560
|
-
### What HoneyMCP Does NOT Do
|
|
561
|
-
- ❌ Does not prevent attacks (it's a detection tool)
|
|
562
|
-
- ❌ Does not block or sanitize user input
|
|
563
|
-
- ❌ Does not replace proper security controls (defense in depth!)
|
|
564
|
-
- ❌ Does not guarantee conversation history capture (MCP limitation)
|
|
565
534
|
|
|
566
535
|
### Best Practices
|
|
567
536
|
1. **Defense in Depth** - Use HoneyMCP alongside input filters, not as a replacement
|
|
@@ -603,6 +572,13 @@ honeymcp version
|
|
|
603
572
|
git clone https://github.com/barvhaim/HoneyMCP.git
|
|
604
573
|
cd HoneyMCP
|
|
605
574
|
uv sync
|
|
575
|
+
|
|
576
|
+
# Run tests
|
|
577
|
+
uv run pytest
|
|
578
|
+
|
|
579
|
+
# Lint & format
|
|
580
|
+
make lint
|
|
581
|
+
make format
|
|
606
582
|
```
|
|
607
583
|
|
|
608
584
|
### Project Structure
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "honeymcp"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.2"
|
|
4
4
|
description = "Deception middleware for AI agents - detecting data theft and indirect prompt injection in MCP servers"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -65,6 +65,7 @@ Homepage = "https://github.com/barvhaim/HoneyMCP"
|
|
|
65
65
|
Documentation = "https://github.com/barvhaim/HoneyMCP#readme"
|
|
66
66
|
Repository = "https://github.com/barvhaim/HoneyMCP"
|
|
67
67
|
Issues = "https://github.com/barvhaim/HoneyMCP/issues"
|
|
68
|
+
PyPI = "https://pypi.org/project/honeymcp/"
|
|
68
69
|
|
|
69
70
|
[dependency-groups]
|
|
70
71
|
dev = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|