mcpcap 0.5.5__tar.gz → 0.5.6__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.
Files changed (51) hide show
  1. {mcpcap-0.5.5 → mcpcap-0.5.6}/PKG-INFO +1 -1
  2. {mcpcap-0.5.5 → mcpcap-0.5.6}/docs/source/index.rst +4 -3
  3. {mcpcap-0.5.5 → mcpcap-0.5.6}/docs/source/user-guide/analysis-guides.md +67 -1
  4. {mcpcap-0.5.5 → mcpcap-0.5.6}/docs/source/user-guide/installation.md +1 -1
  5. {mcpcap-0.5.5 → mcpcap-0.5.6}/docs/source/user-guide/quickstart.md +61 -5
  6. {mcpcap-0.5.5 → mcpcap-0.5.6}/src/mcpcap/_version.py +3 -3
  7. {mcpcap-0.5.5 → mcpcap-0.5.6}/src/mcpcap.egg-info/PKG-INFO +1 -1
  8. {mcpcap-0.5.5 → mcpcap-0.5.6}/.github/FUNDING.yml +0 -0
  9. {mcpcap-0.5.5 → mcpcap-0.5.6}/.github/workflows/release.yml +0 -0
  10. {mcpcap-0.5.5 → mcpcap-0.5.6}/.github/workflows/test.yml +0 -0
  11. {mcpcap-0.5.5 → mcpcap-0.5.6}/.gitignore +0 -0
  12. {mcpcap-0.5.5 → mcpcap-0.5.6}/.readthedocs.yaml +0 -0
  13. {mcpcap-0.5.5 → mcpcap-0.5.6}/CONTRIBUTING.md +0 -0
  14. {mcpcap-0.5.5 → mcpcap-0.5.6}/LICENSE +0 -0
  15. {mcpcap-0.5.5 → mcpcap-0.5.6}/README.md +0 -0
  16. {mcpcap-0.5.5 → mcpcap-0.5.6}/docs/Makefile +0 -0
  17. {mcpcap-0.5.5 → mcpcap-0.5.6}/docs/source/_static/.gitkeep +0 -0
  18. {mcpcap-0.5.5 → mcpcap-0.5.6}/docs/source/api/cli.rst +0 -0
  19. {mcpcap-0.5.5 → mcpcap-0.5.6}/docs/source/api/core.rst +0 -0
  20. {mcpcap-0.5.5 → mcpcap-0.5.6}/docs/source/api/modules.rst +0 -0
  21. {mcpcap-0.5.5 → mcpcap-0.5.6}/docs/source/conf.py +0 -0
  22. {mcpcap-0.5.5 → mcpcap-0.5.6}/docs/source/developer/contributing.md +0 -0
  23. {mcpcap-0.5.5 → mcpcap-0.5.6}/docs/source/developer/module-creation-tutorial.md +0 -0
  24. {mcpcap-0.5.5 → mcpcap-0.5.6}/docs/source/user-guide/mcp-integration.md +0 -0
  25. {mcpcap-0.5.5 → mcpcap-0.5.6}/examples/README.md +0 -0
  26. {mcpcap-0.5.5 → mcpcap-0.5.6}/examples/dhcp.pcap +0 -0
  27. {mcpcap-0.5.5 → mcpcap-0.5.6}/examples/dns.pcap +0 -0
  28. {mcpcap-0.5.5 → mcpcap-0.5.6}/pyproject.toml +0 -0
  29. {mcpcap-0.5.5 → mcpcap-0.5.6}/readme-assets/mcpcap-logo.png +0 -0
  30. {mcpcap-0.5.5 → mcpcap-0.5.6}/server.json +0 -0
  31. {mcpcap-0.5.5 → mcpcap-0.5.6}/setup.cfg +0 -0
  32. {mcpcap-0.5.5 → mcpcap-0.5.6}/src/mcpcap/__init__.py +0 -0
  33. {mcpcap-0.5.5 → mcpcap-0.5.6}/src/mcpcap/cli.py +0 -0
  34. {mcpcap-0.5.5 → mcpcap-0.5.6}/src/mcpcap/core/__init__.py +0 -0
  35. {mcpcap-0.5.5 → mcpcap-0.5.6}/src/mcpcap/core/config.py +0 -0
  36. {mcpcap-0.5.5 → mcpcap-0.5.6}/src/mcpcap/core/server.py +0 -0
  37. {mcpcap-0.5.5 → mcpcap-0.5.6}/src/mcpcap/modules/__init__.py +0 -0
  38. {mcpcap-0.5.5 → mcpcap-0.5.6}/src/mcpcap/modules/base.py +0 -0
  39. {mcpcap-0.5.5 → mcpcap-0.5.6}/src/mcpcap/modules/dhcp.py +0 -0
  40. {mcpcap-0.5.5 → mcpcap-0.5.6}/src/mcpcap/modules/dns.py +0 -0
  41. {mcpcap-0.5.5 → mcpcap-0.5.6}/src/mcpcap/modules/icmp.py +0 -0
  42. {mcpcap-0.5.5 → mcpcap-0.5.6}/src/mcpcap.egg-info/SOURCES.txt +0 -0
  43. {mcpcap-0.5.5 → mcpcap-0.5.6}/src/mcpcap.egg-info/dependency_links.txt +0 -0
  44. {mcpcap-0.5.5 → mcpcap-0.5.6}/src/mcpcap.egg-info/entry_points.txt +0 -0
  45. {mcpcap-0.5.5 → mcpcap-0.5.6}/src/mcpcap.egg-info/requires.txt +0 -0
  46. {mcpcap-0.5.5 → mcpcap-0.5.6}/src/mcpcap.egg-info/top_level.txt +0 -0
  47. {mcpcap-0.5.5 → mcpcap-0.5.6}/tests/__init__.py +0 -0
  48. {mcpcap-0.5.5 → mcpcap-0.5.6}/tests/test_cli.py +0 -0
  49. {mcpcap-0.5.5 → mcpcap-0.5.6}/tests/test_dhcp.py +0 -0
  50. {mcpcap-0.5.5 → mcpcap-0.5.6}/tests/test_dns.py +0 -0
  51. {mcpcap-0.5.5 → mcpcap-0.5.6}/tests/test_modules/test_icmp.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcpcap
3
- Version: 0.5.5
3
+ Version: 0.5.6
4
4
  Summary: A modular Python MCP Server for analyzing PCAP files
5
5
  Author: mcpcap contributors
6
6
  License: MIT License
@@ -9,8 +9,8 @@ mcpcap Documentation
9
9
  :target: https://pypi.org/project/mcpcap/
10
10
  :alt: Python versions
11
11
 
12
- .. image:: https://github.com/danohn/mcpcap/workflows/Test/badge.svg
13
- :target: https://github.com/danohn/mcpcap/actions
12
+ .. image:: https://github.com/mcpcap/mcpcap/workflows/Test/badge.svg
13
+ :target: https://github.com/mcpcap/mcpcap/actions
14
14
  :alt: Test status
15
15
 
16
16
  A modular Python MCP (Model Context Protocol) Server for analyzing PCAP files. mcpcap provides stateless analysis tools that accept local files or remote URLs as parameters, making it perfect for Claude Desktop and other MCP client integration.
@@ -20,7 +20,7 @@ Features
20
20
 
21
21
  ✅ **Stateless MCP Tools**: Each analysis tool accepts PCAP file paths or URLs as parameters
22
22
 
23
- ✅ **Protocol Support**: DNS and DHCP analysis with easy extensibility for new protocols
23
+ ✅ **Protocol Support**: DNS, DHCP, and ICMP analysis with easy extensibility for new protocols
24
24
 
25
25
  ✅ **Local & Remote Files**: Analyze files from local storage or HTTP URLs
26
26
 
@@ -51,6 +51,7 @@ Then use analysis tools with any PCAP file:
51
51
 
52
52
  analyze_dns_packets("/path/to/dns.pcap")
53
53
  analyze_dhcp_packets("https://example.com/dhcp.pcap")
54
+ analyze_icmp_packets("/path/to/network.pcap")
54
55
 
55
56
  .. toctree::
56
57
  :maxdepth: 2
@@ -281,4 +281,70 @@ Look for domains with these characteristics:
281
281
  - Include both technical details and executive summaries
