box-js 1.8.2, sample f3b3a5fc30ecbab403b27dd853ad7f6b
Using a 10 seconds timeout, pass --timeout to specify another timeout in seconds
[info] Rewriting code...
[info] Replacing `function A.prototype.B()` (use --no-rewrite-prototype to skip)...
[error] Couldn't parse with Acorn:
[error] SyntaxError: Unexpected token (1:716)
[error]
[error] This doesn't seem to be a JavaScript/WScript file.
If this is a JSE file (JScript.Encode), compile
decoder.c and run it on the file, like this:
cc decoder.c -o decoder
./decoder f3b3a5fc30ecbab403b27dd853ad7f6b f3b3a5fc30ecbab403b27dd853ad7f6b.js
It was missing semicolon. After placing it at the end of declaration:
Using a 10 seconds timeout, pass --timeout to specify another timeout in seconds
[info] Rewriting code...
[info] Replacing `function A.prototype.B()` (use --no-rewrite-prototype to skip)...
[info] Rewriting typeof calls (use --no-typeof-rewrite to skip)...
[info] Rewriting eval calls (use --no-eval-rewrite to skip)...
[info] Rewriting try/catch statements (use --no-catch-rewrite to skip)...
[info] Rewritten successfully.
/opt/box-js/node_modules/vm2/lib/main.js:213
throw this._internal.Decontextify.value(e);
^
TypeError: "tcapitulation".e is not a function
at vm.js:25:90
at ContextifyScript.Script.runInContext (vm.js:35:29)
at VM.run (/opt/box-js/node_modules/vm2/lib/main.js:207:72)
at Object.<anonymous> (/opt/box-js/analyze.js:370:4)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
* If the error is about a weird "Unknown ActiveXObject", try --no-kill.
* If the error is about a legitimate "Unknown ActiveXObject", report a bug at https://github.com/CapacitorSet/box-js/issues/ .
was this problem fixed? because I have the same error message on a malware dropper.
throw this._internal.Decontextify.value(e);
^
TypeError: String[((intermediate value)(...) + (intermediate value)(...) + (intermediate value)(...)
(intermediate value)(...) + (intermediate value)(...) + (intermediate value)(...) + (intermediate
value)(...) + (intermediate value)(...) + (intermediate value)(...) + (intermediate value)(...) + (
intermediate value)(...) + (intermediate value)(...))] is not a function
at vm.js:382:15
at Script.runInContext (vm.js:107:20)
at VM.run (C:\Users\malwin\AppData\Roaming\npm\node_modules\box-js\node_modules\vm2\lib\main.js:218:62)
at Object. (C:\Users\malwin\AppData\Roaming\npm\node_modules\box-js\analyze.js:442:5)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)