Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

HELP [C#] Melt Server

Can someone help me with some code to melt a .exe at runtime?
So my cryter, makes an encrypted exe and at runtime it should delete itself after injection itself.
This is what i have right now, but it doesnt seem to work.

Code
    private static string stubLocation = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
private static string meltLocation = Assembly.GetEntryAssembly().Location;

public void MeltFile()
    {
        try
        {
            if(stubLocation.Contains(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)))
            {
                return;
            }
            string meltedFile = string.Format("{0}\\{1}.exe", meltLocation, "");
            while(File.Exists(meltedFile))
            {
                meltedFile = string.Format("{0}\\{1}.exe", meltLocation, "");
            }
            File.Copy(stubLocation, meltedFile);
            Process meltedStub = new Process();
            meltedStub.StartInfo.FileName = meltedFile;
            meltedStub.StartInfo.Arguments = stubLocation;
            meltedStub.Start();
            Environment.Exit(0);
        }
        catch
        {
            MessageBox.Show("ERROR");
        }
    }
https://evilzone.org/vb-vb-net-c-c-net/(...melt-file/
[Image: ezgif-2-dcabfc0d37ae.gif]
https://msdn.microsoft.com/en-us/library...s.85).aspx

Pass the MOVEFILE_WRITE_THROUGH flag and you can move itself.
Lotta blood to let, peace to make, give a fuk about a check
(Oct 18, 2015 03:26 AM)Multibyte Wrote:  https://evilzone.org/vb-vb-net-c-c-net/(...melt-file/

Tryed that one once, didnt work.


(Oct 18, 2015 03:36 AM)BahNahNah Wrote:  https://msdn.microsoft.com/en-us/library...s.85).aspx

Pass the MOVEFILE_WRITE_THROUGH flag and you can move itself.

I will have a look, but that is only after a reboot right?
(Oct 18, 2015 03:44 AM)Barthezz Wrote:  I will have a look, but that is only after a reboot right?

Actually it should do it instantly once running.

You could declare it as:
Code
private static extern bool MoveFileEx(string lpExistingFileName, string lpNewFileName, int dwFlags);

And use the following declaration to move a file from one place to another:
Code
MoveFileEx("old_file_location", "new_file_location", 8); // MOVEFILE_WRITE_THROUGH
Thanks guys i got it working now :)


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by TIPSYQUOJun 28, 2021 12:15 AM 15 539 Jun 28, 2021 12:15 AM
Last Post: _SaWan0_
[C#] by mersoSep 27, 2016 06:59 AM 9 371 Sep 27, 2016 06:59 AM
Last Post: merso
[.NET] by ImStwMar 26, 2015 10:18 AM 8 907 Mar 26, 2015 10:18 AM
Last Post: TazzyOpz