{"id":585,"date":"2018-06-12T10:13:15","date_gmt":"2018-06-12T10:13:15","guid":{"rendered":"https:\/\/ukr.host\/kb\/?p=585"},"modified":"2025-10-06T14:59:26","modified_gmt":"2025-10-06T14:59:26","slug":"proverka-na-virusi","status":"publish","type":"post","link":"https:\/\/ukr.host\/kb\/en\/vps\/proverka-na-virusi\/","title":{"rendered":"Checking VPS Server for Viruses"},"content":{"rendered":"<p>A virtual server can have viruses just like a computer or smartphone. After all, they are united by software that can be infected by intruders.<br \/>\nIf you own VPS hosting, you should have the ability to connect to the server via SSH. By connecting through this network protocol, you will be able to install antivirus for the server or simply run it when necessary.<br \/>\nSoftware virus checking can be done through the Linux Malware Detect scanner.<\/p>\n<h2>Installing the Scanner<\/h2>\n<p>All manipulations are performed via SSH, so in the first stage, connect to the VPS server via SSH. After that, perform sequential actions in the PuTTY client in the console. Copy each of the 5 commands and paste them using the &#8220;Shift&#8221; + &#8220;Insert&#8221; combination, completing the operation by pressing the &#8220;Enter&#8221; key.<br \/>\nThe commands look as follows:<\/p>\n<pre lang=\"html\" escaped=\"true\">cd \/usr\/local\/src\/\r\nwget http:\/\/www.rfxn.com\/downloads\/maldetect-current.tar.gz\r\ntar -xzf maldetect-current.tar.gz\r\ncd maldetect-*\r\nsh .\/install.sh\r\n<\/pre>\n<h3>Starting the Scan<\/h3>\n<p>Scanning a directory for viruses on the server is launched with the following command:<\/p>\n<pre lang=\"html\" escaped=\"true\">maldet -b -a \/var\/www\/\r\n<\/pre>\n<p>If desired, you can specify a different directory for scanning.<\/p>\n<h3>Duration and Results of Virtual Server Scanning<\/h3>\n<p>Searching for viruses on the server and malicious files depends on the size of the folder or directory. Consequently, the larger the folder, the longer the scanning process will be.<br \/>\nWhether scanning has completed can be determined by entering the command<\/p>\n<pre lang=\"html\" escaped=\"true\">ps -aux | grep [m]aldet\r\n<\/pre>\n<p>Here is the output of such a command:<\/p>\n<pre lang=\"html\" escaped=\"true\">root     12429 17.8  0.0 118408  6304 pts\/0    S    09:24   1:35 bash \/usr\/local\/sbin\/maldet -b -a \/var\/www\/mysite.ua\/\r\n<\/pre>\n<p>From this example we see that the \/var\/www\/mysite.ua\/ directory is being scanned and the process is ongoing, you just need to wait for it to finish.<br \/>\nIf when running the command it outputs nothing, then the check is finished and to see the result, run:<\/p>\n<pre lang=\"html\" escaped=\"true\">maldet -e\r\n<\/pre>\n<p>Example output:<\/p>\n<pre lang=\"html\" escaped=\"true\">HOST:      78-26-128-200.vps.ukr.host\r\nSCAN ID:   160721-1022.31393\r\nSTARTED:   Jul 21 2016 02:20:34 +0400\r\nCOMPLETED: Jul 21 2016 11:32:40 +0400\r\nELAPSED:   0s [find: 0s]\r\nPATH:          \/var\/www\/mysite.ua\/\r\nTOTAL FILES:   23890\r\nTOTAL HITS:    1\r\nTOTAL CLEANED: 0\r\nWARNING: Automatic quarantine is currently disabled, detected threats are still accessible to users!\r\nTo enable, set quarantine_hits=1 and\/or to quarantine hits from this scan run:\r\n\/usr\/local\/sbin\/maldet -q 160721-1022.31393\r\nFILE HIT LIST:\r\n{MD5}php.cmdshell.unclassed.4690  :  \/var\/www\/mysite.ua\/pgtz.php\r\n<\/pre>\n<p>In the example, you can see that scanning lasted 7 hours (from 02:20:34 to 11:32:40). A total of 23890 files were scanned (TOTAL FILES) and a virus was found (TOTAL HITS).<\/p>\n<p>The infected file \/var\/www\/mysite.ua\/pgtz.php, in which cmdshell was found, is either deleted permanently or undergoes cleaning.<br \/>\nBy pressing <strong><strong>&#8220;Shift&#8221; + &#8220;:&#8221;<\/strong><\/strong> the provided scan report closes. After this window disappears, press the &#8220;q&#8221; key and then &#8220;Enter&#8221;.<\/p>\n<p>Having identified a virus on the server, be extremely careful with further actions. Carefully clean infected files, don&#8217;t accidentally delete libraries that are important for your website&#8217;s functioning. We also recommend creating a backup copy of the site before starting scanning and virus cleaning.<br \/>\nFor quality and uninterrupted website operation, it is necessary to install antivirus on the server. Installing server antivirus on hosting or VPS will significantly reduce the risk of your domain being infected, and specialists from UkrHost company will help you choose it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A virtual server can have viruses just like a computer or smartphone. After all, they are united by software that can be infected by intruders. If you own VPS hosting, you should have the ability to connect to the server&#8230;<br \/><a class=\"read-more-button\" href=\"https:\/\/ukr.host\/kb\/en\/vps\/proverka-na-virusi\/\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a><\/p>\n","protected":false},"author":1,"featured_media":587,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,58],"tags":[17,54,60],"class_list":["post-585","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vps","category-vzlom-i-zachita-site","tag-seo","tag-virus","tag-server"],"translation":{"provider":"WPGlobus","version":"3.0.0","language":"en","enabled_languages":["ru","uk","en"],"languages":{"ru":{"title":true,"content":true,"excerpt":false},"uk":{"title":true,"content":true,"excerpt":false},"en":{"title":true,"content":true,"excerpt":false}}},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.5 (Yoast SEO v26.6) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Checking VPS Server for Viruses - Ukr.Host Knowledge Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Checking VPS Server for Viruses - Ukr.Host Knowledge Base\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/\" \/>\n<meta property=\"og:site_name\" content=\"Ukr.Host Knowledge Base\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-12T10:13:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-06T14:59:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ukr.host\/kb\/wp-content\/uploads\/2018\/06\/antivirus.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"462\" \/>\n\t<meta property=\"og:image:height\" content=\"436\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"ruskam\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ruskam\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/\"},\"author\":{\"name\":\"ruskam\",\"@id\":\"https:\/\/ukr.host\/kb\/uk\/#\/schema\/person\/3c7fa537caf04a967d331159cd128f65\"},\"headline\":\"Checking VPS Server for Viruses\",\"datePublished\":\"2018-06-12T10:13:15+00:00\",\"dateModified\":\"2025-10-06T14:59:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/\"},\"wordCount\":1134,\"publisher\":{\"@id\":\"https:\/\/ukr.host\/kb\/uk\/#organization\"},\"image\":{\"@id\":\"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ukr.host\/kb\/wp-content\/uploads\/2018\/06\/antivirus.jpg\",\"keywords\":[\"seo\",\"virus\",\"\u0441\u0435\u0440\u0432\u0435\u0440\"],\"articleSection\":[\"VPS\",\"Website hacking and protection\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/\",\"url\":\"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/\",\"name\":\"Checking VPS Server for Viruses - Ukr.Host Knowledge Base\",\"isPartOf\":{\"@id\":\"https:\/\/ukr.host\/kb\/uk\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ukr.host\/kb\/wp-content\/uploads\/2018\/06\/antivirus.jpg\",\"datePublished\":\"2018-06-12T10:13:15+00:00\",\"dateModified\":\"2025-10-06T14:59:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/#primaryimage\",\"url\":\"https:\/\/ukr.host\/kb\/wp-content\/uploads\/2018\/06\/antivirus.jpg\",\"contentUrl\":\"https:\/\/ukr.host\/kb\/wp-content\/uploads\/2018\/06\/antivirus.jpg\",\"width\":462,\"height\":436,\"caption\":\"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0430\u0439\u0442\u0430 \u043d\u0430 \u0432\u0438\u0440\u0443\u0441\u044b\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ukr.host\/kb\/uk\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 VPS \u043d\u0430 \u0432\u0438\u0440\u0443\u0441\u044b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ukr.host\/kb\/uk\/#website\",\"url\":\"https:\/\/ukr.host\/kb\/uk\/\",\"name\":\"\u0411\u0430\u0437\u0430 \u0437\u043d\u0430\u043d\u044c Ukr.Host\",\"description\":\"Useful articles about hosting, domains and servers.\",\"publisher\":{\"@id\":\"https:\/\/ukr.host\/kb\/uk\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ukr.host\/kb\/uk\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/ukr.host\/kb\/uk\/#organization\",\"name\":\"UkrHost\",\"url\":\"https:\/\/ukr.host\/kb\/uk\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ukr.host\/kb\/uk\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/ukr.host\/kb\/wp-content\/uploads\/2025\/12\/logo.jpg\",\"contentUrl\":\"https:\/\/ukr.host\/kb\/wp-content\/uploads\/2025\/12\/logo.jpg\",\"width\":648,\"height\":307,\"caption\":\"UkrHost\"},\"image\":{\"@id\":\"https:\/\/ukr.host\/kb\/uk\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/ukr.host\/kb\/uk\/#\/schema\/person\/3c7fa537caf04a967d331159cd128f65\",\"name\":\"ruskam\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ukr.host\/kb\/uk\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/219f09b013fa34010e8cf9182ca886a772d879221eee5f4da1ec75a87c9daef8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/219f09b013fa34010e8cf9182ca886a772d879221eee5f4da1ec75a87c9daef8?s=96&d=mm&r=g\",\"caption\":\"ruskam\"},\"url\":\"https:\/\/ukr.host\/kb\/en\/author\/ruskam\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Checking VPS Server for Viruses - Ukr.Host Knowledge Base","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/","og_locale":"en_US","og_type":"article","og_title":"Checking VPS Server for Viruses - Ukr.Host Knowledge Base","og_url":"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/","og_site_name":"Ukr.Host Knowledge Base","article_published_time":"2018-06-12T10:13:15+00:00","article_modified_time":"2025-10-06T14:59:26+00:00","og_image":[{"width":462,"height":436,"url":"https:\/\/ukr.host\/kb\/wp-content\/uploads\/2018\/06\/antivirus.jpg","type":"image\/jpeg"}],"author":"ruskam","twitter_card":"summary_large_image","twitter_misc":{"Written by":"ruskam","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/#article","isPartOf":{"@id":"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/"},"author":{"name":"ruskam","@id":"https:\/\/ukr.host\/kb\/uk\/#\/schema\/person\/3c7fa537caf04a967d331159cd128f65"},"headline":"Checking VPS Server for Viruses","datePublished":"2018-06-12T10:13:15+00:00","dateModified":"2025-10-06T14:59:26+00:00","mainEntityOfPage":{"@id":"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/"},"wordCount":1134,"publisher":{"@id":"https:\/\/ukr.host\/kb\/uk\/#organization"},"image":{"@id":"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/#primaryimage"},"thumbnailUrl":"https:\/\/ukr.host\/kb\/wp-content\/uploads\/2018\/06\/antivirus.jpg","keywords":["seo","virus","\u0441\u0435\u0440\u0432\u0435\u0440"],"articleSection":["VPS","Website hacking and protection"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/","url":"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/","name":"Checking VPS Server for Viruses - Ukr.Host Knowledge Base","isPartOf":{"@id":"https:\/\/ukr.host\/kb\/uk\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/#primaryimage"},"image":{"@id":"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/#primaryimage"},"thumbnailUrl":"https:\/\/ukr.host\/kb\/wp-content\/uploads\/2018\/06\/antivirus.jpg","datePublished":"2018-06-12T10:13:15+00:00","dateModified":"2025-10-06T14:59:26+00:00","breadcrumb":{"@id":"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/#primaryimage","url":"https:\/\/ukr.host\/kb\/wp-content\/uploads\/2018\/06\/antivirus.jpg","contentUrl":"https:\/\/ukr.host\/kb\/wp-content\/uploads\/2018\/06\/antivirus.jpg","width":462,"height":436,"caption":"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0430\u0439\u0442\u0430 \u043d\u0430 \u0432\u0438\u0440\u0443\u0441\u044b"},{"@type":"BreadcrumbList","@id":"https:\/\/ukr.host\/kb\/vps\/proverka-na-virusi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ukr.host\/kb\/uk\/"},{"@type":"ListItem","position":2,"name":"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 VPS \u043d\u0430 \u0432\u0438\u0440\u0443\u0441\u044b"}]},{"@type":"WebSite","@id":"https:\/\/ukr.host\/kb\/uk\/#website","url":"https:\/\/ukr.host\/kb\/uk\/","name":"\u0411\u0430\u0437\u0430 \u0437\u043d\u0430\u043d\u044c Ukr.Host","description":"Useful articles about hosting, domains and servers.","publisher":{"@id":"https:\/\/ukr.host\/kb\/uk\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ukr.host\/kb\/uk\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ukr.host\/kb\/uk\/#organization","name":"UkrHost","url":"https:\/\/ukr.host\/kb\/uk\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ukr.host\/kb\/uk\/#\/schema\/logo\/image\/","url":"https:\/\/ukr.host\/kb\/wp-content\/uploads\/2025\/12\/logo.jpg","contentUrl":"https:\/\/ukr.host\/kb\/wp-content\/uploads\/2025\/12\/logo.jpg","width":648,"height":307,"caption":"UkrHost"},"image":{"@id":"https:\/\/ukr.host\/kb\/uk\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/ukr.host\/kb\/uk\/#\/schema\/person\/3c7fa537caf04a967d331159cd128f65","name":"ruskam","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ukr.host\/kb\/uk\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/219f09b013fa34010e8cf9182ca886a772d879221eee5f4da1ec75a87c9daef8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/219f09b013fa34010e8cf9182ca886a772d879221eee5f4da1ec75a87c9daef8?s=96&d=mm&r=g","caption":"ruskam"},"url":"https:\/\/ukr.host\/kb\/en\/author\/ruskam\/"}]}},"_links":{"self":[{"href":"https:\/\/ukr.host\/kb\/en\/wp-json\/wp\/v2\/posts\/585","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ukr.host\/kb\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ukr.host\/kb\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ukr.host\/kb\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ukr.host\/kb\/en\/wp-json\/wp\/v2\/comments?post=585"}],"version-history":[{"count":7,"href":"https:\/\/ukr.host\/kb\/en\/wp-json\/wp\/v2\/posts\/585\/revisions"}],"predecessor-version":[{"id":1047,"href":"https:\/\/ukr.host\/kb\/en\/wp-json\/wp\/v2\/posts\/585\/revisions\/1047"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ukr.host\/kb\/en\/wp-json\/wp\/v2\/media\/587"}],"wp:attachment":[{"href":"https:\/\/ukr.host\/kb\/en\/wp-json\/wp\/v2\/media?parent=585"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ukr.host\/kb\/en\/wp-json\/wp\/v2\/categories?post=585"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ukr.host\/kb\/en\/wp-json\/wp\/v2\/tags?post=585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}