Hack Forums
[C] .net framework 2.x, 4.x to native win32 - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C] .net framework 2.x, 4.x to native win32 (/showthread.php?tid=6026920)



.net framework 2.x, 4.x to native win32 - SIM-3991524 - Nov 21, 2019

Does anyone know of a good solution for wrapping a .net exe in a native loader that invokes the .net runtime and loads the .net exe from memory?

I remember a while back there was a "net2nat" site that was up, its entirely possible

This is relevant to the C++ section as the loader is native win32


RE: .net framework 2.x, 4.x to native win32 - SIM-3991524 - Nov 26, 2019

really nobody? I've done this before but it required a .net .dll to be written to disk. Is it possible to do entirely in memory?


RE: .net framework 2.x, 4.x to native win32 - Zephyros - Nov 27, 2019

It's over in the csharp section, by gigajew. Admittedly probably the wrong section.

Also just googling clr hosting would have given you some helpful resources too.


RE: .net framework 2.x, 4.x to native win32 - HFDone - Nov 27, 2019

RunPE .net


RE: .net framework 2.x, 4.x to native win32 - Arenna - Nov 27, 2019

(Nov 27, 2019 04:20 AM)Zephyros Wrote:  It's over in the csharp section, by gigajew. Admittedly probably the wrong section.

Also just googling clr hosting would have given you some helpful resources too.

I would really really love to see this (the thread posted by gigajew), but I can't seem to find it. I recall he released some .net assembly process injection stuff not too long ago but that's obviously a different thing. Seems to be a talented coder.

OP the only way I knew of with absolutely 0 drops was inside of a sort of VM wrapper. This significantly reduces performance and increases filesize though. If gigajew released something then that is a different story of course.


RE: .net framework 2.x, 4.x to native win32 - HFDone - Nov 27, 2019

(Nov 27, 2019 11:32 AM)Arenna Wrote:  I would really really love to see this (the thread posted by gigajew), but I can't seem to find it. I recall he released some .net assembly process injection stuff not too long ago but that's obviously a different thing. Seems to be a talented coder.

OP the only way I knew of with absolutely 0 drops was inside of a sort of VM wrapper. This significantly reduces performance and increases filesize though. If gigajew released something then that is a different story of course.

"This is relevant to the C++ section as the loader is native win32"


RE: .net framework 2.x, 4.x to native win32 - Jean-Jacques Rousseau - Jan 28, 2020

Hello,

This can do it.

https://hackforums.net/showthread.php?tid=6044542

Nothing is written to disk.


RE: .net framework 2.x, 4.x to native win32 - morph - Jan 29, 2020

(Jan 28, 2020 12:09 PM)Supercut Wrote:  Hello,

This can do it.

https://hackforums.net/showthread.php?tid=6044542

Nothing is written to disk.

This requires the .NET framework to be installed, not what OP is asking for.


RE: .net framework 2.x, 4.x to native win32 - Jean-Jacques Rousseau - Jan 29, 2020

(Jan 29, 2020 10:00 AM)morph Wrote:  This requires the .NET framework to be installed, not what OP is asking for.

” Does anyone know of a good solution for wrapping a .net exe in a native loader that invokes the .net runtime and loads the .net exe from memory?”

That is exactly what my code does. If he wanted to silently install .NET, he would say so. It is still in Beta so I would need OPs feedback.


RE: .net framework 2.x, 4.x to native win32 - Goodies - Jan 29, 2020

https://github.com/dotnet/corert/blob/master/Documentation/intro-to-corert.md

This will compile CIL to machine code.
They also provide a C++ transpiler.

https://github.com/dotnet/corert/blob/master/Documentation/how-to-build-and-run-ilcompiler-in-console-shell-prompt.md


RE: .net framework 2.x, 4.x to native win32 - gigajew - Jan 30, 2020

Here's my version of this https://hackforums.net/showthread.php?tid=6005424 requires dll on disk but that's it. Also you've obviously never heard of donut by the wover. This can convert your .NET assembly into a native (C++) shellcode loader, and your stub embedded or downloaded remotely. Works awesome and requires no dropped files to disk. Here's donut: https://github.com/TheWover/donut


RE: .net framework 2.x, 4.x to native win32 - some1 - Mar 11, 2020

Hi, I'm new to this game. Is there any tool to convert .NET exe to native?

I want to execute the Exe on my computer which has no .NET Framework installed. If there is any better way to do this then convert it, please tell me.