what kind of struct need to use to get MSV1_0 challenge by calling LsaCallAuthenticationPackage API in C#. my sample code is below.
UInt32 msvAuthPackageId;
using(OSCalls.LsaStringWrapper msvPackageName = new OSCalls.LsaStringWrapper("MICROSOFT_AUTHENTICATION_PACKAGE_V1_0")) {
status = OSCalls.LsaLookupAuthenticationPackage(lsaHandle, ref msvPackageName._string, out msvAuthPackageId);
Console.WriteLine("NtlmLogon status check again after LsaLookupAuthenticationPackage {0} ", status);
if (status != OSCalls.WinStatusCodes.STATUS_SUCCESS) throw new System.ComponentModel.Win32Exception((int) OSCalls.LsaNtStatusToWinError(status));
}
Status is a success but protocolReturnBuf value is empty (always getting zero value and returnBufLen is showing 12)
where authPackage, I am using the below struct to build the pointer and using MSV1_0_PROTOCOL_MESSAGE_TYPE.MsV1_0Lm20ChallengeRequest to get the challenge
public struct MSV1_0_LM20_LOGON //
{
public MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
public LSA_UNICODE_STRING LogonDomainName;
public LSA_UNICODE_STRING UserName;
public LSA_UNICODE_STRING Workstation;
}