!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/grub/   drwxr-xr-x
Free 50.94 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:     save_title.cgi (2.17 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# save_title.cgi
# Save a boot menu option

require './grub-lib.pl';
&ReadParse();
&lock_file($config{'menu_file'});
$conf = &get_menu_config();
if (!$in{'new'}) {
    $old = $title = $conf->[$in{'idx'}];
    }
&error_setup($text{'title_err'});

if ($in{'delete'}) {
    # Just delete the title
    &save_directive($conf, $title, undef);
    }
else {
    # validate inputs
    $in{'title'} =~ /\S/ || &error($text{'title_etitle'});
    $in{'root_mode'} != 1 || $in{'other'} =~ /^\S+$/ ||
        &error($text{'title_eroot'});
    $in{'boot_mode'} != 2 || $in{'kernel'} =~ /\S/ ||
        &error($text{'title_ekernel'});
    $in{'boot_mode'} != 1 || $in{'chain_def'} || $in{'chain'} =~ /\S/ ||
        &error($text{'title_echain'});
    $in{'initrd_def'} || $in{'initrd'} =~ /\S/ ||
        &error($text{'title_einitrd'});

    # store inputs in title structure
    $title->{'name'} = 'title';
    $title->{'value'} = $in{'title'};
    local $r = $in{'noverify'} ? "rootnoverify" : "root";
    delete($title->{'root'});
    delete($title->{'rootnoverify'});
    if ($in{'root_mode'} == 1) {
        $title->{$r} = $in{'other'};
        }
    elsif ($in{'root_mode'} == 2) {
        $root = &linux_to_bios($in{'root'});
        $root || &error(&text('title_edev', $in{'root'}));
        $title->{$r} = $root;
        }
    delete($title->{'kernel'});
    delete($title->{'chainloader'});
    delete($title->{'initrd'});
    delete($title->{'module'});
    if ($in{'boot_mode'} == 2) {
        $title->{'kernel'} = $in{'kernel'};
        $title->{'kernel'} .= " $in{'args'}" if ($in{'args'});
        $title->{'initrd'} = $in{'initrd'} if (!$in{'initrd_def'});
        if ($in{'module'} =~ /\S/) {
            $title->{'module'} =
                join("\0", split(/\r?\n/, $in{'module'}));
            }
        }
    elsif ($in{'boot_mode'} == 1) {
        $title->{'chainloader'} = $in{'chain_def'} ? '+1'
                               : $in{'chain'};
        }
    if ($in{'makeactive'}) {
        $title->{'makeactive'} = "";
        }
    else {
        delete($title->{'makeactive'});
        }
    if ($in{'lock'}) {
        $title->{'lock'} = "";
        }
    else {
        delete($title->{'lock'});
        }

    # create or update the title
    &save_directive($conf, $old, $title);
    }

&flush_file_lines($config{'menu_file'});
&unlock_file($config{'menu_file'});
&webmin_log($in{'new'} ? 'create' : $in{'delete'} ? 'delete' : 'modify',
            'title', undef, $title);
&redirect("");


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