Chuyển đến nội dung
Skillpedia
Viết lách35k · #7592

abusing-shadow-credentials-for-privesc

Skill này làm gì

Công cụ này cho phép kẻ tấn công chiếm hoàn toàn một tài khoản Active Directory. Nó làm việc này bằng cách thêm một khóa công khai giả vào tài khoản, cho phép kẻ tấn công mạo danh nạn nhân mà không cần mật khẩu.

Khi nào nên dùng

  • ✓Khi các công cụ lập bản đồ mạng cho thấy bạn có thể sửa thông tin tài khoản.
  • ✓Để chiếm tài khoản một cách âm thầm, không kích hoạt cảnh báo đổi mật khẩu.
  • ✓Để có quyền truy cập tài khoản máy tính và dùng chúng để truy cập các tài nguyên khác.

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/abusing-shadow-credentials-for-privesc/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/abusing-shadow-credentials-for-privesc/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Làm thế nào để chiếm tài khoản “user1” mà không ai nhận ra?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ khai thác một thiết lập bảo mật gọi là “Shadow Credentials”. Nó thêm một khóa truy cập giả vào tài khoản mục tiêu. Với khóa này, kẻ tấn công có thể xác thực như nạn nhân và lấy được mật khẩu đã mã hóa của họ.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Abusing Shadow Credentials for Privilege Escalation

Legal Notice: This skill is for authorized security testing and educational purposes only. Shadow Credentials grant full takeover of the targeted account. Use only against systems you own or are explicitly authorized in writing to test. Unauthorized access is a crime.

Overview

The Shadow Credentials technique abuses the msDS-KeyCredentialLink attribute of Active Directory user and computer objects. This attribute stores raw public keys ("Key Credentials") used by Windows Hello for Business and Azure AD device registration for passwordless certificate-based logon via PKINIT (Public Key Cryptography for Initial Authentication in Kerberos). If an attacker has write permission over a target object's msDS-KeyCredentialLink — typically granted by GenericWrite, GenericAll, WriteProperty, or AddKeyCredentialLink ACEs surfaced in BloodHound — they can append their own attacker-generated public key. They then request a TGT for the target via PKINIT using the matching private key and recover the target's NT hash, achieving complete account takeover without resetting the password, which is far stealthier than a forced password reset.

The technique was published by Elad Shamir ("Shadow Credentials: Abusing Key Trust Account Mapping for Account Takeover") and implemented in the C# tool Whisker. The Python equivalent pyWhisker (ShutdownRepo) manipulates the attribute over LDAP, and Certipy integrates the entire chain via certipy shadow auto. The target environment must support PKINIT and have at least one Domain Controller running Windows Server 2016 or later. Sources: pyWhisker, Whisker, The Hacker Recipes — Shadow Credentials.

When to Use

  • When BloodHound reveals GenericWrite/GenericAll/AddKeyCredentialLink over a higher-value user or computer
  • As a stealthier alternative to ForceChangePassword (no password reset = less disruption/alerting)
  • To take over a computer account to chain into Resource-Based Constrained Delegation (RBCD)
  • During red-team operations needing account takeover without locking out the legitimate user
  • For purple-team exercises generating msDS-KeyCredentialLink modification telemetry

Prerequisites

  • Authorized engagement scope including AD credential-access techniques
  • Control of a principal with write access to the target's msDS-KeyCredentialLink
  • A DC running Windows Server 2016+ with PKINIT enabled (domain functional level supporting Key Trust)
  • Network reachability to LDAP (389/636) and Kerberos (88) on a DC
  • Linux attack host with Python 3.8+; install the tooling:
    # pyWhisker (from source)
    git clone https://github.com/ShutdownRepo/pywhisker
    cd pywhisker && pip install .
    # Certipy (integrated shadow attack)
    pipx install certipy-ad
    # PKINITtools for manual TGT/NT-hash extraction
    git clone https://github.com/dirkjanm/PKINITtools
    

Objectives

  • Confirm write access over a target's msDS-KeyCredentialLink
  • Generate a key pair and append a Key Credential to the target object
  • Request a TGT for the target via PKINIT using the new key
  • Recover the target's NT hash for pass-the-hash / further movement
  • Clean up the injected Key Credential to restore the object's state
  • Document the ACL path that enabled the attack for remediation

MITRE ATT&CK Mapping

ID Technique Application in this skill
T1098.005 Account Manipulation: Device Registration Writing an attacker-controlled Key Credential (device key) to msDS-KeyCredentialLink to register an alternate authentication credential for the target account

Workflow

Step 1: Confirm the write primitive

List existing Key Credentials on the target to verify you have the required access. An empty or readable result confirms write access for the add step.

python3 pywhisker.py -d "corp.local" -u "attacker" -p "Passw0rd!" \
    --target "victim" --action "list"

Step 2: Add a Shadow Credential with pyWhisker

Generate a certificate/key pair and write it into the target's msDS-KeyCredentialLink. pyWhisker outputs a PFX you control.

python3 pywhisker.py -d "corp.local" -u "attacker" -p "Passw0rd!" \

…
Câu hỏi thường gặp

Việc này có hợp pháp không?

Không, trừ khi bạn có sự cho phép bằng văn bản rõ ràng để kiểm thử hệ thống. Dùng công cụ này trên hệ thống không được phép là hành vi phạm pháp.

Tôi có cần mật khẩu của nạn nhân không?

Không, mục tiêu chính là giành quyền kiểm soát mà không cần mật khẩu.

Active Directory là gì?

Đây là hệ thống mà nhiều công ty dùng để quản lý máy tính và người dùng trong mạng của họ.

Chi tiết

Mô tả gốc của tác giả

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's NT hash without a password reset. Use when BloodHound shows GenericWrite/GenericAll/AddKeyCredentialLink over a target, as a stealthier alternative to ForceChangePassword, during autho

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#7592
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự