EICAR-AV-Test<\/em>. Use the following command to download the test file to your home directory.<\/p>\n\n\n\nwget -P ~\/ http:\/\/www.eicar.org\/download\/eicar.com<\/pre>\n\n\n\nNow scan your home folder again with the same command as above, you should receive notice of one infected file at the end summary after the scan is completed. When you\u2019ve confirmed that ClamAV finds the test file correctly, use the command below to scan it again and remove the infected file once found.<\/p>\n\n\n\n
sudo clamscan --infected --remove --recursive \/home<\/pre>\n\n\n\nBe careful when using the \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.<\/p>\n\n\n\n
sudo apt-get 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 start\u00a0the scanner with the following.<\/p>\n\n\n\n
sudo rkhunter --checkall<\/pre>\n\n\n\nThe scanner runs 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 recording 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 another 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 Ubuntu systems use the following.<\/p>\n\n\n\n
sudo apt-get 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. Note that on Ubuntu 14.04 using chkrootkit<\/tt> version 0.49 it\u2019s possible to get a false positive warning for Suckit rootkit, use rkhunter<\/tt> to double check.<\/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 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 chkrootkit<\/tt> can be used to help determine if a machine has been compromised, it shouldn\u2019t be taken as the \u2018final word\u2019, use it in conjunction with other scanners to diagnose any possible infections.<\/p>\n","protected":false},"featured_media":27369,"comment_status":"open","ping_status":"closed","template":"","community-category":[121,123],"class_list":["post-24623","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\/24623","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=24623"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media\/27369"}],"wp:attachment":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media?parent=24623"}],"wp:term":[{"taxonomy":"community-category","embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/community-category?post=24623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}