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

.NET 

CLR Processes

Hi everyone , today I'm gonna talk about CLR processes. What are these ?

Wikipedia :
The Common Language Runtime (CLR) is the virtual machine component of Microsoft's .NET framework and is responsible for managing the execution of .NET programs. In a process known as Just-in-time compilation, the compiled code is converted into machine instructions that, in turn, are executed by the computer's CPU. The CLR provides additional services including memory management, type safety and exception handling. All programs written for the .NET framework, regardless of programming language, are executed by the CLR. It provides exception handling, garbage collection and thread management. CLR is common to all versions of the .NET framework.
The CLR is Microsoft's implementation of the Common Language Infrastructure (CLI) standard.


tl;dr :
Note : still have .NET dependencies.
Allow to run managed code as native on runtime.

Wikipedia :

[img]http://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/CLR_diag.svg/800px-CLR_diag.svg.png[/img]

Point of interest :
Since CLR process have that particularity, you can also inject any kind of bytes into the process.

Quick exemple :

[img]http://flashgamesfactory.magix.net/public/CLR.gif[/img]

How compile a CLR file ?

- You will need : visual C++

Create a new CLR project :

[img]http://s10.postimg.org/ub9u17ejt/image.png[/img]

Click on your project in solution explorer then on "add" -> "New Item".

[img]http://s16.postimg.org/zcj7cpnn9/image.png[/img]

Click on "UI" and "Windows Form".

[img]http://s2.postimg.org/qudu3l6yh/image.png[/img]

Double click on [Yourprojectname].cpp

[img]http://s18.postimg.org/h512jveu1/image.png[/img]

Add the following :

Quote:using namespace System;
using namespace System::Windows::Forms ;

[STAThread]
void Main (array<String^>^ args)
{
Application::SetCompatibleTextRenderingDefault (false);
[Yourprojectname]::MyForm form;
Application::EnableVisualStyles();
Application::Run(%form);

}

Go to your project's properties.

[img]http://s13.postimg.org/6u08uz1af/image.png[/img]

Under "Linker" > "System" , set "SubSystem" to "Windows".

[img]http://s11.postimg.org/nkdfe8rn7/image.png[/img]

Under "Linker" > "Advanced" , set "Entry Point" to your main class, in this case : Main

[img]http://s17.postimg.org/l8q3cis27/image.png[/img]

And you're done ! 🎉 You can now debug/build it.

Have fun 🤝
Accepting freelancing jobs ! PM me for more info !
Be the [BRAND NAME REMOVED] king ..
No replies? Damn this is some pretty cool shit. Thank you.
You have no friends on the internet.
This is the Visual Basic section.
Belongs here Mobile Development
(Apr 3, 2013 10:48 AM)$uicidal Wrote:  This is the Visual Basic section.
Belongs here Mobile Development

I know its vb section , I'm just showing that you can inject managed to native process compiled under CLR.. Did you read the thread ? Actually the point of this , was that. 😑
Accepting freelancing jobs ! PM me for more info !
Be the [BRAND NAME REMOVED] king ..
(Apr 3, 2013 10:48 AM)$uicidal Wrote:  This is the Visual Basic section.
Belongs here Mobile Development

This section in is not only the Visual Basic section, but also the .NET Framework section. This uses native C++, but managed C++ as well, which uses the .NET framework.

@OP: Pretty interesting stuff. keep it up!
https://github.com/Washi1337

"I'll tell you this UDP joke, and I don't care if you will get it or not."
Get ready to see a flood of crypters that use this in the marketplace.

inb4noobsstartcodingcrypters
pretty interesting, i won't use this, but gj OP :)
Really interesting..but, lets suppose i want to inject managed in this CLR process... i will need a drop first. Correct?

[Image: Lymnm1L.jpg]

already been posted b4 few times ... maybe for the new guys
Not sure how this is interesting, since you can inject both Native, managed files in your managed process too.. It worked when i tried to inject crypted msgbox written in freebasic in-to my crypter stub.
(Apr 3, 2013 04:35 PM)ScΛrƒΛc3_ Wrote:  Really interesting..but, lets suppose i want to inject managed in this CLR process... i will need a drop first. Correct?

Sorry for late reply, Actually you don't. I read somewhere you can load this in memory and since you code it, you can set your entrypoints etc. You can probably use a dll instead tho.
Accepting freelancing jobs ! PM me for more info !
Be the [BRAND NAME REMOVED] king ..


Possibly Related Threads...
Thread / Author Replies Views Last Post
by ByteDoktorFeb 26, 2025 01:24 PM 0 146 Feb 26, 2025 01:24 PM
Last Post: ByteDoktor
[C] by georgeziozasJan 19, 2021 12:14 AM 2 180 Jan 19, 2021 12:14 AM
Last Post: Juice
[C#] by aesopfablesSep 16, 2020 06:38 AM 4 268 Sep 16, 2020 06:38 AM
Last Post: aesopfables