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


Viewing file:     del_mailqs.cgi (2.82 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# del_mailqs.cgi
# Delete some mail messages from the queue

require './sendmail-lib.pl';
require './boxes-lib.pl';
&ReadParse();
@files = split(/\0/, $in{'file'});

if ($in{'flush'}) {
    # Flushing selected messages
    @files || &error($text{'delq_enone'});
    $access{'flushq'} || &error($text{'flushq_ecannot'});
    &ui_print_unbuffered_header(undef, $text{'flushq_title'}, "");

    # Split into quarantined and non-quarantined messages
    local @mails = map { &mail_from_queue($_) } @files;
    local @quar = grep { $_->{'quar'} } @mails;
    local @nonquar = grep { !$_->{'quar'} } @mails;

    foreach $ml (\@quar, \@nonquar) {
        next if (!@$ml);
        @files = map { $_->{'file'} } @$ml;
        $cmd = "$config{'sendmail_path'} -v -C$config{'sendmail_cf'}";
        if ($ml->[0]->{'quar'}) {
            $cmd .= " -qQ";
            }
        foreach $file (@files) {
            $file =~ s/^.*\///;
            $cmd .= " -qI$file";
            }
        if ($config{'mailq_order'}) {
            $cmd .= " -O QueueSortOrder=$config{'mailq_order'}";
            }
        print &text('flushq_desc2', scalar(@files)),"\n";
        print "<pre>";
        &foreign_require("proc", "proc-lib.pl");
        &foreign_call("proc", "safe_process_exec_logged", $cmd, 0, 0,
                  STDOUT, undef, 1);
        print "</pre>\n";
        }
    &webmin_log("flushq", undef, scalar(@files));
    }
else {
    # Deleting selected messages
    &error_setup($text{'delq_err'});
    $access{'mailq'} == 2 || &error($text{'delq_ecannot'});
    @files || &error($text{'delq_enone'});
    &ui_print_header(undef, $text{'delq_titles'}, "");

    if ($in{'confirm'} || !$config{'delete_confirm'}) {
        # Do it!
        $count = 0;
        $conf = &get_sendmailcf();
        foreach $file (@files) {
            print &text('delq_file', "<tt>$file</tt>"),"&nbsp;&nbsp;&nbsp;\n";

            local $ok;
            foreach $mqueue (&mailq_dir($conf)) {
                $ok++ if ($file =~ /^$mqueue\//);
                }
            if (!$ok) {
                print $text{'delq_efile'},"<br>\n";
                next;
                }

            if ($file =~ /\.\./) {
                print $text{'delq_efile'},"<br>\n";
                next;
                }
            if (!-r $file) {
                print $text{'delq_egone'},"<br>\n";
                next;
                }

            $mail = &mail_from_queue($file, "auto");
            if (!&can_view_qfile($mail)) {
                print $text{'delq_ecannot'},"<br>\n";
                next;
                }

            if (-r $mail->{'lfile'} && !$in{'locked'}) {
                print $text{'delq_elocked'},"<br>\n";
                next;
                }

            unlink($mail->{'file'}, $mail->{'dfile'}, $mail->{'lfile'});
            print $text{'delq_ok'},"<br>\n";
            $count++;
            }
        &webmin_log("delmailq", undef, undef, { 'count' => $count }) if ($count);
        }
    else {
        # Ask for confirmation first
        print "<center>\n";
        print &ui_form_start("del_mailqs.cgi", "post");
        print &text('delq_rusure', scalar(@files)),"<p>\n";
        foreach $f (@files) {
            print &ui_hidden("file", $f),"\n";
            }
        print &ui_hidden("locked", $in{'locked'}),"\n";
        print &ui_form_end([ [ "confirm", $text{'delq_confirm'} ] ]);
        print "</center>\n";
        }
    }
&ui_print_footer("list_mailq.cgi", $text{'mailq_return'});


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