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

C# 

ManagedRunPE | RunPE substitute for .NET assemblies

Here's my managed alternative to a RunPE. Works with x86->AnyCPU/x86 and x64->AnyCPU/x86/x64. It fully supports parameters and GUI applications. It's not going to follow any particular coding conventions so don't even mention it. It runs fine. It checks whether the assembly is actually managed or not before trying to load it. The Inject method returns a Boolean value indicating success or failure.

Usage:
Code
ManagedRunPE.Inject(byte[] buffer, bool emptybuffer, params string[] arguments);

Source code:
[Image: Syr3DlV.png]
Good work gigajew and thx for your contribution to the .Net section.
great work, thx 4 sharing the code with us.
i will play with it :)
Added detection for MTAThread/STAThread and implemented RtlZeroMemory(); to delete header in memory, added some null calls and garbagecollector collection
[Image: Syr3DlV.png]
I'm not an expert at RunPE or C# for that matter, but I have a question - does this inject the executable from which it was run into another executable, or the other way around? Or should I word it differently....does this code go into what we want to inject, or another process that is supposed to seem "legit"?
(Feb 22, 2018 04:00 PM)novak80 Wrote:  I'm not an expert at RunPE or C# for that matter, but I have a question - does this inject the executable from which it was run into another executable, or the other way around?  Or should I word it differently....does this code go into what we want to inject, or another process that is supposed to seem "legit"?

It basically just loads the assembly from a byte array and invokes the entrypoint method
[Image: Syr3DlV.png]
Updated and refactored code, clears memory properly & asynchronously invokes


Not compatible with Quasar at the moment
[Image: Syr3DlV.png]
Thanks for your effort. Tested it and looks good.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by DarkShadow2020May 18, 2023 09:01 PM 3 226 May 18, 2023 09:01 PM
Last Post: 0xDEAD10CC
[.NET] by snowman13Mar 12, 2021 03:28 AM 7 1,116 Mar 12, 2021 03:28 AM
Last Post: Joseph Ducreux
[.NET] by gigajewNov 3, 2020 08:41 PM 20 4,136 Nov 3, 2020 08:41 PM
Last Post: Menalix