Robert Birschener Posted January 14, 2014 Share Posted January 14, 2014 Encontrei um script aqui no fórum para fazer uma varredura por arquivo shell no servidor, segue abaixo o código: #!/bin/bash #Scanning all users directory for various php shell # Below command is one line so see that its one line in your script or else it will generate error echo "No PHP Shell was Found" > /root/scan.txt /bin/egrep "cgitelnet|webadmin|PHPShell|tryag|r57shell|c99shell|noexecshell|/etc/passwd|revengans|myshellexec" /home/*/public_html -R | cut -d: -f1 | uniq > /root/scan.txt /bin/cat /root/scan.txt | mail -s "PHP Shell Scan" [email="[email protected]"][email protected][/email] #Replace your email address above #Cron Settings # 0 6 * * * PATH TO SCRIPT Gostaria de saber como faço pra executar ele via ssh. Link to comment Share on other sites More sharing options...
LeandroTC Posted January 14, 2014 Share Posted January 14, 2014 Primeiro, ele deve estar com permissões de executável: chmod a+x script.sh Para rodar, basta fazer: sh script.sh ou ./script.sh Obs.: Como é um script para controle de segurança do servidor, você pode ativar uma tarefa Cron para ele... Abraços! :) Link to comment Share on other sites More sharing options...
Recommended Posts