Skip to content

Instantly share code, notes, and snippets.

@HarmJ0y
Last active March 20, 2020 19:43
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HarmJ0y/b6230b40b615899524937c80177d692f to your computer and use it in GitHub Desktop.
Save HarmJ0y/b6230b40b615899524937c80177d692f to your computer and use it in GitHub Desktop.
KeeThief clarification points

A few clarification points for the "KeeThief – A Case Study in Attacking KeePass Part 2" post:

  1. KeeThief doesn't require local administrator rights, only rights to access the KeePass.exe process space you're targeting.

  2. KeeThief.ps1 is fully-self self-contained (no dependencies and no files dropped to disk) and PowerShell Version 2 compliant (so it will work on Windows 7+).

  3. Secure desktop doesn't matter/come into play as a keylogger isn't used or needed.

  4. This approach is different from KeeFarce - KeeThief recovers the plaintext master password and other key material from memory instead of calling internal methods to export the database contents.

  5. The database in KeePass needs to be unlocked to extract key material - if the database is locked there are ways to periodically run KeeThief to mine KeePass when it opens (which the post covers in the "Persistently Mining KeePass" post section).

  6. KeePass' triggers let you autodump creds on a database unlock or item copy without malware - see the "Exfiltration Without Malware" section.

  7. We cover mitigations/defenses in the post as best we can. For config manipulation, the included KeePassConfig.ps1 lets you enumerate all triggers with: Find-KeePassconfig | Get-KeePassConfigTrigger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment