!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/fsdump/   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:     backup.pl (3.1 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# backup.pl
# Perform a backup and send the results to someone

$no_acl_check++;
require './fsdump-lib.pl';
$dump = &get_dump($ARGV[0]);
$dump->{'id'} || die "Dump $ARGV[0] does not exist!";

# Check if this backup is already running
&foreign_require("proc", "proc-lib.pl");
@procs = &proc::list_processes();
@running = &running_dumps(\@procs);
($running) = grep { $_->{'id'} eq $dump->{'id'} &&
            $_->{'pid'} != $$ } @running;

$sfile = "$module_config_directory/$dump->{'id'}.$$.status";
if ($running) {
    # Already running! Do nothing ..
    $ok = 0;
    $out = &text('email_already', $running->{'pid'})."\n";
    }
else {
    # Update status file
    %status = ( 'status' => 'running',
            'pid' => $$,
            'start' => time() );
    &write_file($sfile, \%status);

    if ($dump->{'email'}) {
        # Save output for mailing
        $temp = &transname();
        open(OUT, ">$temp");
        }
    else {
        # Throw output away
        open(OUT, ">/dev/null");
        }

    # Create tape change wrapper
    &create_wrappers();

    $bok = &execute_before($dump, OUT, 0);
    if (!$bok && !$dump->{'beforefok'}) {
        # Before command failed!
        print OUT "\n$text{'email_ebefore'}\n";
        $status{'status'} = 'failed';
        }
    else {
        # Do the backup
        $now = time();
        $ok = &execute_dump($dump, OUT, 0, 1, $now);

        # Re-update the status file
        if ($ok) {
            # Worked .. but verify if asked
            if ($dump->{'reverify'}) {
                print OUT "\n$text{'email_verify'}\n";
                $ok = &verify_dump($dump, OUT, 0, 1, $now);
                }
            if ($ok) {
                $status{'status'} = 'complete';
                }
            else {
                $status{'status'} = 'verifyfailed';
                }
            }
        else {
            $status{'status'} = 'failed';
            }
        }
    $status{'end'} = time();
    &write_file($sfile, \%status);

    if ($status{'status'} eq 'complete') {
        # Execute the post-backup script
        $bok = &execute_after($dump, OUT, 0);
        if (!$bok && !$dump->{'afterfok'}) {
            print OUT "\n$text{'email_eafter'}\n";
            $status{'status'} = 'failed';
            $ok = 0;
            }
        }
    close(OUT);

    if ($temp) {
        # Read output
        open(OUT, $temp);
        while(<OUT>) {
            s/\r//g;
            $out .= $_;
            }
        close(OUT);
        unlink($temp);
        }
    }

if ($out && $dump->{'email'} && &foreign_check("mailboxes")) {
    # Construct the email
    &foreign_require("mailboxes", "mailboxes-lib.pl");
    $host = &get_system_hostname();
    @dirs = &dump_directories($dump);
    $dirs = join(", ", @dirs);
    %hash = ( %$dirs, 'dirs' => $dirs );
    local $subject = &substitute_template($dump->{'subject'}, \%hash) ||
             &text('email_subject', $dirs, $host);
    local $data = &text('email_subject', $dirs, $host)."\n\n";
    $data .= $out;
    $data .= "\n";
    if ($ok) {
        $data .= $text{'email_ok'}."\n";
        }
    else {
        $data .= $text{'email_failed'}."\n";
        }

    # Send the email
    if (!$ok || !$config{'error_email'}) {
        # Only send email upon failure, or it requested always
        &mailboxes::send_text_mail(&mailboxes::get_from_address(),
                       $dump->{'email'},
                       undef,
                       $subject,
                       $data,
                       $config{'smtp_server'});
        }
    }

# Check for any dumps scheduled to run after this one
foreach $follow (&list_dumps()) {
    if ($follow->{'follow'} eq $dump->{'id'} && $follow->{'enabled'} == 2) {
        system("$cron_cmd $follow->{'id'}");
        }
    }


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