It it possible to provide the rc4 decodekey from outside the code? · javascript-obfuscator/javascript-obfuscator · Discussion #1254 · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems relatively easy to deobfuscate code using online tools. The result is still gibberish, however the used strings can be read. This shows a little too much of the inner workings of our code.
The deopfuscation process seems to be able to find the decodekey for the rc4 directly in the code. So my question is, if it is possible to provide this key as an option when obfuscating, and then provide it, fx. as an variable on the script tag used to run the obfuscated script and then fetch this key using the currentScript global.
If the script is removed after load, it becomes extremely difficult to even see that such key is provided, and it would make the deobfuscation much harder.
The key is provided by chrome extension code, where the code is loaded through injectScript.
It will never be impossible to deobfuscate, I guess that is the nature of js, but if it is not possible to simply use an online tool that recognizes that it has been obfuscated using the javascript-obuscator tool and deobfuscates it right away.
Hiding the key elsewhere will make it much harder, and require real effort.
Well, I would like to provide a key string to be used when obfuscating (as an option) and a function that retrieves the key from within the script, again as an option. Fx.: { stringArrayEncodingRc4Key: 'some-key', //If the key fx. is stored as the id value of the script inserted stringArrayEncodingRc4KeyFunction: 'currentScript.attributes.id.value' }
It could also be a global variable, or fetched async from somewhere etc.:-)
No a I mean in the global scope, fx. set on global/window object. The point is that the key is NOT part of the script itself, and therefore the script can not on its own be deobfuscated, but requires at least the detective task to figure out from where / how the key is obtained.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.
Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.
🎥 Watch TMZ Live
TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.
Uh oh!
There was an error while loading. Please reload this page.
-
It seems relatively easy to deobfuscate code using online tools. The result is still gibberish, however the used strings can be read. This shows a little too much of the inner workings of our code.
The deopfuscation process seems to be able to find the decodekey for the rc4 directly in the code. So my question is, if it is possible to provide this key as an option when obfuscating, and then provide it, fx. as an variable on the script tag used to run the obfuscated script and then fetch this key using the currentScript global.
If the script is removed after load, it becomes extremely difficult to even see that such key is provided, and it would make the deobfuscation much harder.
What do you think?
Cheers
Beta Was this translation helpful? Give feedback.
All reactions