You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before BloodHound can display AI credential nodes with proper icons, you need to register AIHound's custom node types. The script also imports 29 pre-built Cypher queries into BloodHound's **Saved Queries** panel. **You only need to do this once per BloodHound instance.**
20
+
Before BloodHound can display AI credential nodes with proper icons, you need to register AIHound's OpenGraph extension schema and import the saved Cypher queries. **You only need to do this once per BloodHound instance.**
21
21
22
22
```bash
23
-
python3 docs/register_ai_nodes.py \
24
-
-s http://localhost:8080 \
25
-
-u admin \
26
-
-p<your-bloodhound-password>
23
+
python3 -m aihound --import-queries \
24
+
--bloodhound-server http://localhost:8080 \
25
+
--bloodhound-user admin \
26
+
--bloodhound-password<your-bloodhound-password>
27
27
```
28
28
29
29
You should see:
30
30
31
31
```
32
-
Authenticated as admin
33
-
Registered 14 custom node kinds:
34
-
key AICredential AI API key, OAuth token, or session credential
35
-
cloud AIService AI platform or service (OpenAI, Anthropic, AWS, etc.)
36
-
plug MCPServer Model Context Protocol server instance
Done! You can now import AIHound OpenGraph JSON files into BloodHound CE.
41
34
```
42
35
43
-
### Registration script options
36
+
This registers 14 custom node kinds with icons/colors via the OpenGraph extension schema (`extension/schema.json`) and imports 29 saved Cypher queries from `extension/queries.json`.
@@ -125,7 +129,7 @@ Click any node to see its properties in the right panel:
125
129
126
130
## Step 5: Run Cypher Queries
127
131
128
-
If you ran `register_ai_nodes.py` in Step 1, all 29 queries below are already in BloodHound's **Saved Queries** panel. Click the **Saved Queries** button in the Cypher tab, search for"AIHound", and click any query to load and run it.
132
+
If you ran `--import-queries` in Step 1, all 29 queries below are already in BloodHound's **Saved Queries** panel. Click the **Saved Queries** button in the Cypher tab, search for"AIHound", and click any query to load and run it.
129
133
130
134
You can also paste queries directly into the **Cypher query bar** (toggle to Cypher mode in the search bar).
131
135
@@ -258,10 +262,12 @@ Then upload the new file to BloodHound CE (Step 3). New nodes/edges will be merg
258
262
The full set of 29 pre-built queries is in:
259
263
260
264
```
261
-
docs/cypher_queries.cy
265
+
extension/queries.json
262
266
```
263
267
264
-
If you ran `register_ai_nodes.py`, these are already imported into BloodHound's **Saved Queries** panel — search "AIHound" to find them. You can also open the file in any text editor and paste queries into BloodHound's Cypher query bar.
268
+
If you ran `--import-queries`, these are already imported into BloodHound's **Saved Queries** panel — search "AIHound" to find them. The queries are also available in `docs/cypher_queries.cy` for manual copy/paste into BloodHound's Cypher query bar.
269
+
270
+
The queries follow the [SpecterOps Query Library format](https://queries.specterops.io) and can be browsed at that site if you host `queries.json` at a public URL.
265
271
266
272
---
267
273
@@ -341,13 +347,12 @@ AIService (Perplexity)
341
347
342
348
| Problem | Solution |
343
349
|---------|----------|
344
-
| Nodes show as generic circles | Run `register_ai_nodes.py` again (Step 1) |
350
+
| Nodes show as generic circles | Run `--import-queries` again (Step 1) to re-register the schema|
345
351
| "No results" on a query | Check spelling — node properties are lowercase |
346
352
| Upload fails | Ensure BloodHound CE is v9.x (OpenGraph support required) |
347
353
| Can't find Cypher input | Look for the "Cypher" tab in the search bar area |
348
354
| Can't find Saved Queries | Click the "Saved Queries" button above the Cypher editor, then search "AIHound" |
349
355
| Graph looks empty | Make sure the scan found credentials: run `python3 -m aihound` first to check |
350
-
| Registration script fails with 401 | Check your BloodHound password or use `--token-id` / `--token-key` instead |
351
-
| Registration fails with 409 | Node kinds already registered — use `--reset` to clear and re-register |
356
+
| Import fails with 401 | Check your BloodHound password or use `--bloodhound-token-id` / `--bloodhound-token-key` instead |
352
357
| Search shows "?" icons for custom nodes | This is a BHCE limitation — custom node icons render correctly in the Cypher graph view but show as `?` in the Search tab dropdown. Use the Cypher tab or Saved Queries instead |
353
358
| "Invalid Node Kind" error in search | Re-run the AIHound scan and re-upload — older exports had colons in node names that conflicted with BHCE's search syntax |
This registers 14 custom node kinds with Font Awesome icons and imports 29 pre-built Cypher queries into BloodHound's **Saved Queries** panel.
416
+
This registers 14 custom node kinds with icons/colors via the OpenGraph extension schema (`extension/schema.json`) and imports 29 saved Cypher queries from `extension/queries.json`. Running it again is safe — it skips existing queries and re-registers the schema.
**3. Upload**`output.json` to BloodHound CE via Quick Upload.
430
435
431
-
**4. Query attack paths** — open the **Saved Queries** panel in the Cypher tab and search "AIHound", or paste from `cypher_queries.cy`:
436
+
**4. Query attack paths** — open the **Saved Queries** panel in the Cypher tab and search "AIHound", or paste queries manually:
432
437
433
438
```cypher
434
439
// Full graph — all AI credential relationships
435
440
MATCH path = (a:AIHound)-[r]->(b:AIHound) RETURN path
436
441
437
442
// Blast radius from critical credentials
438
-
MATCH path = (c:AICredential)-[*1..4]->(target)
443
+
MATCH path = (c:AIHound_AICredential)-[*1..4]->(target)
439
444
WHERE c.risk_level = "critical"
440
445
RETURN path
441
446
442
447
// MCP server attack chain
443
-
MATCH path = (t:AITool)-[:UsesMCPServer]->(m:MCPServer)-[:RequiresCredential]->(c:AICredential)-[:Authenticates]->(s:AIService)
448
+
MATCH path = (t:AIHound_AITool)-[:AIHound_UsesMCPServer]->(m:AIHound_MCPServer)-[:AIHound_RequiresCredential]->(c:AIHound_AICredential)-[:AIHound_Authenticates]->(s:AIHound_AIService)
444
449
RETURN path
445
450
446
451
// Same secret in multiple locations
447
-
MATCH path = (c1:AICredential)-[:SameSecret]->(c2:AICredential)
452
+
MATCH path = (c1:AIHound_AICredential)-[:AIHound_SameSecret]->(c2:AIHound_AICredential)
448
453
RETURN path
449
454
450
455
// What breaks if I rotate this key?
451
-
MATCH path = (t:AITool)-[:UsesMCPServer]->(m:MCPServer)-[:RequiresCredential]->(c:AICredential)
456
+
MATCH path = (t:AIHound_AITool)-[:AIHound_UsesMCPServer]->(m:AIHound_MCPServer)-[:AIHound_RequiresCredential]->(c:AIHound_AICredential)
452
457
WHERE c.credential_type CONTAINS "PERPLEXITY"
453
458
RETURN path
454
459
```
455
460
456
-
See `BLOODHOUND_GUIDE.md` for the full step-by-step walkthrough. All 29 queries from `cypher_queries.cy` are auto-imported into BloodHound's Saved Queries when you run `register_ai_nodes.py`.
461
+
See `BLOODHOUND_GUIDE.md` for the full step-by-step walkthrough. The queries follow the [SpecterOps Query Library format](https://queries.specterops.io) — all 29 are in `extension/queries.json`.
457
462
458
463
---
459
464
@@ -482,6 +487,14 @@ All flags are the same across all three versions:
482
487
|`--min-risk LEVEL`| Minimum risk to emit as watch events (default: `info`) |
483
488
|`--debounce SECONDS`| Suppress duplicate events within window (default: 10) |
484
489
|`--mcp`| Run as MCP stdio server (requires `pip install aihound[mcp]`) |
490
+
|`--import-queries`| Register schema and import saved queries into BloodHound CE, then exit |
491
+
|`--bloodhound-server URL`| BloodHound CE server URL (for `--import-queries`) |
0 commit comments