282
282
  - Provide actionable recommendations
283
283
  - Document confidence levels in findings
284
- - Maintain professional presentation standards
284
+ - Maintain professional presentation standards
285
+
286
+ ## DHCP Analysis Fundamentals
287
+
288
+ ### Understanding DHCP Packet Structure
289
+
290
+ DHCP packets contain several key components:
291
+
292
+ - **Header**: Message type, transaction ID, flags
293
+ - **Client/Server Addresses**: IP address assignments
294
+ - **Options**: Network configuration parameters
295
+ - **Message Types**: DISCOVER, OFFER, REQUEST, ACK, NAK, RELEASE
296
+
297
+ ### Key Metrics to Monitor
298
+
299
+ **DHCP Transaction Flow**
300
+ - Normal: Complete 4-way handshake (DISCOVER→OFFER→REQUEST→ACK)
301
+ - Problem: Incomplete transactions or excessive retries
302
+ - Security: Unexpected message types or timing
303
+
304
+ **IP Address Management**
305
+ - Normal: Organized lease allocation and renewal
306
+ - Problem: Address pool exhaustion or conflicts
307
+ - Security: Unauthorized DHCP servers or spoofing
308
+
309
+ ### Security Indicators
310
+
311
+ **Rogue DHCP Servers**
312
+ - Multiple DHCP servers responding
313
+ - Unexpected server IP addresses
314
+ - Suspicious network configuration options
315
+
316
+ **DHCP Attacks**
317
+ - DHCP starvation (excessive DISCOVER requests)
318
+ - Malicious DHCP options (DNS poisoning)
319
+ - MAC address spoofing patterns
320
+
321
+ ## ICMP Analysis Fundamentals
322
+
323
+ ### Understanding ICMP Packet Structure
324
+
325
+ ICMP packets provide network diagnostics:
326
+
327
+ - **Type/Code**: Message type and sub-type
328
+ - **Echo Request/Reply**: Ping functionality
329
+ - **Error Messages**: Network unreachable, TTL exceeded
330
+ - **Timestamp**: Round-trip time analysis
331
+
332
+ ### Key Metrics to Monitor
333
+
334
+ **Ping Analysis**
335
+ - Normal: Regular echo request/reply pairs
336
+ - Problem: High packet loss or excessive latency
337
+ - Security: ICMP tunneling or covert channels
338
+
339
+ **Network Diagnostics**
340
+ - Normal: Occasional error messages
341
+ - Problem: Excessive unreachable messages
342
+ - Security: Network reconnaissance patterns
343
+
344
+ ### Security Indicators
345
+
346
+ **ICMP-based Attacks**
347
+ - ICMP flood attacks
348
+ - ICMP tunneling for data exfiltration
349
+ - Network reconnaissance and scanning
350
+ - Covert channel communication
@@ -34,7 +34,7 @@ If you want to contribute to mcpcap or modify it:
34
34
 
35
35
  ```bash
36
36
  # Clone the repository
37
- git clone https://github.com/danohn/mcpcap.git
37
+ git clone https://github.com/mcpcap/mcpcap.git
38
38
  cd mcpcap
39
39
 
40
40
  # Install in development mode with all dependencies
@@ -13,7 +13,7 @@ pip install mcpcap
13
13
  Start mcpcap as a stateless MCP server:
14
14
 
15
15
  ```bash
16
- # Start with both DNS and DHCP modules (default)
16
+ # Start with all modules (default: dns,dhcp,icmp)
17
17
  mcpcap
18
18
 
19
19
  # Start with specific modules only
@@ -121,6 +121,35 @@ analyze_dhcp_packets("https://example.com/network-capture.pcap")
121
121
  }
