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

C# 

Assembly.Load(byte[]).EntryPoint.Invoke(null, null); Question

Okay, so im working on a packer called .NET Squeezer and im struggling.. ive made an Anti-Dump, yet it still dumps the files from Assembly.Load(byte[]).EntryPoint.Invoke(null, null); So i got thinking and thgouht, hmm.. mabie i can make a PE for .NET, so i worked on that, and it STILL Dumped, so i cringed and got pissed. Anyone know any kind of method or a way i can prevent Dumping while creating an instance with reflection?
Look at confuserex it has an anti dump
Read the source and see how it works
google c# anti dump and you should find the answer
[Image: bitcoin.png] Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP
Code
//just in case ur to lazy to google - idk where i got this from its old.
[DllImport("kernel32.dll")]
public static extern IntPtr GetModuleHandle(string lpModuleName);
[DllImport("kernel32.dll", SetLastError = true)]
static extern int VirtualProtect(uint lpAddress, int dwSize, int flNewProtect, uint lpflOldProtect);
[DllImport("Kernel32.dll", EntryPoint = "RtlZeroMemory", SetLastError = false)]
static extern void ZeroMemory(IntPtr dest, IntPtr size);
Code
uint dwOld = 0;
sbyte pBase = (sbyte)GetModuleHandle(null);
VirtualProtect((uint)pBase, 4096, 0x04, dwOld);
ZeroMemory((IntPtr)pBase, (IntPtr)4086);
(May 15, 2017 07:20 AM)DelusionalGhost Wrote:  Okay, so im working on a packer called .NET Squeezer and im struggling.. ive made an Anti-Dump, yet it still dumps the files from Assembly.Load(byte[]).EntryPoint.Invoke(null, null); So i got thinking and thgouht, hmm.. mabie i can make a PE for .NET, so i worked on that, and it STILL Dumped, so i cringed and got pissed. Anyone know any kind of method or a way i can prevent Dumping while creating an instance with reflection?

I'm basically parroting what others on their thread have said but looking at ConfuserEX is a worthwhile option. It's open-source and gives valid examples of how multiple confusion techniques are done.. IE protection against dumping. Head over to yck1509's git. I would link you but I can't post links. And I'd rather not incur a report for attempting to bypass this rule.
(May 16, 2017 06:22 AM)dzvtkfuqqe Wrote:  I'm basically parroting what others on their thread have said but looking at ConfuserEX is a worthwhile option. It's open-source and gives valid examples of how multiple confusion techniques are done.. IE protection against dumping. Head over to yck1509's git. I would link you but I can't post links. And I'd rather not incur a report for attempting to bypass this rule.

Thanks man, i appreciate your help!


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by Julius013Mar 2, 2022 05:12 PM 4 313 Mar 2, 2022 05:12 PM
Last Post: Julius013
[C#] by gigajewJul 26, 2018 07:38 PM 10 802 Jul 26, 2018 07:38 PM
Last Post: techcrunch
[.NET] by InfirmaryJun 24, 2018 06:40 PM 1 143 Jun 24, 2018 06:40 PM
Last Post: gigajew