diff --git a/Rubeus/lib/Crypto.cs b/Rubeus/lib/Crypto.cs index 84c4858c..c607a042 100755 --- a/Rubeus/lib/Crypto.cs +++ b/Rubeus/lib/Crypto.cs @@ -71,7 +71,7 @@ public static string KerberosPasswordHash(Interop.KERB_ETYPE etype, string passw byte[] output = new byte[pCSystem.KeySize]; - int success = pCSystemHashPassword(passwordUnicode, saltUnicode, count, output); + int success = pCSystemHashPassword(ref passwordUnicode, ref saltUnicode, count, output); if (status != 0) throw new Win32Exception(status); diff --git a/Rubeus/lib/Interop.cs b/Rubeus/lib/Interop.cs index 4cc95c27..d7e7f1dd 100755 --- a/Rubeus/lib/Interop.cs +++ b/Rubeus/lib/Interop.cs @@ -1496,7 +1496,7 @@ public class NetResource public delegate int KERB_ECRYPT_Decrypt(IntPtr pContext, byte[] data, int dataSize, byte[] output, ref int outputSize); public delegate int KERB_ECRYPT_Finish(ref IntPtr pContext); - public delegate int KERB_ECRYPT_HashPassword(UNICODE_STRING Password, UNICODE_STRING Salt, int count, byte[] output); + public delegate int KERB_ECRYPT_HashPassword(ref UNICODE_STRING Password, ref UNICODE_STRING Salt, int count, byte[] output); //https://github.com/vletoux/MakeMeEnterpriseAdmin/blob/master/MakeMeEnterpriseAdmin.ps1#L1760-L1767 public delegate int KERB_CHECKSUM_Initialize(int unk0, out IntPtr pContext);