!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/inittab/   drwxr-xr-x
Free 53.79 GB of 127.8 GB (42.09%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     inittab-lib.pl (2.67 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl

BEGIN { push(@INC, ".."); };
use WebminCore;
&init_config();

# parse_inittab()
# Returns a list of entries from the /etc/inittab file
sub parse_inittab
{
local @rv;
local $lnum = 0;
open(INITTAB, $config{'inittab_file'});
while(<INITTAB>) {
    s/\r|\n//g;
    #s/#.*$//g;
    s/\/\/.*$//g;
    if ($gconfig{'os_type'} eq 'aix') {
        # A leading : indicates a comment on AIX
        s/^:.*$//g;
        }
    next if (/^\s*#\s*\$Header/i);    # CVS header
    local $sline = $lnum;
    # Join \ lines
    while(/\\$/) {
        local $nl = <INITTAB>;
        s/\\$//;
        $nl =~ s/^\s+//;
        $_ .= $nl;
        $lnum++;
        }
    if (/^(#*)\s*\$Id/ || /^(#*)\s*\/etc/ || /^(#*)\s*<id>/) {
        # Skip this line
        }
    elsif (/^(#*)\s*([^:]+):([^:]*):([^:]+):([^:]*)/) {
        push(@rv, { 'id' => $2,
                'action' => $4,
                'process' => $5,
                'comment' => $1 ne '',
                'levels' => [ split(//, $3) ],
                'line' => $sline,
                'eline' => $lnum,
                'index' => scalar(@rv) });
        }
    $lnum++;
    }
close(INITTAB);
return @rv;


# create_inittab(&inittab)
# Adds an entry to /etc/inittab
sub create_inittab
{
&open_tempfile(INITTAB, ">>$config{'inittab_file'}");
&print_tempfile(INITTAB, $_[0]->{'comment'} ? "# " : "",
          join(":", $_[0]->{'id'}, join("", @{$_[0]->{'levels'}}),
            $_[0]->{'action'}, $_[0]->{'process'}),"\n");
&close_tempfile(INITTAB);
}

# modify_inittab(&inittab)
# Replaces an /etc/inittab entry
sub modify_inittab
{
local $lref = &read_file_lines($config{'inittab_file'});
splice(@$lref, $_[0]->{'line'}, $_[0]->{'eline'} - $_[0]->{'line'} + 1,
       ($_[0]->{'comment'} ? "# " : "").
       join(":", $_[0]->{'id'}, join("", @{$_[0]->{'levels'}}),
         $_[0]->{'action'}, $_[0]->{'process'}));
&flush_file_lines();
}

# delete_inittab(&inittab)
# Delete a single /etc/inittab entry
sub delete_inittab
{
local $lref = &read_file_lines($config{'inittab_file'});
splice(@$lref, $_[0]->{'line'}, $_[0]->{'eline'} - $_[0]->{'line'} + 1);
&flush_file_lines();
}

sub list_runlevels
{
return ( 0..6, "a", "b", "c" );
}

sub list_actions
{
return ( [ "respawn", $text{ 'inittab_respawn' } ],
     [ "wait", $text{ 'inittab_wait' } ],
     [ "once", $text{ 'inittab_once' } ],
     [ "ondemand", $text{ 'inittab_ondemand' } ],
         [ "initdefault", $text{ 'inittab_initdefault' } ],
     [ "sysinit", $text{ 'inittab_sysinit' } ],
     [ "powerwait", $text{ 'inittab_powerwait' } ],
     [ "powerfail", $text{ 'inittab_powerfail' } ],
     [ "powerokwait", $text{ 'inittab_powerokwait' } ],
     [ "powerfailnow", $text{ 'inittab_powerfailnow' } ],
     [ "ctrlaltdel", $text{ 'inittab_ctrlaltdel' } ],
     [ "kbdrequest", $text{ 'inittab_kbdrequest' } ],
     [ "bootwait", $text{'inittab_bootwait'} ],
     [ "boot", $text{'inittab_boot'} ],
     [ "off", $text{'inittab_off'} ],
    );
}


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