i recently found out XSS is a big thread to my site. I have set up several measures to prevent that like filtering user input , stripping out anything relates to javascript
But i recently found out that javascript can be encoded into hex code can be used in html img code,
i tried to make it myself, i found this on a XSS prevention site:
<img src=javascri pt:alert(' XSS')>
This code is javascript:
javascript:alert('XSS');
the problem is , this code is not working properly, i cant test it out to see if this kind of stuff really works.
here’s the js fiddle:
http://jsfiddle.net/CCgT3/
The problem is it should be outputted as
<img src="javascript:alert('XSS')">
But the fiddle show something like this(firebug):
<img XSS')="" pt:alert('="" src="javascri">
Is there something wrong with the hex?
Try to remove the spaces in the src attribute:
Then it should work.