---
title: "BloodHound"
weight: 30
description: "AD 关系图分析工具"
date: "2026-03-24T16:29:46+08:00"
lastmod: "2026-03-24T16:29:46+08:00"
---

## BloodHound

BloodHound 是一款 Active Directory 关系图分析工具，用于可视化域内权限关系和攻击路径。

## 基础使用

### 使用 SharpHound 收集数据
```bash
SharpHound.exe -c All -d target.com
```

### 使用 BloodHound.py
```bash
bloodhound-python -d target.com -u user -p pass -c All
```

### 启动 BloodHound
```bash
# 启动 Neo4j 数据库
neo4j start

# 启动 BloodHound
bloodhound
```

### 导入数据
1. 打开 BloodHound Web 界面
2. 点击上传按钮
3. 选择收集的 JSON 文件

## 功能特性

- **关系可视化** - 图形化展示 AD 关系
- **攻击路径** - 自动发现攻击路径
- **权限分析** - 识别过度权限
- **查询语言** - Cypher 查询支持

## 数据收集器

| 收集器 | 描述 |
|--------|------|
| Group | 域组信息 |
| LocalAdmin | 本地管理员权限 |
| RDP | 远程桌面权限 |
| DCOM | DCOM 权限 |
| Container | 容器信息 |
| ACL | 访问控制列表 |
| Trusts | 域信任关系 |
| Session | 用户会话 |
| LoggedOn | 登录用户 |

## 常用查询

```cypher
// 查找域管理员
MATCH (n:User) WHERE n.admincount=true RETURN n

// 查找攻击路径
MATCH p=shortestPath((u:User)-[*1..]->(c:Computer))
WHERE u.name = 'USER@DOMAIN.COM'
RETURN p

// 查找所有域信任
MATCH (n:Domain)-[r:TrustedBy]->(m:Domain)
RETURN n,m
```

## 参考资源

- [BloodHound GitHub](https://github.com/BloodHoundAD/BloodHound)
- [SharpHound GitHub](https://github.com/BloodHoundAD/SharpHound)