Jump to content
Tuts 4 You

.NET Reactor v6.3


whoknows

Recommended Posts

TobitoFatito
Spoiler
 
 
 
 
Spoiler

7BnF3rC.png

I haven't finished locals yet that's why all variables are object :D

Also im not sure about the string -_- after i jit dump i checked the vm runtime and it did produce that string

 

Steps:

1. Simple MSIL Decryptor by CodeCracker

2. Devirtualization tool i have been working on.

 

.Net Reactor imo has a **basic** to intermediate VM. i suggest you give this a try!

 

Tips on how to start:

1 Learn how CIL works / CIL fundamentals (there are some nice ebooks that i can't link here )

2 Learn how the assembly reader/writer of your choice works (dnlib for example)

3 Learn how a simple VM works ( https://github.com/TobitoFatitoNulled/MemeVM (the original creator of this vm left so this is a fork to keep the project alive))

 

Edited by CodeExplorer
  • Like 4
  • Thanks 1
Link to comment

a key:

Spoiler

AQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyALFitASwYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fIK04VIg0/n//sCvbki/6NzAc2yzHd3UzfyISTu6Hzsk3

i fixed de4dot for new reactor including method decryption, cflow etc... and finally devirt it.
there are tutorials about fixing de4dot/devirt in this forum including this topic as well.

 

Edited by CodeExplorer
  • Like 3
  • Thanks 2
Link to comment
TobitoFatito

awesome_msil_Out.exe

Approach:

1. Necrobit is a jit protection, so we use Simple MSIL Decryptor by CodeCracker  , and it shall be ran on NetBox

2. Code virtualization is a relatively new feature of .net reactor, added in version 6.2.0.0. Here is the approach i took (i did this about 6 months ago so my memory is kinda rusty ) : (Click spoiler to see hidden contents)

Spoiler
 
Spoiler
  • Analyzing the file we can see that only one method is virtualized.
  • hZtfeik.png
  • Start renaming, Renaming is a really important aspect of this.
  • Following the vm method call we end up on a big method, where fun begins. :D elGFLe4.png
  • We see that this method is only called once, which seems like a good place to start.
  • Zy23TPW.png
  • Following that method we reach here, where a binary reader is used to read a resource stream. WrDMWzQ.png
  • After making a good devirtualization base, this seems to be the first stage. (In my case i searched for resources with name length of 37 you might wanna do it differently)
  • Second stage i'd say is method locating, you simply wanna search for virtualized methods and get their ID and methoddef.
  • Back to the main method, the first for loop seems to be for method locals, the third seems to be for exception handlers, and the fourth seems to be for vm instruction deserializing.
  • k5UwU5F.png
  • Scrolling a bit more we finally reach the method that executes the instructions.
  • i8vVxx7.png ZP28QlB.png
  • ExecuteInstruction method is really important, and its gonna be used for pattern matching stage. I Simply searched for a method with 3200+ instructions and a switch opcode. You might wanna do it differently.
  • swbJKtu.png
  • eFyyHhy.png
  • This is how i pattern matched the opcodes
  • 4xl67ok.png
  • And here is an example
  • b5jsK2S.png
  • After we finish pattern matching the opcodes, its time for VM Method Dissasembling stage. I found that a good way to start is to loop the Decrypt2 variable that was initialized earlier. You will need to figure this out, method locals, exception handlers and vm instructions etc..
  • dcZw0ir.png
  • After method disassembling stage, its time for vm method recompiling/rebuilding. We convert the .net reactor vm instructions to CIL. I just looped through every vm method instruction and used a switch :D . Here is an example
  • caT0iPU.png
  • Final stage is method replacing, where we replace the body of every virtualized method with the translated body.
Edited by CodeExplorer
wtf is wrong with spoiler CE edit: fixed the spoiler
  • Like 20
  • Thanks 3
Link to comment
  • 2 months later...

Why was SychicBoy's post accepted by moderators?

* Code is not devirtualized at all, see Form01.method_2. That's not a properly unpacked file.
* Correct serial is not provided either.

There's just a simple patch which disables serial check - so, neither of unpackme's goals are achieved.

 

  • Like 1
Link to comment
On 6/11/2020 at 1:40 AM, Reza-HNA said:

a key:

  Reveal hidden contents

AQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyALFitASwYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fIK04VIg0/n//sCvbki/6NzAc2yzHd3UzfyISTu6Hzsk3

i fixed de4dot for new reactor including method decryption, cflow etc... and finally devirt it.
there are tutorials about fixing de4dot/devirt in this forum including this topic as well.

 

Send me fixed de4dot here or in PM, thank you

Link to comment
mohamedsalah
3 hours ago, SychicBoy said:

Its a unpack me file not a crack me, and i don't think you know anything about virtualization. 

Please guide me devirtualized😔🤑

Link to comment
CreateAndInject

 I think @SychicBoy don't know anything about virtualization rather than @kao

@SychicBoy See `awesome.Form01.method_1`, it just call `awesome.Form01.method_2` which is  just the stub of DNR virtualization

```

// awesome.Form01
[MethodImpl(MethodImplOptions.NoInlining)]
public static string method_2(string string_1)
{
    object[] array = Class01.method_03(0, new object[]
    {
        string_1
    }, null);
    return (string)array[0];
}

```

 

You didn't restore `awesome.Form01.method_1` at all.

Edited by CreateAndInject
Link to comment

 

5 hours ago, collins said:

@SychicBoy You should release the tool so people can test it.  Of course it is easy to prove whether you are correct.

Sure, i gonna release a unpacker for net reactor 6x soon. 

  • Like 4
  • Thanks 3
Link to comment
  • 2 weeks later...
  • 2 weeks later...
  • 2 months later...
  • 4 months later...
  • 4 weeks later...

@xpro

 

press view file, then on next screen on top right is a button writes DOWNLOAD, tested and working, today.

  • Thanks 1
Link to comment
  • 9 months later...
  • 4 weeks later...
  • 1 month later...

Hmm same for blackhats unpacked file seem not complet unpacked to me see screenshot:

Spoiler

image.png.2c6be0b8be8faf222c516156fb11fdba.png

 

Spoiler

image.png.deac8ab1be3d9567d660b994ef8901a7.png


if get this msg its not complett unpacked
and why all your exe this big?
my unpacked file is only around 90kb?

ha ha works even with out are serial to register it:
 

Spoiler

image.png.79882435886852662fdb28ab76fbc3fd.png

 

Edited by Underground
Link to comment
BlackHat
23 hours ago, Underground said:

Hmm same for blackhats unpacked file seem not complet unpacked to me see screenshot:

  Reveal hidden contents

image.png.2c6be0b8be8faf222c516156fb11fdba.png

 

  Reveal hidden contents

image.png.deac8ab1be3d9567d660b994ef8901a7.png


if get this msg its not complett unpacked
and why all your exe this big?
my unpacked file is only around 90kb?

ha ha works even with out are serial to register it:
 

  Reveal hidden contents

image.png.79882435886852662fdb28ab76fbc3fd.png

 

1. What you are showing in your 1st Snap is Called Smart Screen Filter. Learn more - https://support.microsoft.com/en-us/microsoft-edge/how-can-smartscreen-help-protect-me-in-microsoft-edge-1c9a874a-6826-be5e-45b1-67fa445a74c8
It usually appears on any file if the source of download is not trusted.

Currently, Windows many times give false warning that file is harmful if we download from tuts4you. @CodeExplorer also faced this and posted about it here - https://forum.tuts4you.com/topic/43475-notinfected/

2. are You kidding with me? In Your 2nd Snap, You posted an Antivirus warning. In RCE, It is so common. False warning is due to altered PE Headers (from Protection) or many times the Protection companies share the watermark of Cracked/Leaked version to Antivirus companies. It is done by lot of companies in the past as well. So as a result, Antivirus will flag those files as unsafe. For Example - Protect any Simple File with VMProtect Leaked Version and You see it will be flagged by Windows Defender.
(You know about dnSpy), So Open the File and See the Code before saying that It is not unpacked.

3. Why do you think my file is not unpacked ? just because It has Smart Filter warning. WOW ! Amazing Analysis. 
by the way, All methods are properly devirtualized and file is Unpacked well.

4. It works without Serial because I patched the method of Validation. I don't like to write Keygens or generate Valid Serials by understanding algo etc. (If I can access the code, I always follow the shortest path).

5. My all exe/s are of natural size what they should be after proper unpacking.



 

 

 

Edited by BlackHat
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...