antidump .net / does not work on GUI app. based on the work of ricardojrdez ( https://goo.gl/t1WNVp )
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Protected | |
{ | |
using System; | |
using System.Runtime.InteropServices; | |
internal class Program | |
{ | |
[DllImport("kernel32.dll")] | |
public static extern bool ZeroMemory(IntPtr Destination, int Length); | |
[DllImport("kernel32.dll")] | |
public static extern IntPtr GetModuleHandle(string lpModuleName); | |
[DllImport("kernel32.dll")] | |
static extern bool VirtualProtect(IntPtr lpAddress, uint dwSize, uint flNewProtect, out uint lpflOldProtect); | |
private static void Main(string[] args) | |
{ | |
DoSomeFaggoterie(); | |
Console.WriteLine("Dump me."); | |
Console.ReadLine(); | |
} | |
private static void DoSomeFaggoterie() | |
{ | |
uint oldProt; | |
VirtualProtect(GetModuleHandle(null), 4096, 0x04, out oldProt); // Change protection of memory zone | |
ZeroMemory(GetModuleHandle(null), 4096); //Delete header | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment