0

I've been trying to implement an NTLMv2 response but can not for the life of me get the responses Windows says I should expect.

http://msdn.microsoft.com/en-us/library/cc236700%28v=prot.10%29 This is the code they say I should implement and they give definitions to the functions if you have trouble finding them please tell me I'll send you the link.

http://msdn.microsoft.com/en-us/library/cc669117%28v=prot.13%29 This is the result I should expect based on the definitions they provide. However whenever I try to implement this function as described I receive 51f357300503a4d8344817ec6bcce8ad

Which this being a Hash function could be very close or completely off. I wrote some python script to make the calculations as they described, if you would like I can post it but it seems fairly simple to make. I've tried retyping the input every which way but two days of trying to find how windows gets this Hash is enough in my opinion.

Python code. Hopefully this is in code format for stackoverflow.

import hmac
import hashlib
passwd = "Password"
test = hashlib.new('md4',passwd).hexdigest()
print test
final = hmac.new(test.decode('hex'),"USERDOMAIN").hexdigest()
print final
arduic
  • 659
  • 3
  • 12
  • Sorry I'm brand new to using Stack Overflow. Never been this desperate. How can I put it in Code format, I click code but it brings up a very awkward box message and just putting the code in a normal message I know is bad. – arduic Sep 12 '12 at 19:23
  • Paste in your code, highlight it, and hit the code button. Or just indent the code block by four spaces. – Blender Sep 12 '12 at 19:24
  • I posted the code for you. Hopefully you can find some glaringly obvious mistake. If it helps the NTMLv1 format uses just a MD4 encryption at one point and windows has the results for that but it does not match what my MD4 method or any I can find online post. I feel it is related to the UNICODE function they implement but the explanation they provide on it is almost impossible to interpret. – arduic Sep 12 '12 at 19:52
  • What is the expected response? – S. Albano Sep 14 '12 at 15:56

0 Answers0