Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

LiquidBounce Forum

  1. Home
  2. ScriptAPI
  3. [TUTORIAL] How to deobfuscate (most) scripts on this forum

[TUTORIAL] How to deobfuscate (most) scripts on this forum

Scheduled Pinned Locked Moved Unsolved ScriptAPI
5 Posts 4 Posters 2.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • LiquidOnTopL Offline
    LiquidOnTopL Offline
    LiquidOnTop
    wrote on last edited by
    #1

    Requirement:

    • js knowledge
    • knowing how to use the terminal (install + run programs)
    • a code editor
    • a brain

    Step 1: Obtain the obfuscated script:

    In this example, I'll use BetterCriticals.

    Before deobfuscation:
    image

    Step 2: Basic deobfuscator and formatter

    • install nodejs (only once)
    • install synchrony
    • create a config file with the following content:
    rename: true
    loose: true
    sourceType: "script"
    
    • put the obfuscated script and the above config file in the same directory, open cmd.exe/terminal and run synchrony -c config [NAME] where name is the file name of the obfuscated script.

    Now the script should look like this:
    image

    Step 3: use brain

    Quick reminder:

    var flyModule = moduleManager.getModule('Fly')
    

    can be obfuscated into

    var flyModule = moduleManager['getModule']('Fly')
    

    and then those strings can be hidden inside a table and used via a decode function (a function that takes an index into the strings table and return the deobfuscated string).

    Use your brain now: what's the decode function in this script:
    image

    If you can't see that the decode function is axolotl_b, stop reading this, else proceed to step 4.

    Step 4: transformer

    Wouldn't it be nice if we can write a program that convert
    image

    into
    image

    by replacing each call of axototl_b with the result of that call?

    4.1: transformer base

    The variable axototl_a contains the encrypted string table for this script so copy that into a new file called transformer.js
    image

    4.2: remove anti debugger and anti formatter:

    Take a look at the decode function:
    image

    Again, if you can't see the part that prevents debugging and formatting, quit reading. For everyone else it's this part:
    image

    WCaJFG only succeeds if tPYtSP is a obfuscated function (in this case, have no newline which our deobfuscated one does). So uhm, remove it I guess.

    fS here is also another anti debug function:
    image

    So by now, you should know what to copy and what to not copy to your transformer.js. Mine look like this.

    4.3: processing input

    First, read read from stdin line by line and String.replace(), particularly the part that cover Specifying a function as the replacement.
    Now add this to your transformer.js:

    function replacer(match, p1, offset, string) {
      return "'" + axolotl_b(p1) + "'";
    }
    function processLine(line) {
      line = line.replaceAll(
        /axolotl_b\('([0-9A-Fa-fxX]+)'\)/g,
        replacer
      );
      console.log(line) // print modified
    }
    
    process.stdin.pipe(require('split')()).on('data', processLine) // for each line, run ProcessLine
    

    Now your transformer.js should look like this. Before running your transformer, run npm install split first.

    Now, run node transformer.js < crits.cleaned.js > crits.js (pretty sure this works on windows too, tested on linux) with crits.cleaned.js being the file produced in step 2 and crits.js is the name of the new file.

    The (almost) deobfuscated script should look like this file or this image:
    image

    Feel free to remove everything before the line

    var scriptName = 'BetterCriticals'
    

    as that is the beginning of most normal script and everything before it have no use from now.

    Step 5: last synchrony

    Repeat step 2 on the file produced by step 4. You should get something similar to this:
    image

    Step 6: Rename variables

    You read the entire thing and have a working brain, I believe you can do this yourself.

    Questions u may have:

    • I need more example: check out my other post in which I deobfuscated? using the same technique.
    • Bad english: yes ik english is not my first language.
    • Setup: images taken from Code OSS with Atom One Dark color scheme, running on Artix Linux.

    Questions I have:

    • What's the name (and creator) of this obfuscator?
    kawaiinekololisK 2 Replies Last reply
    3
    • LiquidOnTopL LiquidOnTop

      Requirement:

      • js knowledge
      • knowing how to use the terminal (install + run programs)
      • a code editor
      • a brain

      Step 1: Obtain the obfuscated script:

      In this example, I'll use BetterCriticals.

      Before deobfuscation:
      image

      Step 2: Basic deobfuscator and formatter

      • install nodejs (only once)
      • install synchrony
      • create a config file with the following content:
      rename: true
      loose: true
      sourceType: "script"
      
      • put the obfuscated script and the above config file in the same directory, open cmd.exe/terminal and run synchrony -c config [NAME] where name is the file name of the obfuscated script.

      Now the script should look like this:
      image

      Step 3: use brain

      Quick reminder:

      var flyModule = moduleManager.getModule('Fly')
      

      can be obfuscated into

      var flyModule = moduleManager['getModule']('Fly')
      

      and then those strings can be hidden inside a table and used via a decode function (a function that takes an index into the strings table and return the deobfuscated string).

      Use your brain now: what's the decode function in this script:
      image

      If you can't see that the decode function is axolotl_b, stop reading this, else proceed to step 4.

      Step 4: transformer

      Wouldn't it be nice if we can write a program that convert
      image

      into
      image

      by replacing each call of axototl_b with the result of that call?

      4.1: transformer base

      The variable axototl_a contains the encrypted string table for this script so copy that into a new file called transformer.js
      image

      4.2: remove anti debugger and anti formatter:

      Take a look at the decode function:
      image

      Again, if you can't see the part that prevents debugging and formatting, quit reading. For everyone else it's this part:
      image

      WCaJFG only succeeds if tPYtSP is a obfuscated function (in this case, have no newline which our deobfuscated one does). So uhm, remove it I guess.

      fS here is also another anti debug function:
      image

      So by now, you should know what to copy and what to not copy to your transformer.js. Mine look like this.

      4.3: processing input

      First, read read from stdin line by line and String.replace(), particularly the part that cover Specifying a function as the replacement.
      Now add this to your transformer.js:

      function replacer(match, p1, offset, string) {
        return "'" + axolotl_b(p1) + "'";
      }
      function processLine(line) {
        line = line.replaceAll(
          /axolotl_b\('([0-9A-Fa-fxX]+)'\)/g,
          replacer
        );
        console.log(line) // print modified
      }
      
      process.stdin.pipe(require('split')()).on('data', processLine) // for each line, run ProcessLine
      

      Now your transformer.js should look like this. Before running your transformer, run npm install split first.

      Now, run node transformer.js < crits.cleaned.js > crits.js (pretty sure this works on windows too, tested on linux) with crits.cleaned.js being the file produced in step 2 and crits.js is the name of the new file.

      The (almost) deobfuscated script should look like this file or this image:
      image

      Feel free to remove everything before the line

      var scriptName = 'BetterCriticals'
      

      as that is the beginning of most normal script and everything before it have no use from now.

      Step 5: last synchrony

      Repeat step 2 on the file produced by step 4. You should get something similar to this:
      image

      Step 6: Rename variables

      You read the entire thing and have a working brain, I believe you can do this yourself.

      Questions u may have:

      • I need more example: check out my other post in which I deobfuscated? using the same technique.
      • Bad english: yes ik english is not my first language.
      • Setup: images taken from Code OSS with Atom One Dark color scheme, running on Artix Linux.

      Questions I have:

      • What's the name (and creator) of this obfuscator?
      kawaiinekololisK Offline
      kawaiinekololisK Offline
      kawaiinekololis
      Admin
      wrote on last edited by
      #2

      Wildwest

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Aftery
        wrote on last edited by
        #3

        can you do the 20mb script in the other thread though?

        I 1 Reply Last reply
        0
        • LiquidOnTopL LiquidOnTop

          Requirement:

          • js knowledge
          • knowing how to use the terminal (install + run programs)
          • a code editor
          • a brain

          Step 1: Obtain the obfuscated script:

          In this example, I'll use BetterCriticals.

          Before deobfuscation:
          image

          Step 2: Basic deobfuscator and formatter

          • install nodejs (only once)
          • install synchrony
          • create a config file with the following content:
          rename: true
          loose: true
          sourceType: "script"
          
          • put the obfuscated script and the above config file in the same directory, open cmd.exe/terminal and run synchrony -c config [NAME] where name is the file name of the obfuscated script.

          Now the script should look like this:
          image

          Step 3: use brain

          Quick reminder:

          var flyModule = moduleManager.getModule('Fly')
          

          can be obfuscated into

          var flyModule = moduleManager['getModule']('Fly')
          

          and then those strings can be hidden inside a table and used via a decode function (a function that takes an index into the strings table and return the deobfuscated string).

          Use your brain now: what's the decode function in this script:
          image

          If you can't see that the decode function is axolotl_b, stop reading this, else proceed to step 4.

          Step 4: transformer

          Wouldn't it be nice if we can write a program that convert
          image

          into
          image

          by replacing each call of axototl_b with the result of that call?

          4.1: transformer base

          The variable axototl_a contains the encrypted string table for this script so copy that into a new file called transformer.js
          image

          4.2: remove anti debugger and anti formatter:

          Take a look at the decode function:
          image

          Again, if you can't see the part that prevents debugging and formatting, quit reading. For everyone else it's this part:
          image

          WCaJFG only succeeds if tPYtSP is a obfuscated function (in this case, have no newline which our deobfuscated one does). So uhm, remove it I guess.

          fS here is also another anti debug function:
          image

          So by now, you should know what to copy and what to not copy to your transformer.js. Mine look like this.

          4.3: processing input

          First, read read from stdin line by line and String.replace(), particularly the part that cover Specifying a function as the replacement.
          Now add this to your transformer.js:

          function replacer(match, p1, offset, string) {
            return "'" + axolotl_b(p1) + "'";
          }
          function processLine(line) {
            line = line.replaceAll(
              /axolotl_b\('([0-9A-Fa-fxX]+)'\)/g,
              replacer
            );
            console.log(line) // print modified
          }
          
          process.stdin.pipe(require('split')()).on('data', processLine) // for each line, run ProcessLine
          

          Now your transformer.js should look like this. Before running your transformer, run npm install split first.

          Now, run node transformer.js < crits.cleaned.js > crits.js (pretty sure this works on windows too, tested on linux) with crits.cleaned.js being the file produced in step 2 and crits.js is the name of the new file.

          The (almost) deobfuscated script should look like this file or this image:
          image

          Feel free to remove everything before the line

          var scriptName = 'BetterCriticals'
          

          as that is the beginning of most normal script and everything before it have no use from now.

          Step 5: last synchrony

          Repeat step 2 on the file produced by step 4. You should get something similar to this:
          image

          Step 6: Rename variables

          You read the entire thing and have a working brain, I believe you can do this yourself.

          Questions u may have:

          • I need more example: check out my other post in which I deobfuscated? using the same technique.
          • Bad english: yes ik english is not my first language.
          • Setup: images taken from Code OSS with Atom One Dark color scheme, running on Artix Linux.

          Questions I have:

          • What's the name (and creator) of this obfuscator?
          kawaiinekololisK Offline
          kawaiinekololisK Offline
          kawaiinekololis
          Admin
          wrote on last edited by
          #4

          @segv-segv said in [TUTORIAL] How to deobfuscate (most) scripts on this forum:

          Questions I have:

          What's the name (and creator) of this obfuscator?

          People most likely use
          https://github.com/CCBlueX/LiquidScript/tree/master/obfuscator

          which uses
          https://github.com/javascript-obfuscator/javascript-obfuscator
          or the online website
          https://obfuscator.io/

          1 Reply Last reply
          0
          • A Aftery

            can you do the 20mb script in the other thread though?

            I Offline
            I Offline
            idk my name
            wrote on last edited by
            #5

            @Aftery XD
            can you try deobfuscating it?

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            About
            • Terms of Service
            • Privacy Policy
            • Status
            • Contact Us
            Downloads
            • Releases
            • Source code
            • License
            Docs
            • Tutorials
            • CustomHUD
            • AutoSettings
            • ScriptAPI
            Community
            • Forum
            • Guilded
            • YouTube
            • Twitter
            • D.Tube
            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups