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


Viewing file:     save_cnf.cgi (2.63 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Save mysql server configuration options

require './mysql-lib.pl';
$access{'perms'} == 1 || &error($text{'cnf_ecannot'});
&error_setup($text{'cnf_err'});
&ReadParse();

# Get the mysqld section
&lock_file($config{'my_cnf'});
$conf = &get_mysql_config();
($mysqld) = grep { $_->{'name'} eq 'mysqld' } @$conf;
$mysqld || &error($text{'cnf_emysqld'});

# Parse mysql server inputs
if ($in{'port_def'}) {
    &save_directive($conf, $mysqld, "port", [ ]);
    }
else {
    $in{'port'} =~ /^\d+$/ && $in{'port'} > 0 && $in{'port'} < 65536 ||
        &error($text{'cnf_eport'});
    &save_directive($conf, $mysqld, "port", [ $in{'port'} ]);
    }

if ($in{'bind_def'}) {
    &save_directive($conf, $mysqld, "bind-address", [ ]);
    }
else {
    &check_ipaddress($in{'bind'}) ||
        &error($text{'cnf_ebind'});
    &save_directive($conf, $mysqld, "bind-address", [ $in{'bind'} ]);
    }

if ($in{'socket_def'}) {
    &save_directive($conf, $mysqld, "socket", [ ]);
    }
else {
    $in{'socket'} =~ /^\/\S+$/ ||
        &error($text{'cnf_esocket'});
    &save_directive($conf, $mysqld, "socket", [ $in{'socket'} ]);
    }

if ($in{'datadir_def'}) {
    &save_directive($conf, $mysqld, "datadir", [ ]);
    }
else {
    -d $in{'datadir'} || &error($text{'cnf_edatadir'});
    &save_directive($conf, $mysqld, "datadir", [ $in{'datadir'} ]);
    }

&save_directive($conf, $mysqld, "default-storage-engine",
        $in{'stor'} ? [ $in{'stor'} ] : [ ]);

$fpt = &find_value("innodb_file_per_table", $mems);
if ($fpt || $in{'fpt'}) {
    &save_directive($conf, $mysqld, "innodb_file_per_table",
            [ $in{'fpt'} ]);
    }

&save_directive($conf, $mysqld, "skip-locking",
        $in{'skip-locking'} ? [ "" ] : [ ]);

&save_directive($conf, $mysqld, "big-tables",
        $in{'big-tables'} ? [ "" ] : [ ]);

# Save set variables
%vars = &parse_set_variables(&find_value("set-variable", $mems));
foreach $w (@mysql_set_variables) {
    if ($in{$w."_def"}) {
        delete($vars{$w});
        }
    else {
        $in{$w} =~ /^\d+$/ || &error($text{"cnf_e".$w});
        $vars{$w} = $in{$w}.$in{$w."_units"};
        }
    }
@sets = ( );
foreach $v (keys %vars) {
    push(@sets, $v."=".$vars{$v});
    }
&save_directive($conf, $mysqld, "set-variable", \@sets);

# Save numeric variables
foreach $w (@mysql_number_variables, @mysql_byte_variables) {
    if ($in{$w."_def"}) {
        delete($vars{$w});
        &save_directive($conf, $mysqld, $w, [ ]);
        }
    else {
        $in{$w} =~ /^\d+[kmgt]?$/i || &error($text{"cnf_e".$w});
        &save_directive($conf, $mysqld, $w,
                [ $in{$w}.$in{$w."_units"} ]);
        }
    }

# Write out file
&flush_file_lines($config{'my_cnf'});
&unlock_file($config{'my_cnf'});
if ($in{'restart'} && &is_mysql_running() > 0) {
    &stop_mysql();
    $err = &start_mysql();
    &error($err) if ($err);
    }
&webmin_log("cnf");
&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.0054 ]--