{"id":17995087,"url":"https://github.com/p0dalirius/extractbitlockerkeys","last_synced_at":"2025-05-16T05:06:49.443Z","repository":{"id":195846649,"uuid":"693517765","full_name":"p0dalirius/ExtractBitlockerKeys","owner":"p0dalirius","description":"A system administration or post-exploitation script to automatically extract the bitlocker recovery keys from a domain.","archived":false,"fork":false,"pushed_at":"2025-01-31T09:39:55.000Z","size":10548,"stargazers_count":368,"open_issues_count":2,"forks_count":54,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-08T20:17:02.257Z","etag":null,"topics":["active-directory","bitlocker","domain","post-exploitation","recovery"],"latest_commit_sha":null,"homepage":"https://podalirius.net/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p0dalirius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"p0dalirius","patreon":"Podalirius"}},"created_at":"2023-09-19T07:28:11.000Z","updated_at":"2025-03-21T14:44:02.000Z","dependencies_parsed_at":"2023-11-28T14:29:39.672Z","dependency_job_id":"f08c9da5-3bb1-4686-ae5a-f81287663127","html_url":"https://github.com/p0dalirius/ExtractBitlockerKeys","commit_stats":null,"previous_names":["p0dalirius/extractbitlockerkeys"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p0dalirius%2FExtractBitlockerKeys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p0dalirius%2FExtractBitlockerKeys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p0dalirius%2FExtractBitlockerKeys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p0dalirius%2FExtractBitlockerKeys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p0dalirius","download_url":"https://codeload.github.com/p0dalirius/ExtractBitlockerKeys/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471061,"owners_count":22076585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["active-directory","bitlocker","domain","post-exploitation","recovery"],"created_at":"2024-10-29T20:17:53.997Z","updated_at":"2025-05-16T05:06:44.433Z","avatar_url":"https://github.com/p0dalirius.png","language":"Python","funding_links":["https://github.com/sponsors/p0dalirius","https://patreon.com/Podalirius"],"categories":[],"sub_categories":[],"readme":"![](./.github/banner.png)\n\n\u003cp align=\"center\"\u003e\n    A system administration or post-exploitation script to automatically extract the bitlocker recovery keys from a domain.\n    \u003cbr\u003e\n    \u003cimg alt=\"GitHub release (latest by date)\" src=\"https://img.shields.io/github/v/release/p0dalirius/ExtractBitlockerKeys\"\u003e\n    \u003ca href=\"https://twitter.com/intent/follow?screen_name=podalirius_\" title=\"Follow\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/podalirius_?label=Podalirius\u0026style=social\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.youtube.com/c/Podalirius_?sub_confirmation=1\" title=\"Subscribe\"\u003e\u003cimg alt=\"YouTube Channel Subscribers\" src=\"https://img.shields.io/youtube/channel/subscribers/UCF_x5O7CSfr82AfNVTKOv_A?style=social\"\u003e\u003c/a\u003e\n    \u003cbr\u003e\n\u003c/p\u003e\n\n## Features\n\n - [x] Automatically gets the list of all computers from the domain controller's LDAP.\n - [x] Multithreaded connections to extract Bitlocker keys from LDAP.\n - [x] Iterate on LDAP result pages to get every computer of the domain, no matter the size.\n\n\u003e [!WARNING]\n\u003e Please do not store this backup in an online SMB share of the domain. You should prefer to print it and store it physically in a locked safe.\n - [x] Export results in JSON with Computer FQDN, Domain, Recovery Key, Volume GUID, Created At and Organizational Units.\n - [x] Export results in XLSX with Computer FQDN, Domain, Recovery Key, Volume GUID, Created At and Organizational Units.\n - [x] Export results in SQLITE3 with Computer FQDN, Domain, Recovery Key, Volume GUID, Created At and Organizational Units.\n\n---\n\n## Demonstration from Linux in Python\n\nTo extract Bitlocker recovery keys from all the computers of the domain `domain.local` you can use this command:\n\n```\n./ExtractBitlockerKeys.py -d 'domain.local' -u 'Administrator' -p 'Podalirius123!' --dc-ip 192.168.1.101\n```\n\nYou will get the following output:\n\n![](./.github/example_python.png)\n\n---\n\n## Demonstration from Windows in Powershell\n\nTo extract Bitlocker recovery keys from all the computers of the domain `domain.local` you can use this command:\n\n```\n.\\ExtractBitlockerKeys.ps1 -dcip 192.168.1.101 -ExportToCSV ./keys.csv -ExportToJSON ./keys.json\n```\n\nYou will get the following output:\n\n![](./.github/example_powershell.png)\n\n---\n\n## Usage\n\n```\n$ ./ExtractBitlockerKeys.py -h\nExtractBitlockerKeys.py v1.1 - by Remi GASCOU (Podalirius)\n\nusage: ExtractBitlockerKeys.py [-h] [-v] [-q] [-t THREADS] [--export-xlsx EXPORT_XLSX] [--export-json EXPORT_JSON] [--export-sqlite EXPORT_SQLITE] --dc-ip ip address [-d DOMAIN] [-u USER]\n                               [--no-pass | -p PASSWORD | -H [LMHASH:]NTHASH | --aes-key hex key] [-k]\n\noptions:\n  -h, --help            show this help message and exit\n  -v, --verbose         Verbose mode. (default: False)\n  -q, --quiet           Show no information at all.\n  -t THREADS, --threads THREADS\n                        Number of threads (default: 4).\n\nOutput files:\n  --export-xlsx EXPORT_XLSX\n                        Output XLSX file to store the results in.\n  --export-json EXPORT_JSON\n                        Output JSON file to store the results in.\n  --export-sqlite EXPORT_SQLITE\n                        Output SQLITE3 file to store the results in.\n\nAuthentication \u0026 connection:\n  --dc-ip ip address    IP Address of the domain controller or KDC (Key Distribution Center) for Kerberos. If omitted it will use the domain part (FQDN) specified in the identity parameter\n  -d DOMAIN, --domain DOMAIN\n                        (FQDN) domain to authenticate to\n  -u USER, --user USER  user to authenticate with\n\nCredentials:\n  --no-pass             Don't ask for password (useful for -k)\n  -p PASSWORD, --password PASSWORD\n                        Password to authenticate with\n  -H [LMHASH:]NTHASH, --hashes [LMHASH:]NTHASH\n                        NT/LM hashes, format is LMhash:NThash\n  --aes-key hex key     AES key to use for Kerberos Authentication (128 or 256 bits)\n  -k, --kerberos        Use Kerberos authentication. Grabs credentials from .ccache file (KRB5CCNAME) based on target parameters. If valid credentials cannot be found, it will use the ones specified in the command line.\n```\n\n## Contributing\n\nPull requests are welcome. Feel free to open an issue if you want to add other features.\n\n## References\n\n - [https://learn.microsoft.com/en-us/windows/win32/adschema/a-msfve-keypackage](https://learn.microsoft.com/en-us/windows/win32/adschema/a-msfve-keypackage?wt.mc_id=SEC-MVP-5005286)\n - [https://learn.microsoft.com/en-us/windows/win32/adschema/a-msfve-recoveryguid](https://learn.microsoft.com/en-us/windows/win32/adschema/a-msfve-recoveryguid?wt.mc_id=SEC-MVP-5005286)\n - [https://learn.microsoft.com/en-us/windows/win32/adschema/a-msfve-recoverypassword](https://learn.microsoft.com/en-us/windows/win32/adschema/a-msfve-recoverypassword?wt.mc_id=SEC-MVP-5005286)\n - [https://learn.microsoft.com/en-us/windows/win32/adschema/a-msfve-volumeguid](https://learn.microsoft.com/en-us/windows/win32/adschema/a-msfve-volumeguid?wt.mc_id=SEC-MVP-5005286)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp0dalirius%2Fextractbitlockerkeys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp0dalirius%2Fextractbitlockerkeys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp0dalirius%2Fextractbitlockerkeys/lists"}