Earlier quoted context omitted.
> Problem is that the devtools are not available due to the repeated abuse of the debugger and console clear commands. What methods do they use to detect debugging tools and how do we defeat them?
They don't need to detect the devtools being open, debugger is a no-op when the devtools aren't open so you can just run it in a loop forever.
Evading JavaScript anti-debugging techniques
31–40 of 53 posts
Re: Evading JavaScript anti-debugging techniques
#32Interesting though it involves recompiling the web browser. I have encountered this issue on many websites and my response is to stream the website through a proxy server which can then save the content (both outgoing and incoming) to the local disk for analysis. Using the browser's debugging tool is a lost cause when you're dealing with obfuscated code. The approach that I use is to isolate the target JS, modify it…
In the VS Code JS debugger, there's an option to "exclude caller" on a call frame that which prevents stacks with the given caller from pausing at a location. As mentioned elsewhere, browser devtools have something similar with "Never pause here." Do you think there's more than tools can do to make your process easier? I maintain the vscode debugger and found both the article and your comment interesting--there's a l…
What I'm saying is that we need a way to get that table (array) and perform the substitutions in order to recreate the original code as text instead of numbers. This is likely way beyond the scope of a debugging tool. Or is it?
Re: Evading JavaScript anti-debugging techniques
#33Interesting though it involves recompiling the web browser. I have encountered this issue on many websites and my response is to stream the website through a proxy server which can then save the content (both outgoing and incoming) to the local disk for analysis. Using the browser's debugging tool is a lost cause when you're dealing with obfuscated code. The approach that I use is to isolate the target JS, modify it…
> Interesting though it involves recompiling the web browser. Years ago I really wanted to disable the blink tag, so I just ran `perl -pie "s/blank/abcde/g"` on the binary and that worked well enough. I'll bet you could so something similar with "debugger". On macOS, you'd break code signing, but you could re-sign it or strip the signing and let it run unsigned.
Re: Evading JavaScript anti-debugging techniques
#34Earlier quoted context omitted.
Local Overrides does what? Problem is that the devtools are not available due to the repeated abuse of the debugger and console clear commands. The other problem is storing content on the local disk for study. I don't think devtools do that.
Local Overrides stores the files you chose to override in a folder of your choosing. Subsequent requests for that resource while devtools is open will replace the contents with your local copy. So the idea is store it in local Overrides, find the bad anti debug code and remove it, then you get back full control in devtools.
Re: Evading JavaScript anti-debugging techniques
#35Re: Evading JavaScript anti-debugging techniques
#36Interesting though it involves recompiling the web browser. I have encountered this issue on many websites and my response is to stream the website through a proxy server which can then save the content (both outgoing and incoming) to the local disk for analysis. Using the browser's debugging tool is a lost cause when you're dealing with obfuscated code. The approach that I use is to isolate the target JS, modify it…
Re: Evading JavaScript anti-debugging techniques
#37Earlier quoted context omitted.
Also note that as far as the sketchiness scale goes, this is basically a 5/10. Now consider the same tools in the hands of malware distributors. For example, I've seen these anti-debugger techniques on NFL piracy websites when I tried to investigate why my CPU was pinned to 100% while I was streaming the game.
> I've seen these anti-debugger techniques on NFL piracy websites when I tried to investigate why my CPU was pinned to 100% while I was streaming the game Probably safe to assume they were mining cryptocurrency with your browser while you were watching the stream.
I did notice the ad serving infrastructure seemed quite sophisticated. There were so many domains and proxies and redirects. Luckily uBlock Origin blocks almost all of them. And usually, I can avoid any of the "bonus" features by opening the video player iframe in its own tab (but sometimes this isn't possible, or the video player tab has some scripts to make it annoying to run in isolation).
One thing I like to do during the commercial breaks is paste the URL of the site into GitHub Code Search. This always leads to interesting results, including blocklists, people's personal media scrapers, or sometimes even the (re-)publishing infrastructure of the sites themselves. It's also a great way to find alternative URLs or other streaming sites.
Re: Evading JavaScript anti-debugging techniques
#38Re: Evading JavaScript anti-debugging techniques
#39Earlier quoted context omitted.
Would the "Local Overrides" feature of chrome devtools simplify this workflow for you?
Local Overrides does what? Problem is that the devtools are not available due to the repeated abuse of the debugger and console clear commands. The other problem is storing content on the local disk for study. I don't think devtools do that.