!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/spam/   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:     edit_report.cgi (3.94 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# edit_report.cgi
# Display a form for editing the spam report text

require './spam-lib.pl';
&ReadParse();
&set_config_file_in(\%in);
&can_use_check("report");
&ui_print_header($header_subtext, $text{'report_title'}, "");
$conf = &get_config();

print "$text{'report_desc'}<p>\n";
&start_form("save_report.cgi", $text{'report_header'});

if (&version_atleast(3.0)) {
    # New version can replace subject, from and to headers
    @rheader = &find("rewrite_header", $conf);
    foreach $h ("subject", "from", "to") {
        ($hn) = grep { lc($_->{'words'}->[0]) eq $h } @rheader;
        print &ui_table_row($text{'report_r'.$h},
            &opt_field("rewrite_header_${h}",
                   $hn ? join(" ", @{$hn->{'words'}}[1..@{$hn->{'words'}}-1]) : undef, 15));
        }
    }
else {
    # Older versions can only replace subject header
    $rewrite = &find("rewrite_subject", $conf);
    print &ui_table_row($text{'report_rewrite'},
        &yes_no_field("rewrite_subject", $rewrite, 1));

    $subject = &find("subject_tag", $conf);
    print &ui_table_row($text{'report_subject'},
        &opt_field("subject_tag", $subject, 15, "*****SPAM*****"));
    }

# Include report in headers
$header = &find("report_header", $conf);
print &ui_table_row($text{'report_rheader'},
    &yes_no_field("report_header", $header, 0));

# Terse report mode
$terse = &find("use_terse_report", $conf);
print &ui_table_row($text{'report_useterse'},
    &yes_no_field("use_terse_report", $terse, 0));

# Split status header?
$fold = &find("fold_headers", $conf);
print &ui_table_row($text{'report_fold'},
    &yes_no_field("fold_headers", $fold, 1));

# Include details of spam phrases
$detail = &find("detailed_phrase_score", $conf);
print &ui_table_row($text{'report_detail'},
    &yes_no_field("detailed_phrase_score", $detail, 0));

if (!&version_atleast(3.0)) {
    # Include stars header
    $stars = &find("spam_level_stars", $conf);
    print &ui_table_row($text{'report_stars'},
        &yes_no_field("spam_level_stars", $stars, 1));
    }

# Character for stars
$char = &find("spam_level_char", $conf);
print &ui_table_row($text{'report_char'},
    &opt_field("spam_level_char", $char, 2, "*"));

# Remove MIME blocks
$defang = &find("defang_mime", $conf);
print &ui_table_row($text{'report_defang'},
    &yes_no_field("defang_mime", $defang, 1));

if (&version_atleast(2.6)) {
    $safe = &find("report_safe", $conf);
    print &ui_table_row($text{'report_safe'},
        &option_field("report_safe", $safe, 1,
                  [ [ 0, $text{'no'} ],
                [ 1, $text{'yes'} ],
                [ 2, $text{'report_safe2'} ] ]));
    }

print &ui_table_hr();

# Extra report to attach to spam messages
@report = &find_value("report", $conf);
$clear = &find("clear_report_template", $conf);
print &ui_table_row($text{'report_report'},
    &ui_radio("clear_report", $clear ? 1 : 0,
          [ [ 0, $text{'report_noclear'} ],
            [ 1, $text{'report_clear'} ] ])."<br>\n".
    &ui_textarea("report", join("\n", @report), 5, 80));

# Extra report to attach to spam messages, for terse mode
@report = &find_value("terse_report", $conf);
$clear = &find("clear_terse_report_template", $conf);
print &ui_table_row($text{'report_terse'},
    &ui_radio("clear_terse", $clear ? 1 : 0,
          [ [ 0, $text{'report_noclear'} ],
            [ 1, $text{'report_clear'} ] ])."<br>\n".
    &ui_textarea("terse", join("\n", @report), 5, 80));

# Additional headers to add
if (&version_atleast(3)) {
    print &ui_table_hr();
    $table = &ui_columns_start([ $text{'report_addfor'},
                  $text{'report_addheader'},
                  $text{'report_addtext'} ]);
    $i = 0;
    foreach $a (&find_value("add_header", $conf), undef) {
        local ($for, $header, $text) = split(/\s+/, $a, 3);
        $table .= &ui_columns_row([
            &ui_select("addfor_$i", $for,
                   [ [ "", "&nbsp;" ],
                     map { [ $_, $text{'report_add'.$_} ] }
                     ( "spam", "ham", "all" ) ]),
            &ui_textbox("addheader_$i", $header, 30),
            &ui_textbox("addtext_$i", $text, 30)
                ]);
        $i++;
        }
    $table .= &ui_columns_end();
    print &ui_table_row($text{'report_adds'}, $table);
    }


&end_form(undef, $text{'save'});
&ui_print_footer($redirect_url, $text{'index_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.0231 ]--