I need to create Type 1 message and Type 3 message for NTLM handshaking. Is there any .Net API for this?
Essentially, the application is WPF based, but Socket is us
If you are restricted to sockets, you will have to manually implement entire NTLM authentication protocol. Microsoft has a Security Support Provider Interface (SSPI) in secur32.dll to implement various security protocols, you can probably reuse some of API functions from there, through PInvoke (also there is some sort of .net wrapper is available here).
Here is the description of NTLM auth protocol, with API samples in NTLMSSP and SSPI section. Basically, entire authentication scheme is evolving around calling AcquireCredentialsHandle / InitializeSecurityContext with different parameters. This would provide you with type1/type3 ntlm messages in raw byte format, which you would have to send/receive through sockets.