NegotiateFlags.cs 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. namespace SMBLibrary.Authentication.NTLM
  3. {
  4. [Flags]
  5. public enum NegotiateFlags : uint
  6. {
  7. UnicodeEncoding = 0x00000001, // NTLMSSP_NEGOTIATE_UNICODE
  8. OEMEncoding = 0x00000002, // NTLM_NEGOTIATE_OEM
  9. TargetNameSupplied = 0x00000004, // NTLMSSP_REQUEST_TARGET
  10. Sign = 0x00000010, // NTLMSSP_NEGOTIATE_SIGN
  11. Seal = 0x00000020, // NTLMSSP_NEGOTIATE_SEAL
  12. Datagram = 0x00000040, // NTLMSSP_NEGOTIATE_DATAGRAM
  13. /// <summary>
  14. /// LanManagerSessionKey and ExtendedSessionSecurity are mutually exclusive
  15. /// If both are set then LanManagerSessionKey must be ignored
  16. /// </summary>
  17. LanManagerSessionKey = 0x00000080, // NTLMSSP_NEGOTIATE_LM_KEY
  18. NTLMSessionSecurity = 0x00000200, // NTLMSSP_NEGOTIATE_NTLM
  19. /// <summary>
  20. /// If set, the connection SHOULD be anonymous
  21. /// </summary>
  22. Anonymous = 0x00000800,
  23. DomainNameSupplied = 0x00001000, // NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED
  24. WorkstationNameSupplied = 0x00002000, // NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED
  25. AlwaysSign = 0x00008000, // NTLMSSP_NEGOTIATE_ALWAYS_SIGN
  26. TargetTypeDomain = 0x00010000, // NTLMSSP_TARGET_TYPE_DOMAIN
  27. TargetTypeServer = 0x00020000, // NTLMSSP_TARGET_TYPE_SERVER
  28. /// <summary>
  29. /// LanManagerSessionKey and ExtendedSessionSecurity are mutually exclusive
  30. /// If both are set then LanManagerSessionKey must be ignored.
  31. /// NTLM v2 requires this flag to be set.
  32. /// </summary>
  33. ExtendedSessionSecurity = 0x00080000, // NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY
  34. Identify = 0x00100000, // NTLMSSP_NEGOTIATE_IDENTIFY
  35. RequestLMSessionKey = 0x00400000, // NTLMSSP_REQUEST_NON_NT_SESSION_KEY
  36. TargetInfo = 0x00800000, // NTLMSSP_NEGOTIATE_TARGET_INFO
  37. Version = 0x02000000, // NTLMSSP_NEGOTIATE_VERSION
  38. Use128BitEncryption = 0x20000000, // NTLMSSP_NEGOTIATE_128
  39. KeyExchange = 0x40000000, // NTLMSSP_NEGOTIATE_KEY_EXCH
  40. Use56BitEncryption = 0x80000000, // NTLMSSP_NEGOTIATE_56
  41. }
  42. }