Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#27: Implement NTLM hash support for PwnedPassAPI #28

Merged
merged 1 commit into from
Feb 9, 2023

Conversation

wneessen
Copy link
Owner

@wneessen wneessen commented Feb 9, 2023

This PR implements support for NTLM hashes as announced by Troy Hunt: https://s.pebcak.de/@troyhunt@infosec.exchange/109833758367903768

For this we needed to be able to calculate MD4 hashes, as NTLM basically is calculated like this: MD4(UTF-16LE(pw)). For this we ported the official golang.org/x/crypto/md4 package, so we can still claim that "only depends on Go stdlib"

A new Client option has been introduced: WithPwnedNTLMHash. If the client is initalized with this option, all generic methods (ListHashesPassword and CheckPassword) will operate on NTLM hashes.

Additionally, there are now equivalent methods for checking passwords and listing hashes for NTLM: CheckNTLM and ListHashesNTLM

This PR closes #27

This PR implements support for NTLM hashes as announced by Troy Hunt:
https://s.pebcak.de/@troyhunt@infosec.exchange/109833758367903768

For this we needed to be able to calculate MD4 hashes, as NTLM basically is calculated like this: `MD4(UTF-16LE(pw))`. For this we ported the official golang.org/x/crypto/md4 package, so we can still claim that "only depends on Go stdlib"

A new Client option has been introduced: `WithPwnedNTLMHash`. If the client is initalized with this option, all generic methods (`ListHashesPassword` and `CheckPassword`) will  operate on NTLM hashes.

Additionally, there are now equivalent methods for checking passwords and listing hashes for NTLM: `CheckNTLM` and `ListHashesNTLM`
@wneessen wneessen linked an issue Feb 9, 2023 that may be closed by this pull request
@wneessen wneessen merged commit 2e13557 into main Feb 9, 2023
@wneessen wneessen deleted the 27-add-ntlm-hash-support branch February 9, 2023 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add NTLM hash support
1 participant