Tag Archives: security

How to mass chmod file and folder ?

Mass chmod folder :

find /home/*/public_html -type d -exec chmod 755 {} \;

Mass chmod file :

find /home/*/public_html -type f -exec chmod 644 {} \;

Tested with freebsd server and working 100% :D

Find r57 and c99 Shells Hidden Inside PHP and TXT Files

When malicious intruders compromise a web server, there’s an excellent chance a famous Russian PHP script, r57shell, will follow. The r57shell PHP script gives the intruder a number of capabilities, including, but not limited to: downloading files, uploading files, creating backdoors, setting up a spam relay, forging email, bouncing a connection to decrease the risk of being caught, and even taking control of SQL databases. All these functions become readily available through an easy to use web interface, but now you can fight back.

A Turkish member on a forum I participate in released this nifty little bash command, but first, make sure you execute updatedb so find has an up to date image to search:

find /var/www/ -name "*".php -type f -print0 | xargs -0 grep r57 | uniq -c | sort -u | cut -d":" -f1 | awk '{print "rm -rf " $2}' | uniq

You can also search regular text (.txt) files: