!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:     property_group_editor.cgi (3.74 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# index.cgi
# Display a list of services, built from svcs command

require './smf-lib.pl';
&ReadParse();
&ui_print_header(undef, $text{'property_group_editor_title'}, "");

# get instance fmri
if (defined($in{'fmri'})) {
    $fmri = $in{'fmri'};
    # remove quotes...
    $fmri =~ /\'([^\']*)\'/;
    $fmri = $1;
    if ($fmri =~ /(svc:\/[^:]*):(.*)/) {
        $svc = $1;
        $inst = $2;
    } else {
        &error("Invalid fmri: instance must be specified!");
        }
} else {
    &error("No fmri supplied to property group editor!");
    }

# deal with add/deletion of property groups first. this way
# pgroup list will show changes...
if ((defined($in{'add'})) &&
    (defined($in{'addname'})) &&
    (defined($in{'addtype'})) &&
    (defined($in{'addsinst'}))) {
    $addname = "$in{'addname'}";
    $addtype = "$in{'addtype'}";
    $addsinst = "$in{'addsinst'}";
    if (($addname =~ /.+/) && ($addtype =~ /.+/) && ($addsinst =~ /.+/)) {
        &svc_addpg("$svc", "$addsinst", "$addname", "$addtype");
        }
    }
if (defined($in{'remove'})) {
    # get remove pg list
    @remove_pgs = split(/\0/, $in{'applyto'});
    foreach $rpg (@remove_pgs) { 
        # split into service or instance level/name
        if ($rpg =~ /([^\/]*)\/(.*)/) {
            $pgsinst = $1;
            $pgname = $2;
            &svc_delpg("$svc", "$pgsinst", "$pgname");
            }
        }
    }

@pgroup_listing_svc = &svc_listpg($svc, "service");
@pgroup_listing_inst = &svc_listpg($svc, $inst);
@pgroup_listing = (@pgroup_listing_svc, @pgroup_listing_inst);

print "<h2>";
&text_and_whats_this("property_group_editor_detail");
print " : $fmri </h2>\n";

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

# add pg table first...
print "<p><h3>$text{'property_group_editor_addpg'}</h3>\n";
print "<table><tr>";
print "<td><b>$text{'property_group_editor_addsinst'}</b></td>\n";
print "<td><b>$text{'property_group_editor_addname'}</b></td>\n";
print "<td><b>$text{'property_group_editor_addtype'}</b></td></tr>\n";
print "<tr><td>\n";
@sinstarray = ("service", "$inst");
&print_selection("addsinst", "service", \@sinstarray);
print "</td><td>\n";
print "<input size=30 name=\"addname\" value=\"\">\n";
print "</td><td>\n";
print "<input size=30 name=\"addtype\" value=\"\">\n";
print "</td></tr>\n";
print "<tr><td>&nbsp;</td><td>&nbsp;</td><td>";
print "<input type=submit name=\"add\" value=\"$text{'property_group_editor_add'}\">\n";
print "</td></tr></table></b>\n";

print "<table border width=100%>\n";
print "<tr><td><table width=100%>\n";
print "<tr $cb><td><b>$text{'property_group_editor_apply'}</b>:&nbsp;";
print "<input type=submit name=\"remove\" onClick=\"return (confirm(\'$text{'property_group_editor_deleteconfirm'}\'))\" value=\"$text{'property_group_editor_delete'}\">&nbsp;\n";
print "</td></tr></table></td></tr>\n";
print "<tr><td><table width=100%>\n";
print "<tr $cb>\n";
print "<td><b>$text{'property_group_editor_select'}</b></td>\n";
print "<td><b>$text{'property_group_editor_sinst'}</b></td>\n";
print "<td><b>$text{'property_group_editor_pgroup_name'}</b></td>\n";
print "<td><b>$text{'property_group_editor_pgroup_type'}</b></td></tr>\n";

foreach $pg (@pgroup_listing) {
    print "<tr $cb>";
    $sinst = $pg->{'sinst'};
    $name = $pg->{'pgroup_name'};
    $type = $pg->{'pgroup_type'};
    print "<td>\n";
    print "<input type=checkbox name=\"applyto\" value=\"$sinst/$name\">";
    print "</td><td>\n";
    print "$sinst</td><td>\n";
    # dont allow edit of nonpersistent items!
    if ($type =~ /NONPERSISTENT/) {
        print "$name";
    } else {
        $entity = ($sinst eq "service") ? "$svc" : "$fmri";
        print
    "<a href=\"property_editor.cgi?fmri='$fmri'&sinst=$sinst&pgroup=$name\">$name</a>";
        }
    print "</td><td>$type</td>\n";
    print "</tr>\n";
}
print "</table></td></tr></table></form>\n";

&print_cmds_run();

&ui_print_footer("instance_viewer.cgi?fmri='$fmri'",
    $text{'property_group_editor_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 ]--