!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_portsentry.cgi (2.43 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# save_config.cgi
# Update the portsentry config file

require './sentry-lib.pl';
&ReadParse();
&error_setup($text{'portsentry_err'});
$conf = &get_portsentry_config();
&lock_config_files($conf);

# Validate and save inputs
@tports = split(/\s+/, $in{'tports'});
foreach $t (@tports) {
    $t > 0 && $t < 65535 || &error(&text('portsentry_etports', $t));
    }
&save_config($conf, "TCP_PORTS", join(",", @tports));
$in{'tadv'} > 0 && $in{'tadv'} < 65535 || &error($text{'portsentry_etadv'});
&save_config($conf, "ADVANCED_PORTS_TCP", $in{'tadv'});
@texc = split(/\s+/, $in{'texc'});
foreach $t (@texc) {
    $t > 0 && $t < 65535 || &error(&text('portsentry_etexc', $t));
    }
&save_config($conf, "ADVANCED_EXCLUDE_TCP", join(",", @texc));

@uports = split(/\s+/, $in{'uports'});
foreach $t (@uports) {
    $t > 0 && $t < 65535 || &error(&text('portsentry_euports', $t));
    }
&save_config($conf, "UDP_PORTS", join(",", @uports));
$in{'uadv'} > 0 && $in{'uadv'} < 65535 || &error($text{'portsentry_euadv'});
&save_config($conf, "ADVANCED_PORTS_UDP", $in{'uadv'});
@uexc = split(/\s+/, $in{'uexc'});
foreach $t (@uexc) {
    $t > 0 && $t < 65535 || &error(&text('portsentry_euexc', $t));
    }
&save_config($conf, "ADVANCED_EXCLUDE_UDP", join(",", @uexc));

&save_config($conf, "BLOCK_TCP", $in{'tblock'});
&save_config($conf, "BLOCK_UDP", $in{'ublock'});
&save_config($conf, "PORT_BANNER", $in{'banner'});

$in{'trigger'} =~ /^\d+$/ || &error($text{'portsentry_etrigger'});
&save_config($conf, "SCAN_TRIGGER", $in{'trigger'});

# Save list of ignored hosts
if (defined($in{'ignore'})) {
    if ($config{'portsentry_ignore'}) {
        $ign = $config{'portsentry_ignore'};
        }
    else {
        $ign = &find_value("IGNORE_FILE", $conf);
        }
    &lock_file($ign);
    $in{'ignore'} =~ s/\r//g;
    $in{'ignore'} =~ s/\n*$/\n/;
    foreach $h (split(/\s+/, $in{'ignore'})) {
        &to_ipaddress($h) ||
          ($h =~ /^([0-9\.]+)\/(\d+)/ && &check_ipaddress($1)) ||
            &error(&text('portsentry_eignore', $h));
        }
    if (defined($in{'editbelow'})) {
        open(IGNORE, $ign);
        @below = <IGNORE>;
        close(IGNORE);
        @below = @below[$in{'editbelow'} .. $#below];
        }
    &open_tempfile(IGNORE, ">$ign");
    &print_tempfile(IGNORE, $in{'ignore'});
    &print_tempfile(IGNORE, @below);
    &close_tempfile(IGNORE);
    &unlock_file($ign);
    }
&flush_file_lines();
&unlock_config_files($conf);

if ($in{'apply'}) {
    # Restart portsentry
    &stop_portsentry();
    $err = &start_portsentry();
    &error($err) if ($err);
    }
&webmin_log("portsentry");

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