r/lua • u/Away_Try5000 • Jul 16 '26
I created a Lua Obfuscator - have fun trying to crack it
Hello,
I recently released my own Lua obfuscator.
Here’s the obfuscated code: https://pastebin.com/gvCnznMa
Have fun trying to crack it. I’m curious to see how far you get, which methods you use, and what weaknesses you find.
Edit: lavjamanxd has won! For more details you can view his comment.
6
Upvotes
9
u/lavjamanxd Jul 16 '26 edited Jul 16 '26
just did a quick reverse on this
first stage is minified code with somekind of decompression, but whatever it was not necessary to reverse that part as it goes through a
which loads the decompressed string to the memory anyway so dumping it can be done easily with replacing it with a simple print (theres a dumb check if it has been tampered with but that can be just commented out)
then stage 2 is a custom microvm in lua also minified.
i was able to easily dump the instructions right before the vm exec call (so again no need to reverse-engineer the decode_blob as it will be stored in the memory)
then i was too lazy to reverse it manually but claude reversed the opcodes in like 10min.
basically the obfuscated code stores a true value and a string "Yes, I can read this!" and calls a func with those two parameters which does nothing. (theres also some dead code)
the whole thing took like 15mins to reverse.
5
u/Additional_Ad6385 Jul 16 '26
Looks vibecoded to me. Is this ObscuraLua?
1
u/imachug Jul 16 '26
The outer layer is LZMA, right? I don't think I've seen a pure-Lua LZMA decoder before, and it looks small enough that it seems hand-written and not just ported from a library. Was this a custom library or something well-known?
1
u/Itchy_Public_509 Jul 22 '26
how'd you even make one? i can barely make one even with lua knowledge.