!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/sentry/   drwxr-xr-x
Free 50.93 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_hostsentry.cgi (2.01 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# save_hostsentry.cgi
# Save hostsentry options

require './sentry-lib.pl';
&ReadParse();
&error_setup($text{'hostsentry_err'});

# Validate inputs
-r $in{'wtmp'} || &error($text{'hostsentry_ewtmp'});
@ignore = split(/\s+/, $in{'ignore'});
foreach $u (@ignore) {
    defined(getpwnam($u)) || &error(&text('hostsentry_eignore', $u));
    }
for($i=0; defined($in{"mod_$i"}); $i++) {
    push(@mods, $in{"mod_$i"}) if ($in{"mod_$i"});
    }
if (defined($in{'foreign'})) {
    @foreign = split(/\s+/, $in{'foreign'});
    }
if (defined($in{'multiple'})) {
    @multiple = split(/\s+/, $in{'multiple'});
    foreach $m (@multiple) {
        &to_ipaddress($m) ||
            &error(&text('hostsentry_emultiple', $m));
        }
    }

# Write to the appropriate files
$conf = &get_hostsentry_config();
&lock_config_files($conf);
&save_config($conf, "WTMP_FILE", $in{'wtmp'});
&flush_file_lines();
&unlock_config_files($conf);

$ign = &find_value("IGNORE_FILE", $conf);
&lock_file($ign);
&open_tempfile(IGN, ">$ign");
foreach $i (@ignore) {
    &print_tempfile(IGN, $i,"\n");
    }
&close_tempfile(IGN);
&unlock_file($ign);

$mods = &find_value("MODULE_FILE", $conf);
&lock_file($mods);
&open_tempfile(MODS, ">$mods");
foreach $m (@mods) {
    &print_tempfile(MODS, $m,"\n");
    }
&close_tempfile(MODS);
&unlock_file($mods);

$basedir = &get_hostsentry_dir();
if (scalar(@foreign)) {
    &lock_file("$basedir/moduleForeignDomain.allow");
    &open_tempfile(FOREIGN, ">$basedir/moduleForeignDomain.allow");
    foreach $f (@foreign) {
        &print_tempfile(FOREIGN, $f,"\n");
        }
    &close_tempfile(FOREIGN);
    &unlock_file("$basedir/moduleForeignDomain.allow");
    }
if (scalar(@multiple)) {
    &lock_file("$basedir/moduleMultipleLogins.allow");
    &open_tempfile(MULTIPLE, ">$basedir/moduleMultipleLogins.allow");
    foreach $m (@multiple) {
        &print_tempfile(MULTIPLE, $m,"\n");
        }
    &close_tempfile(MULTIPLE);
    &unlock_file("$basedir/moduleMultipleLogins.allow");
    }

if ($in{'apply'}) {
    # Attempt to restart
    &stop_hostsentry();
    $err = &start_hostsentry();
    &error($err) if ($err);
    }
&webmin_log("hostsentry");

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