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 |
|
message.NegotiateFlags = NegotiateFlags.UnicodeEncoding |
|
||||||
NegotiateFlags.TargetNameSupplied |
|
NegotiateFlags.TargetNameSupplied |
|
||||||
NegotiateFlags.NTLMKey |
|
NegotiateFlags.NTLMKey |
|
||||||
|
NegotiateFlags.TargetTypeServer |
|
||||||
NegotiateFlags.ExtendedSecurity |
|
NegotiateFlags.ExtendedSecurity |
|
||||||
NegotiateFlags.TargetInfo |
|
NegotiateFlags.TargetInfo |
|
||||||
NegotiateFlags.Version |
|
NegotiateFlags.Version;
|
||||||
NegotiateFlags.Use128BitEncryption |
|
if ((negotiateMessage.NegotiateFlags & NegotiateFlags.Sign) > 0)
|
||||||
NegotiateFlags.Use56BitEncryption;
|
{
|
||||||
|
// [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.TargetName = Environment.MachineName;
|
||||||
message.ServerChallenge = serverChallenge;
|
message.ServerChallenge = serverChallenge;
|
||||||
message.TargetInfo = AVPairUtils.GetAVPairSequence(Environment.MachineName, Environment.MachineName);
|
message.TargetInfo = AVPairUtils.GetAVPairSequence(Environment.MachineName, Environment.MachineName);
|
||||||
|
|
Loading…
Add table
Reference in a new issue