XSS Attacks

This post is not for the beginners in this field. Although I have tried to create it as simple as I could but some basic knowledge of XSS is required.

I am going to talk about the new attack in the fad using Xss i.e Content sniffing.

In this attack the attacker uploads a file such as pdf or gif etc on an honest website.
The victim is that person that is goin to use that file for eg watch photo on facebook.
Actually the file that attacker has uploaded is not the gif file instead its script written with gif extension. And whenever victim opens that file the script is executed. Now that script could be a simple pop up window like <script>alert("tarun")</script> or attcker can even gain the cookies of current user by <script>alert(document.cookie)</script>. Now how easy,it is to upload a script on a website. And the answer is not easy and at the same time very easy. Some server checks before uploading file for its content whether its a real gif or not. But this checking is also done by browser whenever it get data from the server. And there is a discrepancy in their checking. Attacker can upload a file on server which is valid gif or pdf or postscript for server but html for browser. Ok, too much talk time for a practical example:

%!PS-Adobe-2.0
%%Creator: <script> ... </script>
%%Title: attack.dvi

name the file anything.ps

Now upload the file the usrname and passwrd is author1 & author1 and the url for test site is http://www.read.cs.ucla.edu/testconf/. after uploading try to download the file you will see a pop up window. One thing more attack works right now only for internet explorer upto 7 not in 8..... Happy hacking and I will be here with its patch soon.........

0 comments:

Post a Comment