122
122
  ```
123
123
 
124
+ ### ICMP Analysis
125
+
126
+ Use the `analyze_icmp_packets` tool with any PCAP file containing ICMP traffic:
127
+
128
+ ```javascript
129
+ analyze_icmp_packets("/path/to/network.pcap")
130
+ analyze_icmp_packets("https://example.com/ping-capture.pcap")
131
+ ```
132
+
133
+ **Example response:**
134
+ ```json
135
+ {
136
+ "file": "/path/to/network.pcap",
137
+ "total_packets": 100,
138
+ "icmp_packets_found": 12,
139
+ "icmp_packets_analyzed": 12,
140
+ "statistics": {
141
+ "icmp_type_counts": {
142
+ "Echo Request": 6,
143
+ "Echo Reply": 6
144
+ },
145
+ "unique_sources_count": 2,
146
+ "unique_destinations_count": 2,
147
+ "echo_sessions": 1
148
+ },
149
+ "packets": ["...detailed ICMP analysis..."]
150
+ }
151
+ ```
152
+
124
153
  ## 5. Use Analysis Prompts
125
154
 
126
155
  mcpcap includes specialized prompts to guide your analysis:
@@ -165,16 +194,37 @@ mcpcap includes specialized prompts to guide your analysis:
165
194
  - Evidence collection
166
195
  - Incident reconstruction
167
196
 
197
+ ### ICMP Analysis Prompts
198
+
199
+ - **`icmp_network_diagnostics`** - Network troubleshooting:
200
+ - Ping connectivity analysis
201
+ - Network path tracing
202
+ - RTT and latency analysis
203
+ - Packet loss detection
204
+
205
+ - **`icmp_security_analysis`** - Security threats:
206
+ - ICMP-based attacks (floods, tunneling)
207
+ - Reconnaissance activity detection
208
+ - Covert channel communication
209
+ - Network scanning patterns
210
+
211
+ - **`icmp_forensic_investigation`** - Forensic analysis:
212
+ - Network activity timeline
213
+ - Host communication patterns
214
+ - Evidence preservation
215
+ - Attack vector analysis
216
+
168
217
  ## 6. Example Workflow
169
218
 
170
219
  Here's a typical analysis workflow:
171
220
 
172
221
  1. **Start the server**: `mcpcap`
173
222
  2. **Analyze DNS traffic**: `analyze_dns_packets("/path/to/capture.pcap")`
174
- 3. **Review results**: Look for unusual domains or query patterns
223
+ 3. **Review results**: Look for unusual domains or query patterns
175
224
  4. **Use specialized prompts**: Apply security_analysis for threat detection
176
225
  5. **Analyze DHCP traffic**: `analyze_dhcp_packets("/path/to/capture.pcap")`
177
- 6. **Cross-reference findings**: Correlate DNS and DHCP data for complete picture
226
+ 6. **Analyze ICMP traffic**: `analyze_icmp_packets("/path/to/capture.pcap")`
227
+ 7. **Cross-reference findings**: Correlate DNS, DHCP, and ICMP data for complete network picture
178
228
 
179
229
  ## 7. Configuration Options
180
230
 
@@ -187,8 +237,11 @@ mcpcap --modules dns
187
237
  # DHCP analysis only
188
238
  mcpcap --modules dhcp
189
239
 
190
- # Both modules (default)
191
- mcpcap --modules dns,dhcp
240
+ # All modules (default)
241
+ mcpcap --modules dns,dhcp,icmp
242
+
243
+ # Or specific combinations
244
+ mcpcap --modules dns,icmp
192
245
  ```
193
246
 
194
247
  ### Performance Tuning
@@ -211,6 +264,9 @@ analyze_dns_packets("./examples/dns.pcap")
211
264
 
212
265
  // Test DHCP analysis
213
266
  analyze_dhcp_packets("./examples/dhcp.pcap")
267
+
268
+ // Test ICMP analysis
269
+ analyze_icmp_packets("./examples/icmp.pcap")
214
270
  ```
215
271
 
216
272
  ## Next Steps
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.5.5'
32
- __version_tuple__ = version_tuple = (0, 5, 5)
31
+ __version__ = version = '0.5.6'
32
+ __version_tuple__ = version_tuple = (0, 5, 6)
33
33
 
34
- __commit_id__ = commit_id = 'g776b9d2d9'
34
+ __commit_id__ = commit_id = 'gff58bfaa5'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcpcap
3
- Version: 0.5.5
3
+ Version: 0.5.6
4
4
  Summary: A modular Python MCP Server for analyzing PCAP files
5
5
  Author: mcpcap contributors
6
6
  License: MIT License
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