\u2013remove<\/em> parameter. First, run a broader scan without it, and then a more localized scan when removing files or removing them manually.<\/p>\n\n\n\nTo perform a complete scan of your cloud server, use this command.<\/p>\n\n\n\n
sudo clamscan --infected --recursive --exclude-dir=\"^\/sys\" \/<\/pre>\n\n\n\nThe scan goes through each directory in your system root recursively, but skips \/sys<\/em> just to avoid unnecessary warning printouts, as the virtual file system consists of some unreadable files, which could not contain viruses anyway.<\/p>\n\n\n\nRkhunter<\/h2>\n\n\n\n
Rkhunter is a common option for scanning your system for rootkits and general vulnerabilities. It can be easily installed using the package manager on Debian systems.<\/p>\n\n\n\n
sudo aptitude install rkhunter<\/pre>\n\n\n\nOnce installed and before scanning, you\u2019ll need to update the file properties database.<\/p>\n\n\n\n
sudo rkhunter --propupd<\/pre>\n\n\n\nThis lets the scanner know the current state of certain files to prevent some false alarms. After the update, simply run the scanner with the following.<\/p>\n\n\n\n
sudo rkhunter --checkall<\/pre>\n\n\n\nThe scanner goes through some system commands, checks for actual rootkits and some malware, network and local host settings, and then give you the summary as well as records the findings to a log file.<\/p>\n\n\n\n
Afterwards, you can get a condensed look at the scan log with this command.<\/p>\n\n\n\n
sudo cat \/var\/log\/rkhunter.log | grep -i warning<\/pre>\n\n\n\nGo through the output to get some tips on what you could do to improve your system security.<\/p>\n\n\n\n
Chkrootkit<\/h2>\n\n\n\n
Chkrootkit is a popular rootkit scanner, which\u00a0runs a lot of useful checks and can direct suspicions towards finding a solution. It can be installed on most distributions with the package manager, on a Debian server\u00a0using the following.<\/p>\n\n\n\n
sudo aptitude install chkrootkit<\/pre>\n\n\n\nOnce done, scan your server with this command.<\/p>\n\n\n\n
sudo chkrootkit<\/pre>\n\n\n\nThe scan will check for many types of infections and print out its findings. You can scroll through the output to check for any warnings.<\/p>\n\n\n\n
Chkrootkit doesn\u2019t write reports other than outputting to the screen by default, but if you wish to automate the checks or to take a look at the findings later, use the tee<\/em> command to redirect the printout\u00a0to a log file.<\/p>\n\n\n\nsudo chkrootkit | sudo tee \/var\/log\/chkrootkit\/chkrootkit.log<\/pre>\n\n\n\nYou can then easily check the log for any warnings.<\/p>\n\n\n\n
sudo cat \/var\/log\/chkrootkit\/chkrootkit.log | grep -i warning<\/pre>\n\n\n\nWhile\u00a0the option can be used to help determine if a machine has been compromised, it\u00a0shouldn\u2019t be taken\u00a0as the \u2018final word\u2019, use it together\u00a0with other scanners to diagnose any possible infections.<\/p>\n","protected":false},"featured_media":27370,"comment_status":"open","ping_status":"closed","template":"","community-category":[121,123],"class_list":["post-24625","tutorial","type-tutorial","status-publish","has-post-thumbnail","hentry","community-category-security","community-category-troubleshooting"],"acf":[],"_links":{"self":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/tutorial\/24625","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/tutorial"}],"about":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/types\/tutorial"}],"replies":[{"embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/comments?post=24625"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media\/27370"}],"wp:attachment":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media?parent=24625"}],"wp:term":[{"taxonomy":"community-category","embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/community-category?post=24625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}