I've been researching Javascript for a project, and here's a summary of what I found useful.
Ready to learn more? Subscribe to our newsletter for weekly tutorials and tips.
正文
Javascript Anti Debugging - Abusing Chromium Devtools Scope Pane Chromium Devtools Scope Pane
can allow execution of Javascript by the devtools while the main thread is paused by the debugger! I used this trick to create a very powerful
that tracks the flow of debugging done by the user and changes the flow of execution accordingly - check out the
As part of a long term anti debugging techniques research I do (highly recommending you to read the
of my work if you never did in order to understand the nature of my work), I came across a
which led me to do the research I will present in this article:
This made me wonder about how it works. Let me share with you my understanding:
When you run the code above without opening the devtools, nothing happens. But as soon as you open the devtools, the
What happens there, is that the code constantly logs the created
Once the devtools is asked to log details regarding the element, one of the details it tries to fetch in order to present it is the
of the element, as it is a very commonly used and an important property. So normally, if you create a
But what happened in the code example above, is that the creator of the code overrode the native getter of the
element with a getter of its own, a getter function which when is called claims to know with certainty that the devtools are open.
And that certainty is in fact justified when you think about it. A reference to that
element is accessible only via the inner scope of function
More Details
There are a few more points worth noting. First, browser compatibility varies across different browsers. Second, performance optimization is crucial when handling large amounts of data. Finally, key management is also an important consideration.
That's all for this comprehensive guide. I hope you found it helpful! Feel free to leave comments if you have questions.
Reference: Javascript Anti Debugging - Abusing Chromium Devtools Scope Pane
Comments | NOTHING