!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/acl/   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_sql.cgi (3.27 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Show form for an external user / group database

require './acl-lib.pl';
$access{'sql'} || &error($text{'sql_ecannot'});
&ui_print_header(undef, $text{'sql_title'}, "");
&get_miniserv_config(\%miniserv);

print &ui_form_start("save_sql.cgi");
print &ui_table_start($text{'sql_header'}, undef, 2);

($proto, $user, $pass, $host, $prefix, $args) =
    &split_userdb_string($miniserv{'userdb'});

# Build inputs for MySQL backend
@mysqlgrid = ( );
push(@mysqlgrid,
     $text{'sql_host'},
     &ui_textbox("mysql_host", $proto eq "mysql" ? $host : "", 30));
push(@mysqlgrid,
     $text{'sql_user'},
     &ui_textbox("mysql_user", $proto eq "mysql" ? $user : "", 30));
push(@mysqlgrid,
     $text{'sql_pass'},
     &ui_textbox("mysql_pass", $proto eq "mysql" ? $pass : "", 30));
push(@mysqlgrid,
     $text{'sql_db'},
     &ui_textbox("mysql_db", $proto eq "mysql" ? $prefix : "", 30));
$mysqlgrid = &ui_grid_table(\@mysqlgrid, 2, 100);

# Build inputs for PostgreSQL backend
@postgresqlgrid = ( );
push(@postgresqlgrid,
     $text{'sql_host'},
     &ui_textbox("postgresql_host", $proto eq "postgresql" ? $host : "", 30));
push(@postgresqlgrid,
     $text{'sql_user'},
     &ui_textbox("postgresql_user", $proto eq "postgresql" ? $user : "", 30));
push(@postgresqlgrid,
     $text{'sql_pass'},
     &ui_textbox("postgresql_pass", $proto eq "postgresql" ? $pass : "", 30));
push(@postgresqlgrid,
     $text{'sql_db'},
     &ui_textbox("postgresql_db", $proto eq "postgresql" ? $prefix : "", 30));
$postgresqlgrid = &ui_grid_table(\@postgresqlgrid, 2, 100);

# Build inputs for LDAP backend
@ldapgrid = ( );
push(@ldapgrid,
     $text{'sql_host'},
     &ui_textbox("ldap_host", $proto eq "ldap" ? $host : "", 30));
push(@ldapgrid,
     $text{'sql_ssl'},
     &ui_radio("ldap_ssl", $args->{'scheme'} eq 'ldaps' ? 1 :
               $args->{'tls'} ? 2 : 0,
           [ [ 0, $text{'sql_ssl0'} ],
             [ 1, $text{'sql_ssl1'} ],
             [ 2, $text{'sql_ssl2'} ] ]));
push(@ldapgrid,
     $text{'sql_user'},
     &ui_textbox("ldap_user", $proto eq "ldap" ? $user : "", 30));
push(@ldapgrid,
     $text{'sql_pass'},
     &ui_textbox("ldap_pass", $proto eq "ldap" ? $pass : "", 30));
push(@ldapgrid,
     $text{'sql_prefix'},
     &ui_textbox("ldap_prefix", $proto eq "ldap" ? $prefix : "", 30));
push(@ldapgrid,
     $text{'sql_userclass'},
     &ui_textbox("ldap_userclass", $proto eq "ldap" && $args->{'userclass'} ?
                     $args->{'userclass'} : "webminUser", 30));
push(@ldapgrid,
     $text{'sql_groupclass'},
     &ui_textbox("ldap_groupclass", $proto eq "ldap" && $args->{'groupclass'} ?
                     $args->{'groupclass'} : "webminGroup",30));
push(@ldapgrid,
     &ui_button($text{'sql_schema'}, undef, 0,
        "onClick='window.location=\"schema.cgi\"'"), "");
$ldapgrid = &ui_grid_table(\@ldapgrid, 2, 100);

print &ui_table_row(undef,
    &ui_radio_table("proto", $proto,
        [ [ '', $text{'sql_none'} ],
          [ 'mysql', $text{'sql_mysql'}, $mysqlgrid ],
          [ 'postgresql', $text{'sql_postgresql'}, $postgresqlgrid ],
          [ 'ldap', $text{'sql_ldap'}, $ldapgrid ] ]), 2);

print &ui_table_row(undef,
    &ui_radio("addto", int($miniserv{'userdb_addto'}),
          [ [ 0, $text{'sql_addto0'} ],
            [ 1, $text{'sql_addto1'} ] ]), 2);

print &ui_table_end();
print &ui_form_end([ [ undef, $text{'save'} ] ]);

&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.0075 ]--