Trending: TeCh ZoNe

Monday, April 16, 2012

What is XSS? | cross site scripting | Full Tutorial


What is XSS, what can I accomplish with it?
XSS is common in search bars and comment boxes. We can then inject almost any type of programming language into the website. Whether it be Javascript, HTML or XML. XSS is mainly directed at Javascript injection. However, you can inject other languages which will be shown later.
Most people use it to display messages on the website, redirect you to their defacement and even put cookie loggers and XSS shells on the website.

What causes the vulnerability?
Poor PHP coding within text boxes and submission forms. They were too lazy to code it properly allowing us to inject strings into the source code, that would then give us the conclusion of what we put in since it's also in the source code. They did not bother to filter what we type in. They allowed characters such as ">, ", /", etc.

What types of XSS are there?
There are two types of XSS. Persistent and non-persistent. If you inject some code into the website and it sticks to the website (you leave the page and come back, and it's still there) then it is persistent. That is good. When you get non-persistent it will not stick on the website, you will only see it once. With persistent XSS you can do much more, leave messages, redirect them, etc. With non-persistent the most you can do is upload a cookie logger.

What will you be teaching today?
The basics of XSS and cookie logging.

How to test for XSS vulnerabilities.
To test if the website is vulnerable to XSS we want to go to a search box and inject some Javascript. We've found a search box and now we want to use Javascript to alert a message so we can see if the Javascript was successful executed.
                    

                   How to Hack websites With XSS??


xss dorks: download here

1
) search xss dorks on 
google choose any vulnerable website just like i found

http://www.deephousepage.com/search_results.php?

2) now search the given code in search box of website if you recieve your script running then the site is hacked :)!

 <*h1*><*MARQUEE*>*Hacked by !nd! cod3 br3ak3r*</*MARQUEE*></*h1*>
 [remove (*)]


just like that: click here

congo you hacked a website :)! but if you want image deface you can also do this. because this is only for testing not good for hackers so better go with image deface.

3) for injecting image deface use the code given below note this time not in search box this time in url box


image deface injection in xss eg for (noobs):

http://www.website.com/search_results.php?searchString=<*h1>imagescript</*h1>  [remove (*)]

hit enter

website will be injected


for getting image deface script go to tinypic.com upload image and copy its code (
HTML For website) code and paste it.

MY XSS IMAGE DEFACE: XSS BY ME


                           Non-persistent XSS.


 Ok Obviously we can't redirect users with non-persistent. But with basic web-based programming knowledge we can make a cookie logger. We may also need advanced social engineering skills for people to open our cookie logger.

for cookie logger tut: click here



Keep visiting :)!!

All Rights Reserved TeCh ZoNe | Blogger Template by Bloggermint
back to top