Earlier quoted context omitted.
With how mediocre most developers today are, obfuscation is enough.
Can't tell if you mean they can't deobfuscate, or that their code isn't worth the effort of deobfuscating.
JavaScript Obfuscation Techniques by Example
31–40 of 75 posts
Re: JavaScript Obfuscation Techniques by Example
#32Sorry 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?
Android 12 with Chrome v103.
Re: JavaScript Obfuscation Techniques by Example
#33Why obfuscating JS when there is WASM?
Business people demand it to protect intellectual property without realizing the ease of reversing it / wanting to say they're doing something to protect IP that their own superior will not realize doesn't help. It is making the best of an impossible situation, the paradox of sending your code to every single customer for them to run it while also wishing nobody could see it. The more aggressive they make patent law…
If you publish your code on github, it's more likely to be compromised than if it's just in the webapp, very well obfuscated.
A sufficiently motivated actor will break it, and frankly break almost anything else, so it's a game of probabilities etc..
Obfuscation probably does make sense so long as it's not obviously getting in the way of dev. and, with the key understanding that 'it can be broken'.
Physical security at most companies can be thwarted with enough effort, it doesn't mean we don't do it.
Re: JavaScript Obfuscation Techniques by Example
#34Why obfuscate, when you can just follow modern trends and use webpack (or similar) which gives you completely unreadable shit.
Take it one step further: hire sufficiently terrible spaghetti coders that nobody, not you or even they know what the code does, and any hacker trying to make sense of it will feel ill.
Re: JavaScript Obfuscation Techniques by Example
#35Re: JavaScript Obfuscation Techniques by Example
#36Why obfuscate, when you can just follow modern trends and use webpack (or similar) which gives you completely unreadable shit.
Oh I love this. Take it one step further: hire sufficiently terrible spaghetti coders that nobody, not you or even they know what the code does, and any hacker trying to make sense of it will feel ill.
Re: JavaScript Obfuscation Techniques by Example
#37You 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
Re: JavaScript Obfuscation Techniques by Example
#38You 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
Re: JavaScript Obfuscation Techniques by Example
#39You 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'm not sure how many levels it was applied but my general strategy on it was the first obfuscation method seemed to be an IIFE that triggers eval on a big string that has had some transformations applied which then calls eval on the next level and so on so I would take the IIFE, turn it into a function definition stuck in a variable like "decodeFunction1" so I could just recursively call directly and change the ending to return the string instead of eval it directly. There is probably something that could be done with debugger breakpoints here but I don't know enough about how that plays out inside eval. Anyways if I were evil I'd make sure at some point in this chain there is a subtle change in what's happening that breaks this approach so I wouldn't be surprised if someone told me that was the case :).
It'd be interesting to see what some real JS devs could get to, both from a "how hard is it" perspective but also just to see what different obfuscations are used in the real world.