!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)

/usr/libexec/webmin/apache/   drwxr-xr-x
Free 50.94 GB of 127.8 GB (39.86%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     auth-lib.pl (3.09 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# auth-lib.pl
# Functions for editing text and dbm user files

# list_authusers(file)
# Returns an array of user names from the given file
sub list_authusers
{
local($_, @rv);
&open_readfile(HTPASSWD, $_[0]);
while(<HTPASSWD>) {
    if (/^(\S+):(\S*)/) { push(@rv, $1); }
    }
close(HTPASSWD);
return @rv;
}

# get_authuser(file, name)
sub get_authuser
{
local($_, $rv);
&open_readfile(HTPASSWD, $_[0]);
while(<HTPASSWD>) {
    if (/^(\S+):(\S*)/ && $1 eq $_[1]) {
        $rv = { 'user' => $1 , 'pass' => $2 };
        }
    }
close(HTPASSWD);
return $rv;
}

# save_authuser(file, olduser, &details)
sub save_authuser
{
local($_, @htpasswd);
&open_readfile(HTPASSWD, $_[0]);
@htpasswd = <HTPASSWD>;
close(HTPASSWD);
&open_tempfile(HTPASSWD, ">$_[0]");
foreach (@htpasswd) {
    if (/^(\S+):(\S*)/ && $1 eq $_[1]) {
        &print_tempfile(HTPASSWD, $_[2]->{'user'},":",$_[2]->{'pass'},"\n");
        }
    else {
        &print_tempfile(HTPASSWD, $_);
        }
    }
&close_tempfile(HTPASSWD);
}

# create_authuser(file, &details)
# Add a new user to a file
sub create_authuser
{
&open_tempfile(HTPASSWD, ">> $_[0]");
&print_tempfile(HTPASSWD, $_[1]->{'user'},":",$_[1]->{'pass'},"\n");
&close_tempfile(HTPASSWD);
}

# delete_authuser(file, user)
# Delete some user from a file
sub delete_authuser
{
local($_, @htpasswd);
&open_readfile(HTPASSWD, $_[0]);
@htpasswd = <HTPASSWD>;
close(HTPASSWD);
&open_tempfile(HTPASSWD, "> $_[0]");
foreach (@htpasswd) {
    if (!/^(\S+):(\S*)/ || $1 ne $_[1]) {
        &print_tempfile(HTPASSWD, $_);
        }
    }
&close_tempfile(HTPASSWD);
}

###########################################################################
# Group Functions
###########################################################################

# list_authgroups(file)
# Returns an array of associative arrays containing information about
# groups from some text file
sub list_authgroups
{
local($_, @rv);
&open_readfile(HTGROUP, $_[0]);
while(<HTGROUP>) {
    if (/^(\S+):\s*(.*)/) {
        local($gr, @mems);
        $gr = $1; @mems = split(/\s+/, $2);
        push(@rv, { 'group' => $gr, 'members' => \@mems });
        }
    }
close(HTGROUP);
return @rv;
}

# get_authgroup(file, group)
sub get_authgroup
{
local(@tmp, $t);
@tmp = &list_authgroups($_[0]);
foreach $t (@tmp) {
    if ($t->{'group'} eq $_[1]) { return $t; }
    }
return undef;
}

# create_authgroup(file, &details)
sub create_authgroup
{
&open_tempfile(HTGROUP, ">> $_[0]");
&print_tempfile(HTGROUP, $_[1]->{'group'},": ",join(' ', @{$_[1]->{'members'}}),"\n");
&close_tempfile(HTGROUP);
}

# save_authgroup(file, oldgroup, &details)
sub save_authgroup
{
&open_readfile(HTGROUP, $_[0]);
@htgroup = <HTGROUP>;
close(HTGROUP);
&open_tempfile(HTGROUP, "> $_[0]");
foreach (@htgroup) {
    if (/^(\S+):\s*(.*)/ && $1 eq $_[1]) {
        &print_tempfile(HTGROUP, $_[2]->{'group'},": ",
                  join(' ', @{$_[2]->{'members'}}),"\n");
        }
    else {
        &print_tempfile(HTGROUP, $_);
        }
    }
&close_tempfile(HTGROUP);
}

# delete_authgroup(file, group)
sub delete_authgroup
{
&open_readfile(HTGROUP, $_[0]);
@htgroup = <HTGROUP>;
close(HTGROUP);
&open_tempfile(HTGROUP, "> $_[0]");
foreach (@htgroup) {
    if (!/^(\S+):\s*(.*)/ || $1 ne $_[1]) {
        &print_tempfile(HTGROUP, $_);
        }
    }
&close_tempfile(HTGROUP);
}

1;


:: 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 ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: 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.0101 ]--