mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-04-30 02:37:49 +02:00
IndependentUserCollection: Improved ChallengeMessage generation
This commit is contained in:
parent
ec4be00f90
commit
d66208cfb8
1 changed files with 16 additions and 3 deletions
|
@ -126,11 +126,24 @@ namespace SMBLibrary.Server
|
|||
message.NegotiateFlags = NegotiateFlags.UnicodeEncoding |
|
||||
NegotiateFlags.TargetNameSupplied |
|
||||
NegotiateFlags.NTLMKey |
|
||||
NegotiateFlags.TargetTypeServer |
|
||||
NegotiateFlags.ExtendedSecurity |
|
||||
NegotiateFlags.TargetInfo |
|
||||
NegotiateFlags.Version |
|
||||
NegotiateFlags.Use128BitEncryption |
|
||||
NegotiateFlags.Use56BitEncryption;
|
||||
NegotiateFlags.Version;
|
||||
if ((negotiateMessage.NegotiateFlags & NegotiateFlags.Sign) > 0)
|
||||
{
|
||||
// [MS-NLMP] If the client sends NTLMSSP_NEGOTIATE_SIGN to the server in the NEGOTIATE_MESSAGE,
|
||||
// the server MUST return NTLMSSP_NEGOTIATE_SIGN to the client in the CHALLENGE_MESSAGE.
|
||||
message.NegotiateFlags |= NegotiateFlags.Sign;
|
||||
}
|
||||
if ((negotiateMessage.NegotiateFlags & NegotiateFlags.Use56BitEncryption) > 0)
|
||||
{
|
||||
message.NegotiateFlags |= NegotiateFlags.Use56BitEncryption;
|
||||
}
|
||||
if ((negotiateMessage.NegotiateFlags & NegotiateFlags.Use128BitEncryption) > 0)
|
||||
{
|
||||
message.NegotiateFlags |= NegotiateFlags.Use128BitEncryption;
|
||||
}
|
||||
message.TargetName = Environment.MachineName;
|
||||
message.ServerChallenge = serverChallenge;
|
||||
message.TargetInfo = AVPairUtils.GetAVPairSequence(Environment.MachineName, Environment.MachineName);
|
||||
|
|
Loading…
Add table
Reference in a new issue