tr4m0ryp/shinyhunters-gotta-catch-em-all
GitHub: tr4m0ryp/shinyhunters-gotta-catch-em-all
基于公开比特币账本的四阶段取证管线,通过 BigQuery 批量过滤、行为画像和多跳前向追踪,完整复现并识别了 ShinyHunters 勒索 AT&T 的赎金支付链路及其洗钱终点。
Stars: 1 | Forks: 0
# ShinyHunters
# 全部捉住 (Gotta Catch 'Em All)
### 针对 ShinyHunters 的公共账本追踪
[](LICENSE)
[](data/)
[](https://go.dev/)
[](https://www.python.org/)
[](FINDINGS.md)
**针对 AT&T 勒索 BTC 支付的公共账本取证(2024 年 5 月)。**
论文 *"Gotta Catch 'Em All: A Public-Ledger Hunt for the ShinyHunters"* 的配套代码、数据集和工作笔记。一个四阶段的比特币链上漏斗——BigQuery 批量过滤、接收方行为画像、发送方分析和多跳前向追踪——将公开搜索范围缩小到一小组可归因的交易,并附带跨受害者和上游枢纽的后续分析。
## 背景
在 2024 年 3 月至 4 月期间,威胁行为者 *ShinyHunters* 利用涉及 7300 万条记录的客户数据库泄露事件敲诈 AT&T。*Wired* 报道称(并经过内部区块链分析验证),AT&T 大约在 **2024-05-17** 以比特币支付了赎金,当时的金额为 **约 5.7 BTC(约 373,646 美元)**。公开报道故意**隐瞒了交易哈希和钱包地址**,以避免干扰正在进行的调查。
本研究的目标是识别与该公开描述最相符的链上交易,通过行为特征缩小搜索范围,并追踪洗钱流程直至其终端交易所存款。
## 方法
该流程实现了一个四阶段的漏斗,将公开的比特币区块链缩减为一小组可归因的交易。
| 阶段 | 来源 | 目的 |
|---|---|---|
| 1. 批量过滤 | BigQuery `bigquery-public-data.crypto_bitcoin` | 在 2024-05-14..19 期间,金额为 5.55-5.85 BTC 的所有输出(约 500 个候选)及结构元数据 |
| 2. 接收方画像 | Blockstream Esplora REST | 每个地址的 `chain_stats` + 支出形态分类 (FRESH / LOW_USE / REUSED / HOTWALLET; PEEL_CHANGE / FAN_OUT / COINJOIN / CONSOLIDATION / SINGLE) |
| 3. 发送方分析 | Esplora 共同输入聚类 | 每个发送方的行为类别 (FRESH_INSTITUTIONAL / OTC_OR_SERVICE / EXCHANGE_HOT) 和一跳回溯资金追踪 |
| 4. 多跳前向追踪 | Esplora | 最多 12 跳的前向遍历;在遇到 CEX / CoinJoin / HODL / 尘埃交易 / 最大深度时终止 |
行为特征在 [`FINDINGS.md`](FINDINGS.md) 和论文中有详细描述。终端地址与 OKLink 和 bitinfocharts 标签源进行了交叉核对,并根据 OFAC SDN 列表进行了验证。
## 首要候选
在所有五个特征(日期、接收方新鲜度、发送方经纪商形态、子小时内支出、到标记交易所的自动剥离链)中行为匹配度最高的是:
| 字段 | 值 |
|---|---|
| TXID | `93f9f1e2437356a9c829512f7275ae216e2ce84e06ebe3096df602b5b65ca84b` |
| 接收方 | `bc1qz88nslmzsp8pswcptlhdwwdmcte6nvdtv2j2xx` |
| 金额 | 5.71997804 BTC |
| 日期 | 2024-05-17 22:04 UTC |
| 接收方画像 | FRESH (生命周期内 2 笔交易,单一用途) |
| 枢纽 | `bc1qejsne4tszk3x4ck9e83rgsux9wgrd8hn7ewswm` (47 分钟内 6 个周期的自动自我剥离) |
| 主要终端 | HitBTC `bc1qdfl3dfnwwvlqa5jpckh0ccwpjczh5y566c4g76` (Deposit_2) |
| 次要终端 | Binance 热钱包 |
行为信号起到**优先排序**的作用,但不能**证明**。最终的归因需要链下确认(传票、泄露、正式的 Chainalysis 报告)或更深度的图谱追踪。
## 仓库布局
```
.
├── FINDINGS.md Working notes -- candidates, eliminations, full trace narrative
├── README.md This file
├── src/ Source code
│ ├── go/ Compiled CLI tools
│ │ ├── att_btc_hunt.go Stage-1 fallback search via Blockchair (no GCP needed)
│ │ ├── att_profile.go Stage-2 recipient behavioral profiler (Esplora)
│ │ ├── att_senders.go Stage-3 sender-side analyzer
│ │ └── att_trace.go Stage-4 multi-hop forward tracer
│ ├── python/
│ │ ├── analysis/ Cross-victim, hub, deposit-audit, subpoena-scope scripts
│ │ └── viz/ Plot generators (trace trees, paper figures, hero diagram)
│ └── sql/
│ └── att_btc_hunt.sql Stage-1 primary search (BigQuery)
├── bin/ Pre-built macOS x86_64 binaries (rebuild yourself for portability)
├── output/ Generated artifacts (every step is reproducible from the chain)
│ ├── json/
│ │ ├── hunt/ att_candidates.json (500 BigQuery candidates)
│ │ ├── profile/ att_profiles.json, att_senders.json
│ │ ├── trace/ att_trace.json
│ │ └── cross_victim/ crossvictim, upstream_hubs, hub_forward, deposit_audit, subpoena_scope
│ ├── reports/ Human-readable text reports per phase
│ ├── traces/ Trace tree DOT files + matplotlib PNGs
│ └── logs/ Captured stderr from long-running runs
├── data/ Curated, publication-ready dataset (CC-BY-4.0, see data/README.md)
│ ├── hunt/ Stage-1 candidate outputs
│ ├── profile/ Stage-2/3 recipient + sender profiles
│ ├── trace/ Stage-4 forward trace + terminal attribution
│ └── cross_victim/ Cross-victim and upstream-hub artifacts
├── paper/ Paper figures and (empty) section/table stubs (gitignored)
└── paper_screenshots/ Page screenshots of the compiled paper (gitignored)
```
## 复现
该流程可以从公开的比特币区块链完全复现。所有中间 JSON 文件都已签入 `output/` 目录下,因此您可以在任何阶段恢复执行。
### 前置条件
- Go 1.21+
- Python 3.10+ 以及 `requests` 和 `matplotlib`
- (阶段 1 主要路径)经过任何启用 BigQuery 的项目认证的 Google Cloud `bq` CLI。`bigquery-public-data.crypto_bitcoin` 数据集在每月 1 TB 的免费额度内免费;此查询扫描大约 1-3 GB。
- (可选)用于更高保真度 DOT 渲染的 Graphviz。
### 构建 Go 工具
```
go build -o bin/att_btc_hunt src/go/att_btc_hunt.go
go build -o bin/att_profile src/go/att_profile.go
go build -o bin/att_senders src/go/att_senders.go
go build -o bin/att_trace src/go/att_trace.go
```
### 运行四个阶段(从仓库根目录)
```
# 阶段 1 -- 批量候选过滤 (BigQuery 为主;Blockchair 备用)
bq query --use_legacy_sql=false --format=prettyjson --max_rows=500 \
< src/sql/att_btc_hunt.sql > output/json/hunt/att_candidates.json
# 或者,不使用 GCP:
./bin/att_btc_hunt -start 2024-05-14 -end 2024-05-19 -min 5.55 -max 5.85
# 阶段 2 -- top-N 候选的收件人行为画像
./bin/att_profile -top 20
# 阶段 3 -- top 候选的发送方分析
./bin/att_senders > output/reports/profile/sender_report.txt
# 阶段 4 -- 前三名候选的多跳转发追踪
./bin/att_trace > output/reports/trace/trace_report.txt
```
### 跨受害者和枢纽分析(Python)
```
python3 src/python/analysis/att_crossvictim.py > output/reports/cross_victim/crossvictim_report.txt
python3 src/python/analysis/att_hubs.py > output/reports/cross_victim/hubs_report.txt
python3 src/python/analysis/att_hub_recency.py > output/reports/cross_victim/hub_recency_report.txt
python3 src/python/analysis/att_hub_forward.py > output/reports/cross_victim/hub_forward_report.txt
python3 src/python/analysis/att_deposit_audit.py > output/reports/cross_victim/deposit_audit_report.txt
python3 src/python/analysis/att_subpoena_scope.py > output/reports/cross_victim/subpoena_scope.txt
```
每个分析脚本从 `output/json/标签:AT&T数据泄露, BTC洗钱分析, Google BigQuery, Go语言, HitBTC, Python, ShinyHunters, TruffleHog, 交易溯源, 公共账本分析, 加密货币追踪, 勒索软件, 区块链取证, 后端开发, 多线程, 威胁追踪, 学术论文, 无后门, 日志审计, 比特币追踪, 程序破解, 网络威胁情报, 网络犯罪调查, 资金流向分析, 逆向工具, 链上数据分析, 黑客组织追踪