Package: hekatomb
The HEKATOMB projectBecause Domain Admin rights are not enough.Hack them all.🐍Hekatomb is a python script that connects to LDAP directory to retrieve all computers and users informations.Then it will download all DPAPI blob of all users from all computers.Finally, it will extract domain controller private key through RPC uses it to decrypt all credentials.ChangelogOn last version (V 1.5) :- Fix local packages importation error with pip installation- Prevent crash when no computers are reachableV 1.4 :- Fix LDAP search limitation to 1000 items- Add LDAP filter for computers to select only "Enabled" computers- Add function to scan SMB port with multi thread prior to get blob and master key files- Add a progress bar for files collection- Added 2 function modules to simplify code readability and maintainabilityV 1.3 :- Compare LDAP usernames with SMB users folders before trying to retrieve blob files to get them faster- DNSTCP option is no more used, DNS resolution is trying on UDP first and with TCP if it failsV 1.2.1 :- Use of the ldap3 library instead of Impacket for LDAP requests- Fix a bug that prevented querying trusted domains via an external domain account with administrator rights on the trusted domain controller- Add -smb2 parameter to force the use of SMBv2 protocol when it is available- LDAP and SMB communications are now more difficult to detect on the networkV 1.2.1 :- Add installation with PypiV 1.2 :- Increase the LDAP results limit of users or computers extraction (1000 previously)- Add the possibility to specify a user or a computer to target- Add the possibility to export results to a CSV fileV 1.1 :- Domain controller private key extraction through RPC- Credentials classification by computers and by usersWhat da fuck is this ?On Windows, credentials saved in the Windows Credentials Manager are encrypted using Microsoft's Data Protection API and stored as "blob" files in user AppData folder.Outside of a domain, the user's password hash is used to encrypt these "blobs".When you are in an Active Directory environment, the Data Protection API uses the domain controller's public key to encrypt these blobs.With the extracted private key of the domain controller, it is possible to decrypt all the blobs, and therefore to recover all the secrets recorded in the Windows identification manager of all the workstations in the domain.Hekatomb automates the search for blobs and the decryption to recover all domain users' secrets ☠️InstallationFrom Pypi for Debian-based :pip3installhekatombFrom BlackArch :pacman-ShekatombFrom github :gitclonehttps://github.com/ProcessusT/HEKATOMBcdHEKATOMBpoetryinstallpoetryrunhekatombUsageHekatomb uses Impacket syntax :usage:hekatomb[-h][-hashesLMHASH:NTHASH][-pvkPVK][-dnsDNS][-dnstcp][-port[port]][-just-userJUST_USER][-just-computerJUST_COMPUTER][-md5][-debug][-debugmax]targetScriptusedtoautomatedomaincomputersandusersextractionfromLDAPandextractionofdomaincontrollerprivatekeythroughRPCtocollectanddecryptallusers' DPAPI secrets saved in Windows credential manager.positionalarguments:target[[domain/]username[:password]@]<targetNameoraddressofDC>options:-h,--helpShowthishelpmessageandexitauthentication:-hashesLMHASH:NTHASHNTLMhashes,formatisLMHASH:NTHASHauthentication:-pvkPVKDomainbackupkeysfile-dnsDNSDNSserverIPaddresstoresolvecomputershostname-port[port]PorttoconnecttoSMBServer-smb2ForcetheuseofSMBv2protocol-just-user[USERNAME]Testonlyspecifiedusername-just-computer[COMPUTER]Testonlyspecifiedcomputer-md5Printmd5hashinstedofclearpasswordsverbosity:-debugTurnDEBUGoutputON-debugmaxTurnDEBUGoutputTOMAAAAXXXXExamplehekatomb-hashes:ed0052e5a66b1c8e942cc9481a50d56DOMAIN.local/administrator@10.0.0.1-debugHow to retrieve domain backup keys ?If no domain backup keys are provided, the script will retrieve it through RPC