2

Is it possible to write a small "loader" in C++ that should load a C# app?

The idea is to make it impossible to see the code in Reflector.

Check the following app. The app is written in C# but somehow a loader has been built so its impossible to see the actual source code in Reflector.

https://www.dropbox.com/sh/b0enylff5wptd7s/Ingphu4bXK/AccountMaster.0mmo.net.rar

Edit: Im not sure if the app is safe to run!

But very interesting what happens when you try to put it into Reflector!

When i saw it i thought it might be a smart way to keep "newbie" crackers away.. Good way to add more security to a C# app. Thats why im wondering how that is done :)

Elvin
  • 367
  • 3
  • 5
  • 16
  • How about running it through a commercial obfuscator? You're basically asking for non-reversible DRM here in a form of a "small 'loader'". If it were that easy there would be no piracy. You cannot make anything impossible unless you decrypt opcodes directly to the core - you can only make something more inconvenient, time consuming and harder to crack. – Shark Oct 22 '12 at 12:58
  • The funny thing is Reflector says "Not a .NET..." when you try to add it in.. But i am 100% certain the application is written in .NET.. just wondering how they achieved that – Elvin Oct 22 '12 at 12:59
  • Isn't this just ngen ? It's a compiler for .net. It takes your program and makes a native app out of it. It does the JIT does in advance if you will. – J.N. Oct 22 '12 at 13:08
  • 1
    If you are referring to "Update.exe" in that download, they used [Dotfuscator](http://www.preemptive.com/products/dotfuscator/overview) to obfuscate that code. I found this by using [dotPeek](http://www.jetbrains.com/decompiler/). Obfuscation doesn't get you completely hidden code, but neither will a C++ app. If someone wants to see your source code, they will find a way. – TylerOhlsen Oct 22 '12 at 14:06
  • I think this question would fit better in http://security.stackexchange.com/ – Gabber Oct 22 '12 at 14:25
  • Such a tool is called a ".NET obfuscator". Use google or the Search box at the upper right of this page. – Hans Passant Oct 22 '12 at 15:41

2 Answers2

0

Yes, you can launch a C# application from C++ (or really any other language application for that matter). Just start a separate process from your C++ application. There are many ways to do this. I would recommend searching for "Create Process" in your favorite search engine.

Here's a another post on stack overflow.

Community
  • 1
  • 1
TylerOhlsen
  • 5,485
  • 1
  • 24
  • 39
0

A C++ front end won't help, all you would have to do is load the same thing this front end loader loaded. Pretty much the only thing to do is go with an obfuscator. There is one that ships with VS called dotfuscator community edition to get you started.

stonemetal
  • 6,111
  • 23
  • 25