Communitygithub.com

mukul975/Anthropic-Cybersecurity-Skills

通过使用 pyWhisker、Whisker 或 Certipy 将攻击者控制的公钥写入 msDS-KeyCredentialLink(影子凭据),接管 Active Directory 账户,然后通过 PKINIT 进行身份验证以恢复目标的 NT 哈希值,而无需重置密码。当 BloodHound 显示对目标具有 GenericWrite/GenericAll/AddKeyCredentialLink 权限时,作为更隐秘的替代 ForceChangePassword 方法使用,仅限授权的红队演练。

Anthropic-Cybersecurity-Skills 是什么?

该技能使 AI 代理能够在 Active Directory (AD) 环境中执行高度特权的攻击操作,即“影子凭据”(Shadow Credentials)攻击。它通过利用对目标的 GenericWrite、GenericAll 或 AddKeyCredentialLink 权限,使用 pyWhisker、Whisker 或 Certipy 等工具,将攻击者控制的公钥写入目标对象的 msDS-KeyCredentialLink 属性。一旦写入,攻击者便能通过 PKINIT 协议进行 Kerberos 身份验证,获得该账户的 NT 哈希值,整个过程无需重置密码,极其隐蔽。此技能通常与 BloodHound 配合使用,当工具发现相关攻击路径时触发,是传统 ForceChangePassword 方法的更安静替代方案。它支持在授权的红队演练中使用,适用于 Windows 域环境,但必须严格遵循伦理性测试指南以确保不破坏系统。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add mukul975/Anthropic-Cybersecurity-Skills

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Anthropic-Cybersecurity-Skills 是做什么的?

通过使用 pyWhisker、Whisker 或 Certipy 将攻击者控制的公钥写入 msDS-KeyCredentialLink(影子凭据),接管 Active Directory 账户,然后通过 PKINIT 进行身份验证以恢复目标的 NT 哈希值,而无需重置密码。当 BloodHound 显示对目标具有 GenericWrite/GenericAll/AddKeyCredentialLink 权限时,作为更隐秘的替代 ForceChangePassword 方法使用,仅限授权的红队演练。

工作原理

该技能实现了“影子凭据”攻击,这是一种 Active Directory 权限提升技术。攻击者利用对目标账户(用户或计算机)的写入权限,向其 msDS-KeyCredentialLink 属性添加一个公钥。然后,攻击者可以通过 PKINIT 协议从该私钥派生凭据,并请求 Kerberos 票证。成功认证后,攻击者可以获得目标的 NT 哈希值,从而在不触发密码重置事件的情况下完全接管账户。

使用前提

  • 对目标账户拥有 GenericWrite、GenericAll 或 AddKeyCredentialLink 权限。
  • 目标域控制器支持 PKINIT 认证(Windows Server 2012 及以上版本均支持)。
  • 必须在授权的红队演练或安全性评估中使用。
  • 安装并配置了以下工具之一:pyWhisker、Whisker (PowerShell) 或 Certipy。

典型使用场景

  1. 运行 BloodHound 并发现攻击路径显示 GenericWrite 或 AddKeyCredentialLink 权限。
  2. 使用本技能向目标添加影子凭据。
  3. 通过 PKINIT 认证并提取 NT 哈希值。
  4. 使用获取的哈希值进行 pass-the-hash 或其他横向移动操作。

支持的平台

  • 操作系统:Linux、Windows(依赖 PowerShell 工具)
  • 工具:pyWhisker、Whisker、Certipy
  • 环境:Active Directory 域环境

安全注意事项

  • 仅用于授权的安全测试。
  • 此技术比 ForceChangePassword 更隐蔽,因为它不修改用户密码,但可能留下安全日志(事件 ID 5136)。
  • 测试完成后,务必清除添加的影子凭据以恢复对象的原始状态。

示例命令

使用 pyWhisker(Python)

python3 pywhisker.py -d "domain.local" -u "attacker" -p "password" --target "target_user" --action "add" --filename "shadow"

使用 Whisker(PowerShell)

