LoGiC.NET is a free and open-source .NET obfuscator using dnlib. It is currently under a rewrite.
dnlib v3.6.0
A free and open-source .NET obfuscator using dnlib.
License: MIT License
Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Mrgato\Desktop\TokenJuaker_protected.exe'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.File.InternalWriteAllBytes(String path, Byte[] bytes, Boolean checkHost)
at LoGiC.NET.Program.Main(String[] args)
i think because the obfucator tryes to make the file in desktop when thath is not my path i realy prefere to save the obfuscated file creating a directory named confused and then saving it inside
Can you please add an example on how to use this Obfuscator to encrypt a N-tier .net Core MVC application?
Or any example would be good.
Ofc this won't work because nested methods bad but here's an idea I've always had for c# obfuscation:
void Main(string[] args) {
Console.WriteLine("Hello, World!");
}
Main(args);
Now you may think "oh that's not that bad", but link multiple nested methods together and combine them with other existing obfuscation techniques and everything is chaos. Another idea (ofc its probably implemented) is to abuse interpolated strings, eg:
string iliilllli = $"{$"{$"{$"Hello, World!"}"}"}";
Now you see how insane this can get? Once again combine this with the current obfuscation to get an insane mess.
It is not working with the binary attached.
Pass: yesiam
yesiam.zip
After the recent changes protected files are massive. A 7kB file after protection is over 2MB.
Hi. After compilation trying to run:
[Loading module]
Unhandled exception. System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Program.<Main>$(String[] args) in C:\Users\admin\Desktop\LoGiC.NET.v2\Program.cs:line 4
UPD.
Solved (forgot path). But i can't find output file.
How to use? Thanks.
Hello,
Thank you for this project,
I have the following error with my file:
Preparing obfuscation...
Renaming...
Renamed 1560 methods.
Renamed 1508 parameters.
Renamed 883 properties.
Renamed 580 fields.
Renamed 0 events.
Adding junk methods...
Added 3666 junk methods.
Adding proxy calls...
Added 2059 proxy calls.
Encoding ints...
Unhandled Exception: System.OverflowException: Arithmetic operation resulted in an overflow.
at LoGiC.NET.Utils.Randomizer.GenerateRandomString(Int32 size)
at LoGiC.NET.Protections.IntEncoding.Execute()
at LoGiC.NET.Program.Main(String[] _)
Moreover, it seems SharpConfigParser is missing.
Thank you in advance for your help,
LoGiC.NET obfuscator looks good, but I have found some issues with renaming...
I had to made some cosmetic changes in LoGiC.NET for my needs.
InvalidMetadata
protection, because IIS server does not support such protected libraries with invalid metadata.
Protection[] protections = new Protection[]
{
new Renamer(),
new AntiTamper(),
new JunkDefs(),
new StringEncryption(),
new AntiDe4dot(),
new ControlFlow(),
new IntEncoding(),
new ProxyAdder(),
// new InvalidMetadata()
};
//if (CanRename(type))
//{
// // Hide namespace
// type.Namespace = string.Empty;
// type.Name = Randomizer.String(MemberRenamer.StringLength());
//}
public static bool CanRename(object obj)
{
DefAnalyzer analyze;
if (obj is MethodDef method) analyze = new MethodDefAnalyzer();
else if (obj is PropertyDef prop) analyze = new PropertyDefAnalyzer();
else if (obj is EventDef) analyze = new EventDefAnalyzer();
else if (obj is FieldDef) return false;
else if (obj is Parameter) analyze = new ParameterAnalyzer();
else if (obj is TypeDef) return false;
else return false;
return analyze.Execute(obj);
}
ProxyCallsIntensity: 0
In my project, I came to an exception of calling an internal method with the original name in the same class's public constructor, but the declaration of the method was renamed after the obfuscation!!! :-(
public MyService(IDependency dependency) : base(dependency)
{
InitData();
}
...
// original InitData()
internal void rgrehrehrehzhwefwegweh()
{
}
Unfortunately, I could not reproduce this issue creating a new sample project (TestAppToObfuse), but I have found a similar one...
Method not found: 'Void TestAppToObfuse.Services.SomeServiceBase.set_PreviousResult(System.String)`
As you can see after disassembling, protected non-internal method DoItInner(string what)
of SomeService
is renamed - it should be not in my opinion, because it is visible outside the assembly as it is protected method in a public class. I know, that it is not a public well known interface, but some class could count with the original name as it would like to inherit it.
Many thanks for any help to solve these issues! (Specially My Project Issue or Sample Project Issue 1).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.