[toString] #151
Answered
by
abrahamjuliot
wikiwiki000
asked this question in
Q&A
[toString]
#151
Replies: 1 comment
|
That is a great question. In short, if we call the Date.prototype.setDate.toString()Date.prototype.setDate.toString().toString()Here's an in dept article on this topic. https://adtechmadness.wordpress.com/2019/03/23/javascript-tampering-detection-and-stealth/ |
0 replies
Answer selected by
abrahamjuliot
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That is a great question. In short, if we call the
toStringmethod on each of these (getDate, etc... methods), the result should be'function getDate() { [native code] }'or'function getDate() {\n [native code]\n}'depending on the JS engine. When object methods like this are overwritten or spoofed, thetoStringmethod no longer returns the native result. Instead, the result leaks the tampering code. For example, open the console in your browser and enter this with the extension on:Here's an in dept article on this topic.
https://adtechmadness.wordpress.com/2019/03/23/javascript-tampering-detection-and-stealth/