Whisker.exe add /target:target_user /domain:domain.local /dc:dc01.domain.local /path:C:\path\to\output

使用 Certipy

certipy shadow add -u '[email protected]' -p 'password' -account 'target_user'

清除影子凭据

使用 pyWhisker

python3 pywhisker.py -d "domain.local" -u "attacker" -p "password" --target "target_user" --action "remove" --device-id "<device_id>"

使用 Whisker

Whisker.exe remove /target:target_user /domain:domain.local /dc:dc01.domain.local /deviceid:<device_id>

使用 Certipy

certipy shadow remove -u '[email protected]' -p 'password' -account 'target_user' -device-id '<device_id>'

参考资源

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

abusing-dpapi-for-credential-access

Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket

abusing-shadow-credentials-for-privesc

Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target

achieving-cmmc-level-2-compliance

>-

acquiring-disk-image-with-dd-and-dcfldd

Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident response, or producing a verified copy for legal or law-enforcement proceedings before any destructive analysis.

analyzing-active-directory-acl-abuse

Detect dangerous ACL misconfigurations in Active Directory using ldap3

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically triage a suspicious APK without executing it or to build mobile malware detection rules.

analyzing-api-gateway-access-logs

Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect

analyzing-apt-group-with-mitre-navigator

Query ATT&CK data with attackcti, mitreattack-python, and stix2, then build MITRE ATT&CK Navigator layers and multi-layer heatmap overlays mapping one or more APT groups

analyzing-azure-activity-logs-for-threats

Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query

analyzing-bootkit-and-rootkit-samples

Analyzes bootkit and advanced rootkit malware infecting the Master

analyzing-browser-forensics-with-hindsight

Parse Chromium-based browser databases with Hindsight to extract and correlate browsing history, downloads, cookies, cached content, autofill data, saved passwords, and extensions from Chrome, Edge, Brave, Opera, and Vivaldi into a unified timeline (XLSX, JSON, or SQLite output). Use during incident response, insider-threat investigations, or criminal cases when you need to reconstruct a user

analyzing-campaign-attribution-evidence

Systematically evaluate cyber-campaign evidence to attribute an operation to a threat actor, using the Diamond Model and Analysis of Competing Hypotheses (ACH) to weigh infrastructure overlaps, TTP consistency, malware code similarity, and timing/language artifacts into confidence-weighted attribution assessments. Use when an incident investigation needs a defensible attribution confidence level.

analyzing-certificate-transparency-for-phishing

Monitor Certificate Transparency logs using crt.sh and Certstream to

analyzing-cloud-storage-access-patterns

Detect abnormal access in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics for after-hours bulk downloads, new-IP access, and API-call spikes (e.g. GetObject) via statistical baselines and time-series anomaly detection. Use when investigating suspected cloud data exfiltration or building related detection rules.

analyzing-cobalt-strike-beacon-configuration

Extract and analyze Cobalt Strike beacon configuration from PE files

analyzing-cobaltstrike-malleable-c2-profiles

Parse and analyze Cobalt Strike Malleable C2 profiles with dissect.cobaltstrike (profiles and beacon-payload configs) and pyMalleableC2 (AST parsing) to extract HTTP/DNS transforms, URIs, headers, sleep/jitter, and injection behavior, then generate network detection signatures. Use when reverse-engineering a captured malleable profile or building detections against Cobalt Strike Beacon traffic.

analyzing-command-and-control-communication

Analyzes malware C2 communication over HTTP, HTTPS, DNS, and custom

analyzing-cyber-kill-chain

Analyzes intrusion activity against the Lockheed Martin Cyber Kill Chain

analyzing-disk-image-with-autopsy

Perform comprehensive forensic analysis of raw (dd), E01, or AFF disk images with Autopsy and The Sleuth Kit, recovering deleted files, examining metadata and embedded artifacts, keyword searching, and building investigation timelines with visual reports. Use for structured analysis of a forensic disk image or when stakeholders need visual reports from evidence.

analyzing-dns-logs-for-exfiltration

Analyzes DNS query logs to detect data exfiltration via DNS tunneling,

相关技能