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

Shuffle option causes Antiviruses to find Trojan #146

Open
Limbo2332 opened this issue Oct 7, 2024 · 5 comments
Open

Shuffle option causes Antiviruses to find Trojan #146

Limbo2332 opened this issue Oct 7, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Limbo2332
Copy link

Describe the bug:

For example, use https://www.virustotal.com/gui/home/upload to check for viruses through obfucsated javascript files. With shuffle: "hash" configuration it finds the viruses stably.

Config and Small code sample

Config:

{
      target: "browser",
      preset: "high",
      renameVariables: false,
      renameGlobals: false,
      minify: false,
      controlFlowFlattening: false,
      deadCode: false,
      flatten: false,
      shuffle: { hash: 0.5, true: 0.5 } (any value that contains hash) 
}

Expected behavior

There are no viruses found in obfuscated code.

Actual behavior

There are viruses found in obfuscated code.

Additional context

I don't know if it would be helpful, but similar problem with javascript-obfuscator package described here: javascript-obfuscator/javascript-obfuscator#51

@Limbo2332 Limbo2332 added the bug Something isn't working label Oct 7, 2024
@Limbo2332
Copy link
Author

Version I use: 1.7.1

@doctor8296
Copy link

doctor8296 commented Oct 7, 2024

Hmm, this is pretty interesting.
However, we cannot adjust obfuscator for antivirus needs. It is outside app, that doesn't use code directly. What if it will start to detect it every where?
Also we have no idea what cause it.

By the way, I have noticed that some antiviruses redefine fetch function and some shadowDOM stuff.

@Limbo2332
Copy link
Author

Without "shuffle" option in Obfuscator configuration I cannot reproduce this issue.

@Mrgaton
Copy link

Mrgaton commented Oct 7, 2024

this is not the fault of the library this obfuscates code wich makes it impossible to read it to antivirus without VM analysis so some of them just trigers as virus.

@MichaelXF
Copy link
Owner

It's hard to control when Antiviruses decide to flag. Sometimes they flag when the code simply looks obfuscated (hexadecimal variables, encrypted strings, etc). Also, the shuffle: "hash" option is removed in 2.0 (currently 2.0.0-alpha.2)

I would suggest not using the shuffle: "hash" option, it's not a powerful obfuscation after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants