new patterns, automation
This commit is contained in:
37
run.sh
Normal file
37
run.sh
Normal file
@@ -0,0 +1,37 @@
|
||||
#bin/sh!
|
||||
|
||||
# checking for unrelated
|
||||
echo '[*] Checking for Unrelated Data';
|
||||
echo
|
||||
echo '[*] Directories with more than 1GB size:';
|
||||
du -h ./ | grep '[0-9]G\>'
|
||||
echo
|
||||
echo '[*]Fixing file and folder permissions:';
|
||||
#directories
|
||||
find public_html/ -perm 0000 -follow -type d -print -exec chmod 755 {} \;
|
||||
find public_html/ -perm +og+w -follow -type d -print -exec chmod 755 {} \;
|
||||
# files
|
||||
find public_html/ -perm 0000 -follow -type f -print -exec chmod 644 {} \;
|
||||
find public_html/ -perm 0400 -follow -type f -print -exec chmod 644 {} \;
|
||||
find public_html/ -perm 0440 -follow -type f -print -exec chmod 644 {} \;
|
||||
find public_html/ -perm 0444 -follow -type f -print -exec chmod 644 {} \;
|
||||
find public_html/ -perm +og+w -follow -type f -print -exec chmod 644 {} \;
|
||||
# Perl/CGI
|
||||
find public_html/ -perm +og+w -follow -type f -name "*.cgi" -print -exec chmod 755 {} \;
|
||||
find public_html/ -perm +og+w -follow -type f -name "*.pl" -print -exec chmod 755 {} \;
|
||||
echo
|
||||
echo '[*] Files with more than 10M size:';
|
||||
find ./ -size +10000k -exec du -sh {} \;
|
||||
echo
|
||||
echo '[*] Running the malware cleaner:'
|
||||
perl /home/$(whoami)/public_html/LP-MSH-Scanner/malwaresh.pl $(whoami)
|
||||
echo
|
||||
echo '[*] Running the Python scanner :'
|
||||
python /home/$(whoami)/public_html/LP-MSH-Scanner/scan.py --minscore=10 /home/$(whoami) | grep filename
|
||||
echo
|
||||
echo '[*] Running the CMS Version Scanner:'
|
||||
php -d memory_limit=512M /home/$(whoami)/public_html/LP-MSH-Scanner/cms-vss.php $(whoami)
|
||||
echo
|
||||
echo '[*] Running the PHP Scanner:'
|
||||
cd /home/$(whoami)/public_html/LP-MSH-Scanner && php -d memory_limit=512M scan.php
|
||||
|
||||
Reference in New Issue
Block a user