Sorry for the slightly offtopic question: this page caused Chrome on my mobile phone to freeze completely. I had to reboot my phone, and even after that, I had to figure out a way to close the tab without opening Chrome. Did it happen to someone else?
JavaScript Obfuscation Techniques by Example
61–70 of 75 posts
Re: JavaScript Obfuscation Techniques by Example
#62Re: JavaScript Obfuscation Techniques by Example
#63You want to see obfusication? Check out FreeSlots.com. Look at view source on one of the slot machines.[1] Can anyone decode this and figure out the odds generator? [1] view-source: https://www.freeslots.com/slot515.min.js?v=84
I gave it a 10 minute poke just for fun. My main enemy for the first few minutes was the browser trying to tell me I can't do things like eval/etc. Once I got that out of the way with some policy the next issue was the console not really being used to non-printable characters catching me up. In the end those two tricks (both I'm sure being a pain on purpose not by accident) netted me not getting very far as expected,…
With it I get https://ghostbin.me/62d52999cc217 , from there it's decoding UTF-16 and at least one more decoding step (parts of decoded UTF-16 are mangled) to get the string j and the function o and resolving the original function with it.
Re: JavaScript Obfuscation Techniques by Example
#64Re: JavaScript Obfuscation Techniques by Example
#65Why obfuscating JS when there is WASM?
Why WASM when you can create a full VM with its own custom bytecode implementation complete with nonsense instructions and compile to that.
Re: JavaScript Obfuscation Techniques by Example
#66You can get around this by intercepting the request and returning a copy of the js with this check patched out, but it's just another hurdle in the way of casual inspection.
Re: JavaScript Obfuscation Techniques by Example
#67You want to see obfusication? Check out FreeSlots.com. Look at view source on one of the slot machines.[1] Can anyone decode this and figure out the odds generator? [1] view-source: https://www.freeslots.com/slot515.min.js?v=84
Figuring out the odds generator...is a task I will leave to someone else :)
Re: JavaScript Obfuscation Techniques by Example
#68Something else that sites do, which is not really deobfuscation, but an anti-debugger technique, is to run a loop checking whether the DevTools are open and crash the page via catastrophic regex backtracking if they are. You can get around this by intercepting the request and returning a copy of the js with this check patched out, but it's just another hurdle in the way of casual inspection.
Re: JavaScript Obfuscation Techniques by Example
#69Interestingly enough, passing even the most complex example in the link to GPT-3 with the prompt "What does this code output when run?" returns the correct result.
Re: JavaScript Obfuscation Techniques by Example
#70Why obfuscating JS when there is WASM?
Why WASM when you can create a full VM with its own custom bytecode implementation complete with nonsense instructions and compile to that.