Aprire un buco nella Forms Authentication

E pensare che abbiamo giusto ieri parlato di "ASP .NET Security".... Ledisendgentlemen, in collaborazione con quel buontempone del Barbieri e grazie ad un thread apparso su Sourceforge, ecco come bucare la Forms Authentication di ASP .NET: scaricate il progetto dimostrativo e pubblicatelo su una macchina IIS5 (IIS6 sembra essere immune) _senza_ URLScan (che come testato da Lorenzo offre protezione da questo bug). Provate a questo punto a fare browsing della pagina securepage.aspx contenuta nel folder wannabesecure:

http://miosito/wannabesecure/securepage.aspx

Come prevedibile, verrete rediretti alla pagina di login. Provate ora:

http://miosito/wannabesecure\securepage.aspx

Se usate IE, il browser efefttuerà un rewrite dello slash "malizioso"ed ancora una volta vedrete la pagina di login (con Mozilla avrete invece già fatto bingo). Provate allora a fare un "encoding (da) manuale":

http://miosito/wannabesecure%5Csecurepage.aspx

BINGO! Forms Authentication bucata e pagina (non più così) sicura in bella vista. Il sospetto è che ci sia un errore di path canonicalization nello httpmodule di ASP .NET...

Technorati Tags:

posted @ venerdì 1 ottobre 2004 19:44

Print

Comments on this entry:

# URLScan... il nostro salvatore.

Left by Lorenzo Barbieri @ UGIblogs! at 01/10/2004 19:51
Gravatar

# URLScan... il nostro salvatore.

Left by Lorenzo Barbieri @ UGIblogs! at 01/10/2004 20:04
Gravatar

# re: Aprire un buco nella Forms Authentication

Left by Lorenzo Barbieri at 01/10/2004 20:54
Gravatar

# re: Aprire un buco nella Forms Authentication

Left by Lorenzo Barbieri at 02/10/2004 04:09
Gravatar
IIS 6 include URLScan, quindi è protetto.
Non è un problema di IIS se riguarda una feature specifica di ASP.NET.

# Problema del giorno: Bug nella Forms Authentication....la verit

Left by Roberto Brunetti at 02/10/2004 15:06
Gravatar

# re: Aprire un buco nella Forms Authentication

Left by Roberto Brunetti at 02/10/2004 15:09
Gravatar
Dopo aver letto questo post, ho scritto un paio di considerazioni in merito a questo problema. Solo che alla fine è venuta fuori una cosa un po' troppo lunga e l'ho inserita in un post sul mio blog (http://blogs.devleap.com/rob/archive/2004/10/02/1803.aspx). Fondamentalmente il problema è più ampio, e non riguarda la Forms Authentication, ma bensi la lettura dei tag location del web.config e dei vari web.config delle sottodirectory di un'applicaizone. Nel mio post ho inserito anche due possibili soluzioni per risolvere il problema a monte.

# Sicurezza: mai illudersi troppo... URL Scan, request validation e la vita del povero informatico!

Left by Lorenzo Barbieri @ UGIblogs! at 02/10/2004 15:10
Gravatar

# ASP.NET Exploit: Sempre a proposito del tema caldo del weekend :-) ...

Left by Il Blog di Paolo Pialorsi at 02/10/2004 19:07
Gravatar

# ASP.NET Exploit: Sempre a proposito del tema caldo del weekend :-) ...

Left by Il Blog di Paolo Pialorsi at 02/10/2004 19:09
Gravatar

# Aprire un buco nella Forms Authentication

Left by Pingback/TrackBack at 03/10/2004 13:15
Gravatar
Aprire un buco nella Forms Authentication

# Sicurezza, .NET e Bush...

Left by LastKnight .NET Blog at 04/10/2004 19:35
Gravatar

# Aprire un buco nella Forms Authentication

Left by Pingback/TrackBack at 05/10/2004 18:40
Gravatar
Aprire un buco nella Forms Authentication

# re: Aprire un buco nella Forms Authentication

Left by seiken at 18/10/2004 18:52
Gravatar
i dati sensibili e'meglio tenerli sotto al materasso

Your comment:



 (will not be displayed)


 
 
Please add 5 and 5 and type the answer here:
 

Live Comment Preview:

 
«luglio»
domlunmarmergiovensab
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910