Home / vulnerabilities webmodz.txt
Posted on 06 May 2008
Source : packetstormsecurity.org Link
#######################################################################
Luigi Auriemma
Application: WebMod
http://www.djeyl.net/w.php
Versions: <= 0.48
Platforms: Windows and Linux
Bugs: A] directory traversal
B] Cookie buffer-overflow
C] parser.cpp arbitrary memory writing
D] scripts source disclosure
Exploitation: remote
Date: 03 May 2008
Author: Luigi Auriemma
e-mail: aluigi@autistici.org
web: aluigi.org
#######################################################################
1) Introduction
2) Bugs
3) The Code
4) Fix
#######################################################################
===============
1) Introduction
===============
WebMod is an open source MetaMod plugin which acts as a web server for
Half-Life running on the equivalent TCP port of the UDP one used by the
game.
#######################################################################
=======
2) Bugs
=======
----------------------
A] directory traversal
----------------------
WebMod uses an anti-directory traversal check which searchs for any
"../" pattern in the HTTP request of the client.
So it's enough to use a ".." pattern to bypass the check and being
able to download any file from the disk where Half-Life is running
included the configuration files of the game server (like
........platformconfigserver.vdf or ......server.cfg).
Note that this bug works only on Windows servers.
>From server.cpp:
void clientHandle(int connfd, httpquery_t *query, int tid)
...
if(strstr(str,"../")) // hack attempt, display index page
{
str[0]='