gootloader icon indicating copy to clipboard operation
gootloader copied to clipboard

GootLoaderAutoJsDecode passing directory as parameter?

Open dr4lekhine opened this issue 1 year ago • 2 comments

Hello,

First of all, thanks for sharing this tool!

I would like to ask if there any way to execute the "GootLoaderAutoJsDecode.py" but instead of passing as parameter a particular file like "evil.js" giving a directory with multiple files like "/path/to/evilsamples" to try bulk deobfuscation?

Something like that: Capture

Thanks in advance.

Regards.

dr4lekhine avatar Aug 26 '24 23:08 dr4lekhine

That might be something I can add later on. For now you can replace line 485-end with this and it will print them all to console.

import os
directory = os.fsencode(args.jsFilePath)

for fileName in os.listdir(directory):
    filePath = os.path.join(directory, fileName)

    goot3detected = False

    gootDecode(filePath)

    if goot3detected:
        gootDecode('GootLoader3Stage2.js_')

Might not be perfect since DecodedJsPayload.js_, FileAndTaskData.txt, and GootLoader3Stage2.js_ will get constantly over written, but you'll at least get the C2.

andy2002a avatar Aug 26 '24 23:08 andy2002a

That might be something I can add later on. For now you can replace line 485-end with this and it will print them all to console.

import os
directory = os.fsencode(args.jsFilePath)

for fileName in os.listdir(directory):
    filePath = os.path.join(directory, fileName)

    goot3detected = False

    gootDecode(filePath)

    if goot3detected:
        gootDecode('GootLoader3Stage2.js_')

Might not be perfect since DecodedJsPayload.js_, FileAndTaskData.txt, and GootLoader3Stage2.js_ will get constantly over written, but you'll at least get the C2.

Thanks for the feedback! I will be testing that :)

dr4lekhine avatar Aug 27 '24 03:08 dr4lekhine