{"id":13851,"date":"2019-04-06T11:40:36","date_gmt":"2019-04-06T11:40:36","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=13851"},"modified":"2019-04-06T11:40:36","modified_gmt":"2019-04-06T11:40:36","slug":"lynis-2-5-5-released-security-auditing-and-scanning-tool-for-linux-systems","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/06\/lynis-2-5-5-released-security-auditing-and-scanning-tool-for-linux-systems\/","title":{"rendered":"Lynis 2.5.5 Released \u2013 Security Auditing and Scanning Tool for Linux Systems"},"content":{"rendered":"<p><strong>Lynis<\/strong>\u00a0is an open source and much powerful\u00a0<strong>auditing tool<\/strong>\u00a0for Unix\/Linux like operating systems. It scans system for security information, general system information, installed and available software information, configuration mistakes, security issues, user accounts without password, wrong file permissions, firewall auditing, etc.<\/p>\n<p><strong>Lynis<\/strong>\u00a0is one of the most trusted automated auditing tool for software patch management,\u00a0<a href=\"https:\/\/www.tecmint.com\/install-linux-malware-detect-lmd-in-rhel-centos-and-fedora\/\" target=\"_blank\" rel=\"noopener\">malware scanning and vulnerability detecting<\/a>\u00a0in Unix\/Linux based systems. This tool is useful for\u00a0<strong>auditors<\/strong>,\u00a0<strong>network<\/strong>\u00a0and\u00a0<strong>system administrators<\/strong>,\u00a0<strong>security specialists<\/strong>\u00a0and\u00a0<strong>penetration testers<\/strong>.<\/p>\n<p>A new major upgrade version of\u00a0<strong>Lynis 2.5.5<\/strong>\u00a0is released just now, after months of development, which comes with some new features and tests, and many small improvements. I encourage all Linux users to test and upgrade to this most recent version of Lynis.<\/p>\n<p>In this article we are going to show you how to install\u00a0<strong>Lynis 2.5.5<\/strong>\u00a0(<strong>Linux Auditing Tool<\/strong>) in Linux systems using source tarball files.<\/p>\n<p><b>Please Read Also :<\/b><\/p>\n<ol>\n<li><a href=\"https:\/\/www.tecmint.com\/install-configserver-security-firewall-csf-in-rhel-centos-fedora\/\" target=\"_blank\" rel=\"noopener\">Install ConfigServer Security &amp; Firewall (CSF)<\/a><\/li>\n<li><a href=\"https:\/\/www.tecmint.com\/install-linux-rkhunter-rootkit-hunter-in-rhel-centos-and-fedora\/\" target=\"_blank\" rel=\"noopener\">Install Linux Rkhunter (Rootkit Hunter)<\/a><\/li>\n<li><a href=\"https:\/\/www.tecmint.com\/install-linux-malware-detect-lmd-in-rhel-centos-and-fedora\/\" target=\"_blank\" rel=\"noopener\">Install Linux Malware Detect (LMD)<\/a><\/li>\n<\/ol>\n<h3>Installation of Lynis<\/h3>\n<p><strong>Lynis<\/strong>\u00a0doesn\u2019t required any installation, it can be used directly from any directory. So, its good idea to create a custom directory for\u00a0<strong>Lynis<\/strong>\u00a0under\u00a0<code>\/usr\/local\/lynis<\/code>.<\/p>\n<pre># mkdir \/usr\/local\/lynis<\/pre>\n<p>Download stable version of\u00a0<strong>Lynis<\/strong>\u00a0source files from the trusted website using\u00a0<a href=\"https:\/\/www.tecmint.com\/10-wget-command-examples-in-linux\/\" target=\"_blank\" rel=\"noopener\">wget command<\/a>\u00a0and unpack it using\u00a0<a href=\"https:\/\/www.tecmint.com\/18-tar-command-examples-in-linux\/\" target=\"_blank\" rel=\"noopener\">tar command<\/a>\u00a0as shown below.<\/p>\n<pre># cd \/usr\/local\/lynis\r\n# wget https:\/\/cisofy.com\/files\/lynis-2.5.5.tar.gz\r\n<\/pre>\n<div id=\"attachment_19554\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Download-Lynis-Linux-Audit-Tool.png\" rel=\"attachment wp-att-19554\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19554\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Download-Lynis-Linux-Audit-Tool.png\" sizes=\"auto, (max-width: 795px) 100vw, 795px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Download-Lynis-Linux-Audit-Tool.png 795w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Download-Lynis-Linux-Audit-Tool-768x286.png 768w\" alt=\"Download Lynis Linux Audit Tool\" width=\"795\" height=\"296\" aria-describedby=\"caption-attachment-19554\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-19554\" class=\"wp-caption-text\">Download Lynis Linux Audit Tool<\/p>\n<\/div>\n<p>Unpack the tarball<\/p>\n<pre># tar -xvf lynis-2.5.5.tar.gz\r\n<\/pre>\n<div id=\"attachment_19555\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Unpack-Lynis-Tool.png\" rel=\"attachment wp-att-19555\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19555\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Unpack-Lynis-Tool.png\" alt=\"Unpack Lynis Tool\" width=\"547\" height=\"427\" aria-describedby=\"caption-attachment-19555\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-19555\" class=\"wp-caption-text\">Unpack Lynis Tool<\/p>\n<\/div>\n<h3>Running and Using Lynis Basics<\/h3>\n<p>You must be\u00a0<strong>root<\/strong>\u00a0user to run\u00a0<strong>Lynis<\/strong>, because it creates and writes output to\u00a0<code>\/var\/log\/lynis.log<\/code>\u00a0file. To run\u00a0<strong>Lynis<\/strong>\u00a0execute the following command.<\/p>\n<pre># cd lynis\r\n# .\/lynis<\/pre>\n<p>By running\u00a0<code>.\/lynis<\/code>\u00a0without any option, it will provide you a complete list of available parameters and goes back to the shell prompt. See figure below.<\/p>\n<div id=\"attachment_19557\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Lynis-Basic-Options.png\" rel=\"attachment wp-att-19557\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19557\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Lynis-Basic-Options.png\" sizes=\"auto, (max-width: 892px) 100vw, 892px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Lynis-Basic-Options.png 892w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Lynis-Basic-Options-768x509.png 768w\" alt=\"Lynis Basic Options and Help\" width=\"892\" height=\"591\" aria-describedby=\"caption-attachment-19557\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-19557\" class=\"wp-caption-text\">Lynis Basic Options and Help<\/p>\n<\/div>\n<p>To start\u00a0<strong>Lynis<\/strong>\u00a0process, you must define a\u00a0<code>--check-all<\/code>\u00a0parameter to begin scanning of your entire\u00a0<strong>Linux<\/strong>system. Use the following command to start scan with parameters as shown below.<\/p>\n<pre># .\/lynis --check-all<\/pre>\n<p>Once, you execute above command it will start scanning your system and ask you to\u00a0<strong>Press [Enter] to continue, or [CTRL]+C to stop)<\/strong>\u00a0every process it scans and completes. See figure attached below.<\/p>\n<div id=\"attachment_19558\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Scan-Linux-System.png\" rel=\"attachment wp-att-19558\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19558\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Scan-Linux-System.png\" sizes=\"auto, (max-width: 892px) 100vw, 892px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Scan-Linux-System.png 892w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Scan-Linux-System-768x509.png 768w\" alt=\"Lynis: Scanning Entire Linux System\" width=\"892\" height=\"591\" aria-describedby=\"caption-attachment-19558\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-19558\" class=\"wp-caption-text\">Lynis: Scanning Entire Linux System<\/p>\n<\/div>\n<div id=\"attachment_19559\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Lynis-Security-Scan-Details.png\" rel=\"attachment wp-att-19559\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19559\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Lynis-Security-Scan-Details.png\" sizes=\"auto, (max-width: 892px) 100vw, 892px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Lynis-Security-Scan-Details.png 892w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Lynis-Security-Scan-Details-768x509.png 768w\" alt=\"Lynis Security Scan Details\" width=\"892\" height=\"591\" aria-describedby=\"caption-attachment-19559\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-19559\" class=\"wp-caption-text\">Lynis Security Scan Details<\/p>\n<\/div>\n<p>To prevent such acknowledgment (i.e. \u201c<strong>press enter to continue<\/strong>\u201d) from user while scanning, you need use\u00a0<code>-c<\/code>and\u00a0<code>-Q<\/code>\u00a0parameters as shown below.<\/p>\n<pre># .\/lynis -c -Q<\/pre>\n<p>It will do complete scan without waiting for any user acknowledgment. See the following screencast.<\/p>\n<div id=\"attachment_19560\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Lynis-Scanning-Linux-File-System.gif\" rel=\"attachment wp-att-19560\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19560\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Lynis-Scanning-Linux-File-System.gif\" sizes=\"auto, (max-width: 892px) 100vw, 892px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Lynis-Scanning-Linux-File-System.gif 892w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Lynis-Scanning-Linux-File-System-768x509.gif 768w\" alt=\"Lynis: Scanning Linux File System\" width=\"892\" height=\"591\" aria-describedby=\"caption-attachment-19560\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-19560\" class=\"wp-caption-text\">Lynis: Scanning Linux File System<\/p>\n<\/div>\n<h3>Creating Lynis Cronjobs<\/h3>\n<p>If you would like to create a daily scan report of your system, then you need to set a cron job for it. Run the following command at the shell.<\/p>\n<pre># crontab -e<\/pre>\n<p>Add the following cron job with option\u00a0<code>--cronjob<\/code>\u00a0all the special characters will be ignored from the output and the scan will run completely automated.<\/p>\n<pre>30\t22\t*\t*\t*\troot    \/path\/to\/lynis -c -Q --auditor \"automated\" --cronjob<\/pre>\n<p>The above example cron job will run daily at\u00a0<strong>10:30pm<\/strong>\u00a0in the night and creates a daily report under\u00a0<code>\/var\/log\/lynis.log<\/code>\u00a0file.<\/p>\n<h3>Lynis Scanning Results<\/h3>\n<p>While scanning you will see output as [<strong>OK<\/strong>] or [<strong>WARNING<\/strong>]. Where [<strong>OK<\/strong>] considered as good result and [<strong>WARNING<\/strong>] as bad. But it doesn\u2019t mean that [<strong>OK<\/strong>] result is correctly configured and [<strong>WARNING<\/strong>] doesn\u2019t have to be bad. You should take corrective steps to fix those issues after reading logs at\u00a0<code>\/var\/log\/lynis.log<\/code>.<\/p>\n<p>In most cases, the scan provides\u00a0<strong>suggestion to fix<\/strong>\u00a0problems at the end of the scan. See the attached figure that provides a list of suggestion to fix problems.<\/p>\n<div id=\"attachment_19561\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Lynis-Scan-Log.png\" rel=\"attachment wp-att-19561\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19561\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Lynis-Scan-Log.png\" sizes=\"auto, (max-width: 892px) 100vw, 892px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Lynis-Scan-Log.png 892w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Lynis-Scan-Log-768x509.png 768w\" alt=\"Lynis Suggestions Tips\" width=\"892\" height=\"591\" aria-describedby=\"caption-attachment-19561\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-19561\" class=\"wp-caption-text\">Lynis Suggestions Tips<\/p>\n<\/div>\n<h3>Updating Lynis<\/h3>\n<p>If you want to\u00a0<strong>update<\/strong>\u00a0or\u00a0<strong>upgrade<\/strong>\u00a0current lynis version, simple type the following command it will download and install latest version of lynis.<\/p>\n<pre># .\/lynis update info         [Show update details]\r\n# .\/lynis update release      [Update Lynis release]\r\n<\/pre>\n<p>See the attached output of the above command in the figure. It says our lynis version is\u00a0<strong>Up-to-date<\/strong>.<\/p>\n<div id=\"attachment_19562\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Update-Lynis.png\" rel=\"attachment wp-att-19562\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19562\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Update-Lynis.png\" sizes=\"auto, (max-width: 902px) 100vw, 902px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Update-Lynis.png 902w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/10\/Update-Lynis-768x536.png 768w\" alt=\"Update Lynis Auditing Tool\" width=\"902\" height=\"629\" aria-describedby=\"caption-attachment-19562\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-19562\" class=\"wp-caption-text\">Update Lynis Auditing Tool<\/p>\n<\/div>\n<h3>Lynis Parameters<\/h3>\n<p>Some of the Lynis parameters for your reference.<\/p>\n<ol>\n<li><code>--checkall or -c<\/code>\u00a0: Start the scan.<\/li>\n<li><code>--check-update<\/code>\u00a0: Checks for Lynis update.<\/li>\n<li><code>--cronjob<\/code>\u00a0: Runs Lynis as cronjob (includes -c -Q).<\/li>\n<li><code>--help or -h<\/code>\u00a0: Shows valid parameters<\/li>\n<li><code>--quick or -Q<\/code>\u00a0: Don\u2019t wait for user input, except on errors<\/li>\n<li><code>--version or -V<\/code>\u00a0: Shows Lynis version.<\/li>\n<\/ol>\n<p>That\u2019s it, we hope this article will be much helpful you all to figure out security issues in running systems. For more information visit the official Lynis page at\u00a0<a href=\"https:\/\/cisofy.com\/download\/lynis\/\" target=\"_blank\" rel=\"noopener\">https:\/\/cisofy.com\/download\/lynis\/<\/a>.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/linux-security-auditing-and-scanning-with-lynis-tool\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lynis\u00a0is an open source and much powerful\u00a0auditing tool\u00a0for Unix\/Linux like operating systems. It scans system for security information, general system information, installed and available software information, configuration mistakes, security issues, user accounts without password, wrong file permissions, firewall auditing, etc. Lynis\u00a0is one of the most trusted automated auditing tool for software patch management,\u00a0malware scanning and &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/06\/lynis-2-5-5-released-security-auditing-and-scanning-tool-for-linux-systems\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Lynis 2.5.5 Released \u2013 Security Auditing and Scanning Tool for Linux Systems&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13851","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13851","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=13851"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13851\/revisions"}],"predecessor-version":[{"id":13852,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13851\/revisions\/13852"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=13851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=13851"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=13851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}