abusing-dpapi-for-credential-access
Skill này làm gì
Công cụ này giúp khôi phục mật khẩu và thông tin đã lưu trên máy tính Windows. Nó giải mã dữ liệu được bảo vệ bởi hệ thống DPAPI, bao gồm mật khẩu trang web, thông tin Wi-Fi và các chương trình như Credential Manager.
Khi nào nên dùng
- ✓Khi bạn có quyền truy cập máy tính và muốn xem mật khẩu đã lưu.
- ✓Nếu bạn có mật khẩu của một người dùng và muốn khôi phục dữ liệu của họ.
- ✓Để lấy lại thông tin bảo mật từ một hệ thống máy tính đã được sao chép.
Liên kết skill
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/abusing-dpapi-for-credential-access/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Khôi phục các mật khẩu đã lưu trên máy tính của tôi.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ dùng khóa bí mật từ người dùng hoặc hệ thống để giải mã dữ liệu được bảo vệ. Nó có thể làm việc này trực tiếp trên máy tính, hoặc dùng thông tin như mật khẩu của người dùng, nếu bạn có.
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 DPAPI for Credential Access
Legal Notice: This skill is for authorized penetration testing, red-team engagements, and educational purposes only. Extracting credentials from systems you do not own or lack explicit written authorization to test is illegal and may violate computer fraud and abuse laws. Always operate within a signed rules-of-engagement and document every action.
Overview
The Windows Data Protection API (DPAPI) is the operating system's built-in symmetric-encryption service that applications use to protect secrets at rest: saved RDP and Windows Credential Manager credentials, web and Wi-Fi credentials in the Credential Vault, browser saved logins and cookies (Chrome/Edge), KeePass keys, certificate private keys, and Scheduled Task passwords. DPAPI derives a per-user (or per-machine) master key from the user's password (or the machine account secret), and that master key encrypts individual "DPAPI blobs." The encrypted master keys live under %APPDATA%\Microsoft\Protect\<SID>\ (user) and %WINDIR%\System32\Microsoft\Protect\ (machine).
Red teamers abuse DPAPI to recover plaintext secrets after gaining a foothold, mapping to MITRE ATT&CK T1555.004 (Credentials from Password Stores: Windows Credential Manager). There are three primary decryption paths:
- Online / context-based — running as the target user, DPAPI APIs (
CryptUnprotectData) transparently decrypt the user's blobs. SharpDPAPI's/unprotectflag uses this. - Offline with the user password or NTLM hash — decrypt the user's master keys with
/password:or/ntlm:, then decrypt the blobs offline (great for triaged files pulled from a host). - Domain-wide with the DPAPI backup key — Domain Admins can extract the domain's RSA DPAPI backup key (
.pvk) once, then decrypt any domain user's master keys forever, online or offline, with/pvk:.
The canonical tooling is SharpDPAPI (GhostPack, a C# port of Mimikatz DPAPI functionality) for Windows, SharpChrome for browser secrets, and Mimikatz (dpapi::*) as the original implementation. On Linux, Impacket's dpapi.py and donpapi perform remote/offline triage.
When to Use
- After compromising a Windows host where the user has saved RDP, browser, or vault credentials worth harvesting for lateral movement.
- When you hold a user's password or NTLM hash and want to decrypt their DPAPI-protected secrets offline.
- When you have Domain Admin and want to obtain the domain DPAPI backup key to decrypt any user's protected data across the estate.
- When triaging exfiltrated
Credentials,Vault, orProtectdirectories from disk images. - During purple-team exercises to validate detection of DPAPI master-key access and LSASS/Protect-folder reads.
Prerequisites
- An authorized foothold (interactive session, beacon, or remote admin) on the target Windows host.
- Knowledge of the target user's SID, and one of: the user's session, password, NTLM hash, or Domain Admin rights for the backup key.
- Tooling (compile from source or use release binaries; obtain only from official upstreams):
# SharpDPAPI / SharpChrome (GhostPack) — build with Visual Studio / msbuild
git clone https://github.com/GhostPack/SharpDPAPI.git
# Open SharpDPAPI.sln and build Release, or:
msbuild SharpDPAPI.sln /p:Configuration=Release
# Mimikatz (original DPAPI implementation)
# https://github.com/gentilkiwi/mimikatz/releases
# Linux remote/offline triage (Impacket)
pipx install impacket # provides dpapi.py / impacket-dpapi
pipx install donpapi # https://github.com/login-securite/DonPAPI
Objectives
- Triage a host for DPAPI-protected credential, vault, RDP, and certificate blobs.
- Decrypt user master keys online (
/unprotect), with a password/hash, or with the domain backup key. - Recover plaintext Credential Manager and Vault secrets.
- Extract browser saved logins and cookies with SharpChrome.
- Obtain and reuse the domain DPAPI backup key for estate-wide decryption.
MITRE ATT&CK Mapping
| Technique ID | Name | Tactic | Relevance |
|---|---|---|---|
| T1555.004 | Credentials from Password Stores: Windows Credential Manager | Credential Access | DPAPI protects Credential Manager / Vault entries; decrypting master keys and blobs recovers these stored credentials. |
…
Câu hỏi thường gặp
DPAPI là gì?
DPAPI là hệ thống bảo mật của Windows bảo vệ thông tin quan trọng, như mật khẩu, bằng mã hóa. Nó đảm bảo chỉ người dùng đúng mới truy cập được dữ liệu này.
Tôi có cần là quản trị viên để dùng không?
Để khôi phục dữ liệu của người dùng khác, thường là có. Nhưng nếu bạn đang đăng nhập với chính người dùng có dữ liệu cần khôi phục, bạn có thể không cần quyền quản trị.
Việc này có hợp pháp không?
Chỉ hợp pháp khi dùng công cụ này trên máy tính mà bạn có sự cho phép rõ ràng để kiểm thử, chẳng hạn trong công việc bảo mật được ủy quyền (red teaming) hoặc để học tập.
Chi tiết
Mô tả gốc của tác giả
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's dpapi.py, including domain-wide decryption via the DPAPI backup key. Use during authorized red-team credential-access engagements after gaining a foothold or when triaging DPAPI blobs pulled from a
Độ phổ biến
- Sao GitHub
- 35k
- Vị trí xếp hạng
- #7591
- Giấy phép
- Apache-2.0
- Cập nhật
- 31/8/2026
Bình luận
- …
Thêm skill từ kho mã này
abusing-shadow-credentials-for-privesc
35kDạy agent AI của bạn viết văn bản rõ ràng và có cấu trúc tốt.
achieving-cmmc-level-2-compliance
35kGiúp agent của bạn chuẩn bị môi trường để tuân thủ CMMC Level 2. Triển khai các yêu cầu bảo mật và quản lý tài liệu cần thiết.
acquiring-disk-image-with-dd-and-dcfldd
35kGiúp agent của bạn tạo bản sao chính xác của ổ đĩa. Cách này đảm bảo không mất hay thay đổi thông tin trong quá trình điều tra.
analyzing-active-directory-acl-abuse
35kGiúp agent của bạn tìm các thiết lập bảo mật yếu trên mạng. Công cụ tìm những cách kẻ tấn công có thể lợi dụng để truy cập trái phép.
Skill tương tự
api-connector-builder
280kGiúp agent của bạn xây dựng kết nối API mới theo đúng mẫu đã có, dùng khi bạn cần thêm một tích hợp mà không tạo cách làm mới.
api-design
280kGiúp agent của bạn thiết kế REST API theo các thực hành tốt nhất, hữu ích để định nghĩa cách API giao tiếp, hiển thị lỗi và tổ chức dữ liệu.
backend-patterns
280kGiúp agent của bạn với các mẫu kiến trúc phía máy chủ và tối ưu cơ sở dữ liệu, hữu ích khi xây dựng hoặc rà soát code chạy trên máy chủ.