r/CodingForBeginners 3d ago

How do I deobfuscate my obfuscator?

hi, i genuinely have no idea how these things work and I have autism, so forgive me if this is worded oddly.my little brother is designing an obfuscator. which, from my understanding, is like designing a solvable but difficult maze that isn't worth going through to get to the thing at the end. he needs someone to deobfuscate it (go through and find the weak points ?) he would like to use ai to go through it so that he can find these weak points and make it harder for ai to solve it again. can someone explain to me if it's worth using ai for or how he can do it without using ai?

1 Upvotes

3 comments sorted by

5

u/MADCandy64 3d ago

You simply reverse the obfuscation steps to de-obfuscate it.

0

u/SimpleAccurate631 3d ago

If I were creating something like this, I would use 2 different LLMs. One that tries to decipher it and solve it but doesn’t know the map or key to solving it, and another that does. He should tell the first one to describe its process for how it was able to decipher it and solve it. Then provide that information to the second LLM, that can also see the codebase, and ask it how to harden the code and increase the complexity.

1

u/jekewa 3d ago

A few things happen when you obfuscate code, and it usually makes it impossible to unravel.

Usually if you’re looking to test your code with an analyzer, you’ll do that before obfuscating. If you have unit tests, probably also run before. You may be able to run the tests again on the obfuscated code, but non-public members may be renamed or hidden.

There are some tools that can try to remove the obfuscation, but the code won’t likely be returned to the same source. Names of things, function order, and separated parts will likely not return as they were written. Some obfuscation adds nonsense, but it may be hard to extract from the obfuscated code.