Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GootLoaderAutoJsDecode passing directory as parameter? #4

Open
dr4lekhine opened this issue Aug 26, 2024 · 2 comments
Open

GootLoaderAutoJsDecode passing directory as parameter? #4

dr4lekhine opened this issue Aug 26, 2024 · 2 comments

Comments

@dr4lekhine
Copy link

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.

@andy2002a
Copy link
Collaborator

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.

@dr4lekhine
Copy link
Author

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants