Search code examples
ntlmmail-server

How to generate type3 message for NTLM Authentication?


I want to send a test mail from linux server. after telnet and ehlo I use AUTH NTLM, then I send the type1 message, I get a response, but I do not know how to form the type 3 message in order to successfully authenticate. Do I need to use some information from type 2 message? here is one example https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smtpntlm/a048c79f-7597-401b-bcb4-521d682de765

I need to understand what is done in 6 & 7 steps.

Thanks in advance


Solution

  • From the type 2 message, you will need the NTLM CHALLENGE_MESSAGE. I implemented this in Javascript, so you can have a look at my implementation for the exact protocol: https://github.com/SamDecrock/node-http-ntlm/blob/master/ntlm.js