my server was hacked, and I am now trying to locate all the "strange" files. I am running:
find . -type f -name '*' | xargs grep -l "Mini Shell"
This command is helping me a lot to find and delete malicious code.
However this is also giving me a lot of errors, and it covers all my shell, and I can't easily locate the found grepped files. This is an example of what I see:
grep: Player: No such file or directory
grep: Quick: No such file or directory
grep: Start: No such file or directory
grep: Guide.pdf: No such file or directory
grep: ./domain1.pl/wp-content/themes/kingsize/images/social/1.: No such file or directory
grep: license.txt: No such file or directory
grep: ./domain1.pl/wp-content/themes/kingsize/documentation/Express: No such file or directory
grep: Install.xml: No such file or directory
grep: ./domain2.net/wp-content/plugins/google-analytics-for-wordpress/assets/dependencies/datatables/images/Sorting: No such file or directory
grep: icons.psd: No such file or directory
./domain3.in/admin/static/radio.php
In the text above, there is only 1 malicious file, what I was looking for. All the other messages are trash. How can I avoid to get such "No such file or directory" messages in the grep query?
It's like it breaks when it finds filenames with a space in it.
Thanks