implementing-honeytokens-for-breach-detection
Deploys canary tokens and honeytokens (fake AWS credentials, DNS canaries,
它会碰到什么
扫了多少4 个文本文件,22 KB
它会碰到什么读凭据联网写文件
命中总数20 处
命中统计严重 5 · 高 2 · 中 6 · 低 3
逐条看命中(7 条严重或高危)
- 严重
references/api-reference.md:26cred-paths| AWS keys | `~/.aws/credentials` | Key used in API call |
- 严重
scripts/agent.py:134cred-paths{"type": "aws_credentials", "location": "/opt/backup/.aws/credentials", - 严重
scripts/agent.py:142cred-paths{"type": "dns", "location": "/root/.ssh/config", - 严重
SKILL.md:70cred-paths1. AWS credential files (~/.aws/credentials) with canary keys
- 严重
SKILL.md:81cred-pathswith open("/opt/backup/.aws/credentials", "w") as f: - 高
scripts/agent.py:169cred-envreadparser.add_argument("--email", default=os.getenv("CANARY_EMAIL", "soc@company.com")) - 高
scripts/agent.py:170cred-envreadparser.add_argument("--webhook", default=os.getenv("CANARY_WEBHOOK"))
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
Implementing Honeytokens for Breach Detection
When to Use
- When deploying or configuring implementing honeytokens for breach detection capabilities in your environment
- When establishing security controls aligned to compliance requirements
- When building or improving security architecture for this domain
- When conducting security assessments that require this implementation
Prerequisites
- Familiarity with security operations concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities
Instructions
Deploy honeytokens across critical systems to detect unauthorized access. Each token
type alerts via webhook when triggered by an attacker.
import requests
# Create a DNS canary token via Canarytokens
resp = requests.post("https://canarytokens.org/generate", data={
"type": "dns",
"email": "soc@company.com",
"memo": "Production DB server honeytoken",
})
token = resp.json()
print(f"DNS token: {token['hostname']}")
Token types to deploy:
- AWS credential files (~/.aws/credentials) with canary keys
- DNS tokens embedded in configuration files
- Document beacons (Word/PDF) in sensitive file shares
- Database honeytoken records in user tables
- Web bugs in internal wiki/documentation pages
Examples
# Generate a fake AWS credentials file with canary token
aws_creds = f"[default]\naws_access_key_id = {canary_key_id}\naws_secret_access_key = {canary_secret}\n"
with open("/opt/backup/.aws/credentials", "w") as f:
f.write(aws_creds)想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。
它属于哪个仓库
星标★ 32,865
本站分层T1
该仓技能数818
原文件路径
skills/implementing-honeytokens-for-breach-detection/SKILL.md同一个仓库里的其他技能
- abusing-dpapi-for-credential-access
- abusing-shadow-credentials-for-privesc
- achieving-cmmc-level-2-compliance
- acquiring-disk-image-with-dd-and-dcfldd
- analyzing-active-directory-acl-abuse
- analyzing-android-malware-with-apktool
- analyzing-api-gateway-access-logs
- analyzing-apt-group-with-mitre-navigator
- analyzing-azure-activity-logs-for-threats
- analyzing-bootkit-and-rootkit-samples
- analyzing-browser-forensics-with-hindsight
- analyzing-campaign-attribution-evidence