awesome-javascript-anti-debugging

HooksDetection

POC

if (document.createElement.toString() !== 'function createElement() { [native code] }') {
    console.log("hook detected!");
}
else {
    alert('steal cookies!');
}

About

The idea here is to tell when someone tried to place a hook on the protected code in order to investigate it, and if so to give up on running.

Resources