#27: Implement NTLM hash support for PwnedPassAPI #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andCheckPassword
) will operate on NTLM hashes.Additionally, there are now equivalent methods for checking passwords and listing hashes for NTLM:
CheckNTLM
andListHashesNTLM
This PR closes #27