技能 编程开发 蜜罐令牌入侵监测

蜜罐令牌入侵监测

v20260426
implementing-honeytokens-for-breach-detection
在关键系统部署蜜罐令牌与诱饵凭证,通过伪装的 AWS 密钥、DNS 条目、文档和数据库记录触发 webhook 告警,帮助安全团队构建基于欺骗的早期入侵预警体系。
获取技能
408 次下载
概览

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:

  1. AWS credential files (~/.aws/credentials) with canary keys
  2. DNS tokens embedded in configuration files
  3. Document beacons (Word/PDF) in sensitive file shares
  4. Database honeytoken records in user tables
  5. 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)
信息
Category 编程开发
Name implementing-honeytokens-for-breach-detection
版本 v20260426
大小 8.59KB
更新时间 2026-05-10
语言