Return accept-completed at the final stage of a GSS authentication

This commit is contained in:
Tal Aloni 2017-01-19 00:13:35 +02:00
parent 8060b1df4d
commit 4ac83f6d97
2 changed files with 14 additions and 0 deletions

View file

@ -58,5 +58,14 @@ namespace SMBLibrary.Authentication
token.Tokens.Add(entry);
return token.GetBytes();
}
public static byte[] GetGSSTokenAcceptCompletedResponse()
{
SimpleProtectedNegotiationTokenResponse token = new SimpleProtectedNegotiationTokenResponse();
TokenResponseEntry entry = new TokenResponseEntry();
entry.NegState = NegState.AcceptCompleted;
token.Tokens.Add(entry);
return token.GetBytes();
}
}
}

View file

@ -159,6 +159,11 @@ namespace SMBLibrary.Server.SMB1
header.Status = NTStatus.STATUS_LOGON_FAILURE;
return new ErrorResponse(CommandName.SMB_COM_SESSION_SETUP_ANDX);
}
if (!isRawMessage)
{
response.SecurityBlob = GSSAPIHelper.GetGSSTokenAcceptCompletedResponse();
}
}
response.NativeOS = String.Empty; // "Windows Server 2003 3790 Service Pack 2"
response.NativeLanMan = String.Empty; // "Windows Server 2003 5.2"