Created
August 6, 2016 16:34
-
-
Save guillaC/1a9bcf5f8953978a484527ee4247f3a3 to your computer and use it in GitHub Desktop.
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