Thread: Lua Obfuscator

Results 1 to 13 of 13
  1. #1
    Fatulatti's Avatar
    Join Date
    Jun 2016
    Gender
    male
    Posts
    179
    Reputation
    10
    Thanks
    1,452

    Lua Obfuscator

    Okay, so, I've been working on this for probably like 2 hours as a "fun" project.
    I'll keep on adding more "mechanisms" and obfuscation strategies over the time.
    If anyone got suggestions, feel free to hit me up.

    Make sure not to use " but ' instead for now.


    Obfuscator: https://obf.finn.gg/

  2. The Following User Says Thank You to Fatulatti For This Useful Post:

    suchisgood (12-26-2018)

  3. #2
    suchisgood's Avatar
    Join Date
    Feb 2014
    Gender
    female
    Posts
    902
    Reputation
    10
    Thanks
    562
    My Mood
    Angelic
    Quote Originally Posted by Fatulatti View Post
    Okay, so, I've been working on this for probably like 2 hours as a "fun" project.
    I'll keep on adding more "mechanisms" and obfuscation strategies over the time.
    If anyone got suggestions, feel free to hit me up.

    Make sure not to use " but ' instead for now.


    Obfuscator: https://obf.finn.gg/
    Nice man testing it out to see if it works! doesn't work it spams text and everything like infinite times and errors!

    Can i see the source code i'm a php developer aswell i know the basics!
    <?php

    echo "hello";

    ?>
    When decoded looks like spam aswell means slow coding!
    Last edited by suchisgood; 12-26-2018 at 02:14 PM.

  4. #3
    Fatulatti's Avatar
    Join Date
    Jun 2016
    Gender
    male
    Posts
    179
    Reputation
    10
    Thanks
    1,452
    Quote Originally Posted by suchisgood View Post
    Nice man testing it out to see if it works! doesn't work it spams text and everything like infinite times and errors!

    Can i see the source code i'm a php developer aswell i know the basics!


    When decoded looks like spam aswell means slow coding!
    Yeah, I was updating. Works completely fine now!
    I'm using Laravel for all my sites btw.

  5. #4
    suchisgood's Avatar
    Join Date
    Feb 2014
    Gender
    female
    Posts
    902
    Reputation
    10
    Thanks
    562
    My Mood
    Angelic
    Quote Originally Posted by Fatulatti View Post
    Yeah, I was updating. Works completely fine now!
    I'm using Laravel for all my sites btw.
    oh nice just looked it up seems like clean coding! much eaiser to do!

    There are errors!
    Last edited by suchisgood; 12-26-2018 at 02:41 PM.

  6. #5
    Disterso's Avatar
    Join Date
    Oct 2017
    Gender
    male
    Posts
    15
    Reputation
    10
    Thanks
    0
    How to deobfuscate:
    Put "RunString = print;" at top of script and run in lua executor like repl.it

  7. #6
    Fatulatti's Avatar
    Join Date
    Jun 2016
    Gender
    male
    Posts
    179
    Reputation
    10
    Thanks
    1,452
    Quote Originally Posted by Disterso View Post
    How to deobfuscate:
    Put "RunString = print;" at top of script and run in lua executor like repl.it
    Fixed that. Not possible anymore.

  8. #7
    Cyaegha's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Posts
    536
    Reputation
    17
    Thanks
    526
    Things wrong with this:
    1. Making a fuck ton of globals.
    2. Using stupidly long var names.
    3. Using readable characters instead of zero width characters.
    4. All you do to obfuscate the actual code is reverse it and convert it to decimal.
    5. All you need to do is 'CompileString = function(c, n, e) return function() print(c) end end' to get the actual code.
    6. A more complex way of deobfuscation would be to just convert all the decimal to characters and then you could just read the code yourself.
    7. 'Lua Obfuscator by Finn'

    Overall this obfuscator is pretty lame. If anybody that knows a fair bit of Lua sees one of these obfuscated scripts they'll know how to deobfuscate it. You should take a look at proper obfuscation.
    Last edited by Cyaegha; 01-10-2019 at 07:11 AM.

  9. #8
    Fatulatti's Avatar
    Join Date
    Jun 2016
    Gender
    male
    Posts
    179
    Reputation
    10
    Thanks
    1,452
    Quote Originally Posted by Cyaegha View Post
    Things wrong with this:
    1. Making a fuck ton of globals.
    2. Using stupidly long var names.
    3. Using readable characters instead of zero width characters.
    4. All you do to obfuscate the actual code is reverse it and convert it to decimal.
    5. All you need to do is 'CompileString = function(c, n, e) return function() print(c) end end' to get the actual code.
    6. A more complex way of deobfuscation would be to just convert all the decimal to characters and then you could just read the code yourself.
    7. 'Lua Obfuscator by Finn'

    Overall this obfuscator is pretty lame. If anybody that knows a fair bit of Lua sees one of these obfuscated scripts they'll know how to deobfuscate it. You should take a look at proper obfuscation.
    The "Lua Obfuscator by Finn" thingy was never meant to be left in, actually I left it for debugging purposes.
    Other than that, you are correct. Thank you for not insulting immediantly, but rather giving useful feedback!
    Sadly there's no good ways to obfuscate Lua I'm aware of, but I am trying another technique later today.


    //Edit:
    1. Made them local.
    2. They're used to you're having a hard time to deobfuscate it via hand.
    3. Correct, will fix.
    4. Added some more stuff.
    5. Fixed.
    6. That's why there's the long var names.
    7. Removed, as I said, wasn't meant to be left.
    Last edited by Fatulatti; 01-10-2019 at 06:16 PM.

  10. #9
    Cyaegha's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Posts
    536
    Reputation
    17
    Thanks
    526
    Most of the problems I mentioned are still there? The only thing I've noticed that changed is using underscores instead of capital letters for the variable names.

    Literally all you have to do is convert the decimal and voila, you've deobfuscated it. Your junk code isn't even junk in the way it's suppose to be, it's just bad and serves no purpose other than to increase the file size by a massive amount. You don't even remove excess whitespace in the code to make it slightly less readable without putting it through a beautifier/formatter. You're still making all of your junk variables global and literally the only obfuscation you've done to the original code is reverse it.

    And what do you mean there's no good way to obfuscate Lua? Did you not look at the pastebin I posted? Most people get confused enough with !CAC's vehicle.lua and that's magnitudes more obfuscated than vehicle.lua. To make a proper obfuscator you just need to parse the code and generate an AST then rebuild it with the obfuscated changes. There are plenty of opensource Lua parsers you can paste from.

    This is what I meant by converting decimal. All that's left is to reverse what's left.

  11. #10
    zerothe's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    68
    Reputation
    10
    Thanks
    13
    Quote Originally Posted by Cyaegha View Post
    Things wrong with this:
    1. Making a fuck ton of globals.
    2. Using stupidly long var names.
    3. Using readable characters instead of zero width characters.
    4. All you do to obfuscate the actual code is reverse it and convert it to decimal.
    5. All you need to do is 'CompileString = function(c, n, e) return function() print(c) end end' to get the actual code.
    6. A more complex way of deobfuscation would be to just convert all the decimal to characters and then you could just read the code yourself.
    7. 'Lua Obfuscator by Finn'

    Overall this obfuscator is pretty lame. If anybody that knows a fair bit of Lua sees one of these obfuscated scripts they'll know how to deobfuscate it. You should take a look at proper obfuscation.
    this is aids, but not hard. took around 2 hours.

    https://csgofoodreviews.com/bp/moat_ac.lua

  12. #11
    theawesomerb's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    2
    My Mood
    Aggressive
    is there a way to un-obfuscate a code ?!

  13. #12
    Fatulatti's Avatar
    Join Date
    Jun 2016
    Gender
    male
    Posts
    179
    Reputation
    10
    Thanks
    1,452
    Quote Originally Posted by Cyaegha View Post
    Most of the problems I mentioned are still there? The only thing I've noticed that changed is using underscores instead of capital letters for the variable names.

    Literally all you have to do is convert the decimal and voila, you've deobfuscated it. Your junk code isn't even junk in the way it's suppose to be, it's just bad and serves no purpose other than to increase the file size by a massive amount. You don't even remove excess whitespace in the code to make it slightly less readable without putting it through a beautifier/formatter. You're still making all of your junk variables global and literally the only obfuscation you've done to the original code is reverse it.

    And what do you mean there's no good way to obfuscate Lua? Did you not look at the pastebin I posted? Most people get confused enough with !CAC's vehicle.lua and that's magnitudes more obfuscated than vehicle.lua. To make a proper obfuscator you just need to parse the code and generate an AST then rebuild it with the obfuscated changes. There are plenty of opensource Lua parsers you can paste from.

    This is what I meant by converting decimal. All that's left is to reverse what's left.
    The Junk variables aren't global.
    Other than that, you're correct. I'll try improving it over time.
    Keep in mind the obfuscator is just a quick online solution.

  14. #13
    suchisgood's Avatar
    Join Date
    Feb 2014
    Gender
    female
    Posts
    902
    Reputation
    10
    Thanks
    562
    My Mood
    Angelic
    Quote Originally Posted by Fatulatti View Post
    The Junk variables aren't global.
    Other than that, you're correct. I'll try improving it over time.
    Keep in mind the obfuscator is just a quick online solution.
    explain why it spams alot of stuff when i only want mine to be obfuscated can u put a tick box? to have spam or not

Similar Threads

  1. [Help] How do i de obfuscate a lua code
    By ppop222 in forum Garry's Mod Discussions & Help
    Replies: 12
    Last Post: 11-15-2018, 09:16 AM
  2. How do i de obfuscate a lua code
    By ppop222 in forum Garry's Mod Hacks & Cheats
    Replies: 1
    Last Post: 11-14-2018, 02:40 AM
  3. [Solved] Lua De Obfuscate
    By jefferywinner in forum Garry's Mod Discussions & Help
    Replies: 9
    Last Post: 01-05-2016, 11:05 PM
  4. [Article]Obfuscation[Tutorial]
    By Lolland in forum Visual Basic Programming
    Replies: 26
    Last Post: 03-15-2010, 08:12 AM
  5. America's Army No Recoil/Reload LUA code.
    By MagikBullet in forum General Game Hacking
    Replies: 7
    Last Post: 02-25-2007, 10:11 AM