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

C# 

[Share/OpenSource] LiteCode - The ultimate anti-cracker for .Net Framework

Hey guys whats up

I was thinking of sharing this because it's really awesome to have since there are just too many crackers now
So what LiteCode will do basically is connecting to a server using the SSP protocol (http://ssp.codeplex.com) for creating a encrypted/compressed secure connection
And what it will allow is asking the server if he will for us execute some code instead of the client having the code
So see it as a proxy for the code you want to execute

So for example a scenario without LiteCode:
1. You start ur crypter and u login
2. You fillin some settings and u press crypt
3. The crypter will now crypt your .exe but all the code is stored in the .exe and so if you bypass the login you're still able to crypt your file

A scenario with LiteCode:
1. You start ur crypter and u login
2. You fillin some settings and u press crypt
3. The crypter will now send his .exe you wanted to crypt + settings to the server so now at server side hes able to crypt your file and sending back the FUD .exe
This way you don't need the code at the crypter.exe so if they will bypass your login system they wouldn't be able to crypt ther file
And now you can even update the crypter remotely incase it will become detectable 🤝

What you'll get from using LiteCode:
Smaller executables
The private code will be 100% private
Your code cannot be seen anymore by a cracker or decompiler
No obfuscation required
The code can be updated remotely this will allow you quick bug fixing and no more .exe downloads everytime something is updated
Everyone is having the same version since all of your code is ran at the server everyone will use
Don't worry about JIT Hooking since this will be useless now

When your not using LiteCode:
Your code can be cracked/stolen
Everyone can see your code
You need to use obfuscation but even that can be deobfuscated by de4dot or any other deobfuscator
... and many more reasons

Github - Opensource: https://github.com/AnguisCaptor/LiteCode

Since you don't need a lot of knowledge about networking other then that u need to know how to port forward u'll be fine
Most of the code you write will look the same like you had before

For example lets take this class which is normally in your .exe
When you look at this example you can clearly see your password can be stolen
Code
class TestClass
{
    private string Password;
    public TestClass()
    {
        this.Password = "VerySecretPassword";
    }

    public string CallMe()
    {
        return "Hello World";
    }
}

Now lets take a look when your doing it in LiteCode
Client side class
Code
class TestClass : ITest
{
    public TestClass()
    {

    }

  [RemoteExecution]
    public string CallMe()
    {
        return "";
    }
}

Server side class:
Code
class TestClass : ITest
{
    private string Password;
    public TestClass()
    {
        this.Password = "VerySecretPassword";
    }

  [RemoteExecution]
    public string CallMe()
    {
        return "Hello World";
    }
}

As you can see the method bodies in the client side are empty but in the server side you can see the password and in CallMe what it returns "Hello World"
While in the client side you can't even see what it returns so that's for the server to decide
Also you can see both the server and client are using the ITest interface which is

Code
public interface ITest
    {
  string CallMe();
    }

Pretty straight forward interface, just 1 method "CallMe" and both in Server/Client classes you need to have the RemoteExecution attribute for security reasons
The code looks pretty much the same and you need to think about the the client side class methods will never be called it's just a dummy class
So now when your opening your .Net Reflector opening the client.exe you'll see there is no password what so ever
If you would do in the CallMe method "return this.Password;" only then you will get the password
Also keep in mind that you don't want to change anything in a Form or maybe calling API's since it will be done server sided
So all the code which has nothing to do design/visual u need to put it in the Litecode so it can stay hidden and not cracked
Now you can also create the best login system since no one can crack the server side code
You can simply create a login system and do extra checks at methods to see if ur really loggedin etc... if not don't execute the code it's that simple and it can't be executed by the cracker by forcing it

Here is example code you need to use for the server to get it up and running
Code
namespace Server
{
    class Program
    {
  static void Main(string[] args)
  {
    LiteServer server = new LiteServer(1234);
    server.onClientConnect += (Client c) =>
    {
    c.ShareClass("test", typeof(TestClass), c);
    };
    Console.WriteLine("Providing remote code at port 1234");
    Process.GetCurrentProcess().WaitForExit();
  }
    }

    class TestClass : ITest
    {
  public Client client;
  public TestClass(Client c)
  {
    this.client = c;
  }

  [RemoteExecution]
  public string TestMe()
  {
    return "Hello World, I bet u couldn't get this code above :)";
  }

  [RemoteExecution]
  public int GetRandomNumber()
  {
    Random rnd = new Random(DateTime.Now.Millisecond);
    return rnd.Next(int.MinValue, int.MaxValue);
  }
    }

    public interface ITest
    {
  string TestMe();
  int GetRandomNumber();
    }
}

Here is example code you need to use for the client to get it up and running
Code
namespace Client
{
    class Program
    {
  static void Main(string[] args)
  {
    LiteClient client = new LiteClient("YOUR IP ADDRESS", 1234);
    ITest test = client.GetSharedClass<ITest>("test", typeof(Dummy_Testy));
  }
    }

    public class Dummy_Testy : ITest
    {
  [RemoteExecution]
  public string TestMe()
  {
    return "";
  }

  [RemoteExecution]
  public int GetRandomNumber()
  {
    return 0;
  }
    }

    public interface ITest
    {
  string TestMe();
  int GetRandomNumber();
    }
}
any comments/questions are welcome 🤝
But you can also dump the code or ? and if anyone attack the server its useless or ? :/
(Jul 7, 2012 08:36 AM)CyNecx Wrote:  But you can also dump the code or ? and if anyone attack the server its useless or ? :/
You can't dump the code since it's being at server side and ye the down side is when ur server is down that the program stops working
I will be using this..for my project.

Thanks. =']
This seems to be really good. Going to check this out soon! Thumbs up
Edit: Just read the whole thread and it seems to be quite good. So this seems to be a quite good alternative for WCF (Windows Communication Foundation) which does almost the same thing!

Edit once more again: I was able to bypass and change the data recieved by a little trick, but that way could be avoided by a little bit of obfuscation and extra checks! Not uncrackable but could be used as a good anti to hide from kiddo's and actually good to hide shit from leechers that will just use de4dot and make a exact replica of good applications out there!
(Jul 7, 2012 08:40 AM)DragonHunter Wrote:  You can't dump the code since it's being at server side and ye the down side is when ur server is down that the program stops working

Can't you somehow get the dump of the code after it is transferred to the client?
(Jul 7, 2012 10:12 AM)( ͡° ͜ʖ ͡°) Wrote:  Can't you somehow get the dump of the code after it is transferred to the client?
No code is being transfered to the client, Only the return value from the method
I was working on some thing like this for my program :F damn you dragon you always beat me to the good stuff :G Looks good but code cant be 100% private cause you would still see it.

the download takes me to http://www.theinternetvshollywood.com/
MAKE REP GREAT AGAIN 2027
Although it's a good idea in theory (and possibly one of the best anti-cracking techniques up to this date) you do realise how many people have issues with this kind of licence systems right ? :p

A software that requires internet for pretty much all the core functions will probably lose a lot of credibility and possible buyers just of "DRM".
Can you change the download link or pm with a working one :F
MAKE REP GREAT AGAIN 2027
so what happens when someone MITM's the client/server by stripping out the encrypt/decrypt from the client and sends to your server malicious code which results in it getting hijacked, etc. etc.

edit: It would appear I read this wrong, since it seems the code is being sent s->c, apologies.

I for see this being used for purposes other than u intended though, lol.
(Jul 7, 2012 10:49 AM)infamousnoone Wrote:  so what happens when someone MITM's the client/server by stripping out the encrypt/decrypt from the client and sends to your server malicious code which results in it getting hijacked, etc. etc.

edit: It would appear I read this wrong, since it seems the code is being sent s->c, apologies.

I for see this being used for purposes other than u intended though, lol.
The client only sends to the server which method he has to call and he just executes that and sends back the result
So no code is being send to the server, but ye u can just go man in the middle and change the value like... from false to true and client will think ur loggedin orsomething
but what if 100% of ur code is being in LiteCode, If u make a variable called LoggedIn and as default it's false
U do at every single method "if(!LoggedIn) return;" then you has to be loggedin otherwise no method is going to execute
(Jul 7, 2012 10:17 AM)DragonHunter Wrote:  No code is being transfered to the client, Only the return value from the method

So all the code is being executed on the server, and the client just gets return values?
What if you need to write a file, or read a file from the HD. How is that going to work if the server does not have access to the client's physical machine?
(Jul 7, 2012 11:06 AM)( ͡° ͜ʖ ͡°) Wrote:  So all the code is being executed on the server, and the client just gets return values?
What if you need to write a file, or read a file from the HD. How is that going to work if the server does not have access to the client's physical machine?
For stuff like that ofcourse it wouldn't work but for alot of other code it will just work fine
or you can just use the server's hdd if you want ofcourse


Ok guys the link is updated I heard some people saying that it's redirecting u to some other site or whatever... so here is a new link
http://www.4shared.com/rar/JOjgDvda/LiteCode.html
Looks good. But I'm wondering why one can't make a simple TCP client/server?

Client sends 'hey execute function one'
Server sends 'okay executing, here is the return value ...'

Client handles return value and deals with it.

What exactly are the pros of it?

Oh and the download requires an account, you should up it to minus.com.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by junkyfeet900Aug 6, 2024 10:29 PM 3 391 Aug 6, 2024 10:29 PM
Last Post: junkyfeet900
[.NET] by fisica638Feb 8, 2024 08:07 AM 8 557 Feb 8, 2024 08:07 AM
Last Post: fisica638
[.NET] by QuobiAug 6, 2022 02:23 PM 0 407 Aug 6, 2022 02:23 PM
Last Post: Quobi