j4k0xb / webcrack

Deobfuscate obfuscator.io, unminify and unpack bundled javascript
https://webcrack.netlify.app
MIT License
870 stars 100 forks source link

Webcrack can't find string array #46

Closed g0dzcsgo closed 9 months ago

g0dzcsgo commented 9 months ago

Describe the bug

It cant find the string array

Expected Behaviour

Well I expect it to decrypt ofcourse, the thing I am decrypting has multiple files named index with added letters/numbers and this is the only file that didnt decrypt while the other files in the same assets folder decrypted fine.

I had to put the file on gist since I couldn't fit it into the code block on here, or pastebin/hastebin.

As you can see below in the code, the string array is the very first thing in the code block.

Code

https://gist.github.com/g0dzcsgo/3728fd36c4a4a7c5af7d0db30c9a21db

Logs

webcrack index-4d2e6cae.js > output.js
  webcrack:transforms prepare: started +0ms
  webcrack:transforms prepare: finished with 3119 changes +303ms
  webcrack:transforms deobfuscate: started +0ms
  webcrack:deobfuscate String Array: no +0ms
  webcrack:transforms deobfuscate: finished with 0 changes +539ms
  webcrack:transforms unminify: started +0ms
  webcrack:transforms unminify: finished with 35255 changes +360ms
  webcrack:transforms selfDefending, debugProtection, jsx: started +1ms
  webcrack:transforms selfDefending, debugProtection, jsx: finished with 0 changes +108ms
j4k0xb commented 9 months ago

It's not a pure string array, most likely another build tool (like https://vitejs.dev/config/shared-options.html#define) edited a string to void 0 after the obfuscation:

'omit', 'nullish', 'addScalar', void 0, 'element'

I added support for detecting void 0/undefined in the array now but am a bit hesitant to allow any expression as it increases the chance of false positives

g0dzcsgo commented 9 months ago

It's not a pure string array, most likely another build tool (like https://vitejs.dev/config/shared-options.html#define) edited a string to void 0 after the obfuscation:

'omit', 'nullish', 'addScalar', void 0, 'element'

I added support for detecting void 0/undefined in the array now but am a bit hesitant to allow any expression as it increases the chance of false positives

I ran "npm install -g webcrack" to update my package, and I ran the webcrack on the file again and still says "String Array: no"

Maybe I didn't update properly?

Edit: I beautified the original source, and I put strings around the void 0 and now it worked.

j4k0xb commented 9 months ago

the playground updates automatically and for npm a release will be done in the next few days

g0dzcsgo commented 8 months ago

the playground updates automatically and for npm a release will be done in the next few days

Hello, I just pulled the update and I am now encounting a similar issue where it's saying that theres no string array.

https://gist.github.com/g0dzcsgo/73f3c84ac1b34280073a2bf6630cb9e4

I searched thru the string array for void 0, and undefined etc without string quotations, but there is none. What is wrong with this string array then?

j4k0xb commented 8 months ago

image thats how you can find it