[UNIX] PhpDig Remote Command Execution

From: SecuriTeam (support_at_securiteam.com)
Date: 01/15/04

  • Next message: SecuriTeam: "[EXPL] Malformed ASN.1 Exploit Code"
    To: list@securiteam.com
    Date: 15 Jan 2004 19:22:53 +0200
    
    

    The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
    - - promotion

    The SecuriTeam alerts list - Free, Accurate, Independent.

    Get your security news from a reliable source.
    http://www.securiteam.com/mailinglist.html

    - - - - - - - - -

      PhpDig Remote Command Execution
    ------------------------------------------------------------------------

    SUMMARY

     <http://www.phpdig.net/> PhpDig is "an HTTP spider/search engine written
    in PHP with a mySQL database in backend. PhpDig builds a glossary with the
    keywords found in indexed pages. On a search query, it displays a result
    page with documents which contain the search keys, ranked by occurrence".
    A vulnerability in PhpDig allows remote attackers to include an external
    PHP file that will be later executed.

    DETAILS

    Vulnerable Systems:
     * PhpDig version 1.6.x and prior

    Due to a vulnerability in the product a remote attacker can inject a URL
    in $relative_script_path and obtain command execution with the web
    server's privileges (usually nobody).

    From the file ./include/config.php:
    //includes language file
    if
    (is_file("$relative_script_path/locales/$phpdig_language-language.php"))
        {include
    "$relative_script_path/locales/$phpdig_language-language.php";}
    else
        {include "$relative_script_path/locales/en-language.php";}

    //includes of libraries
    include "$relative_script_path/libs/phpdig_functions.php";
    include "$relative_script_path/libs/function_phpdig_form.php";
    include "$relative_script_path/libs/mysql_functions.php";

    Workarounds:
    Several workarounds can be used:

     * Patching .htaccess in ./includes
     * Turning PHP globals off (Default in PHP > 4.2).
     * An unofficial patch for config.php which can be found at
    <http://www.kernelpanik.org/code/kernelpanik/phpdig.zip>
    http://www.kernelpanik.org/code/kernelpanik/phpdig.zip

    ADDITIONAL INFORMATION

    The information has been provided by <mailto:frame@kernelpanik.org> FraMe

    ========================================

    This bulletin is sent to members of the SecuriTeam mailing list.
    To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
    In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com

    ====================
    ====================

    DISCLAIMER:
    The information in this bulletin is provided "AS IS" without warranty of any kind.
    In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.


  • Next message: SecuriTeam: "[EXPL] Malformed ASN.1 Exploit Code"

    Relevant Pages