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


Viewing file:     edit_html.cgi (2.37 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Show an HTML editor window

$trust_unknown_referers = 1;
require './file-lib.pl';
do '../ui-lib.pl';
$disallowed_buttons{'edit'} && &error($text{'ebutton'});
&ReadParse();

# Work out editing mode
if ($in{'text'} || $in{'file'} && !&is_html_file($in{'file'})) {
    $text_mode = 1;
    }

if (!&can_access($in{'file'})) {
    # ACL rules prevent access to file
    &error_exit(&text('view_eaccess', &html_escape($in{'file'})));
    }

&popup_header($in{'file'} ? $text{'html_title'} : $text{'html_title2'},
          undef, $text_mode ? undef : "onload='xinha_init()'");

# Output HTMLarea init code
print <<EOF;
<script type="text/javascript">
  _editor_url = "$gconfig{'webprefix'}/$module_name/xinha/";
  _editor_lang = "en";
</script>
<script type="text/javascript" src="xinha/XinhaCore.js"></script>

<script type="text/javascript">
xinha_init = function()
{
xinha_editors = [ "body" ];
xinha_plugins = [ ];
xinha_config = new Xinha.Config();
xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
Xinha.startEditors(xinha_editors);
}
</script>
EOF

# Read the file
&switch_acl_uid_and_chroot();
$data = &read_file_contents($in{'file'});

# Output text area
print &ui_form_start("save_html.cgi", "form-data");
print &ui_hidden("text", $text_mode);
if ($in{'file'}) {
    # Editing existing file
    print &ui_hidden("file", $in{'file'});
    $pc = 95;
    }
else {
    # Creating new, so prompt for path
    print $text{'edit_filename'}," ",
          &ui_textbox("file", $in{'dir'}, 70),"<br>\n";
    $pc = 90;
    }
if ($text_mode) {
    # Show plain textarea
    print "<textarea rows=20 cols=80 style='width:100%;height:$pc%' name=body>";
    print &html_escape($data);
    print "</textarea>\n";
    print &ui_submit($text{'html_save'});
    }
else {
    # Show HTML editor
    print "<textarea rows=20 cols=80 style='width:100%;height:$pc%' name=body id=body>";
    print &html_escape($data);
    print "</textarea>\n";
    print "<table width=100%><tr>\n";
    print "<td>",&ui_submit($text{'html_save'}),"</td>\n";
    print "<td align=right><a href='edit_html.cgi?file=".
         &urlize($in{'file'})."&text=1'>$text{'edit_textmode'}</a></td>\n";
    print "</tr> </table>\n";
    }
print &ui_form_end();

&popup_footer();

sub is_html_file
{
local ($file) = @_;
local @exts = split(/\s+/, $userconfig{'htmlexts'} || $config{'htmlexts'});
@exts = ( ".htm", ".html", ".shtml" ) if (!@exts);
foreach my $e (@exts) {
    return 1 if ($file =~ /\Q$e\E$/i);
    }
return 0;
}

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