brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
implementing-honeytokens-for-breach-detection部署金丝雀令牌(canary tokens)和蜜标(honeytokens),包括伪造的 AWS 凭据、DNS 金丝雀、 文档信标和数据库记录,当攻击者访问时触发告警。使用 Canarytokens API 和自定义 Webhook 集成 实现入侵检测。适用于构建基于欺骗技术的早期预警入侵检测系统的场景。
Independent GitHub snapshot · Automated classification · Original documentation governs
在关键系统中部署蜜标以检测未经授权的访问。每种令牌类型在被攻击者触发时通过 Webhook 发送告警。
import requests
# 通过 Canarytokens 创建 DNS 金丝雀令牌
resp = requests.post("https://canarytokens.org/generate", data={
"type": "dns",
"email": "soc@company.com",
"memo": "生产 DB 服务器蜜标",
})
token = resp.json()
print(f"DNS 令牌:{token['hostname']}")
需要部署的令牌类型:
# 生成带金丝雀令牌的伪造 AWS 凭据文件
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)