Пример #1
0
 bool xDecrypt(out DJsIO PayLoad)
 {
     PayLoad = null;
     try
     {
         IO.Position = 0;
         byte[] xHeaderKey = IO.ReadBytes(0x10);
         xRC4 = new RC4(xComputeRC4Key(xHeaderKey));
         byte[] xData = IO.ReadBytes(0x184);
         byte[] xPayload;
         byte[] xConfounder;
         if (!xRC4.KerberosDecrypt(xData, out xConfounder, 8, out xPayload))
         {
             return(false);
         }
         bool xsuccess = xComputeHeaderKey(xConfounder, xPayload).HexString() == xHeaderKey.HexString();
         if (xsuccess)
         {
             PayLoad = new DJsIO(xPayload, true);
         }
         return(xsuccess);
     }
     catch { return(false); }
 }
Пример #2
0
 /// <summary>
 /// Runs a Kerberos RC4 encryption on the specified data
 /// </summary>
 /// <param name="xKey">Key input</param>
 /// <param name="xConfounder">outputs the confounder</param>
 /// <param name="xPayload">Outputs the payload</param>
 /// <param name="xConLen">Confounder Length</param>
 /// <param name="xData">Outputs the decrypted data</param>
 /// <returns></returns>
 public static bool RunKerberosDecrypt(byte[] xKey, byte[] xData, out byte[] xConfounder, int xConLen, out byte[] xPayload)
 {
     RC4 xrc4 = new RC4(xKey);
     return xrc4.KerberosDecrypt(xData, out xConfounder, xConLen, out xPayload);
 }