{"id":563,"date":"2022-05-22T16:26:53","date_gmt":"2022-05-22T20:26:53","guid":{"rendered":"https:\/\/snehpatel.com\/?p=563"},"modified":"2022-05-22T16:33:03","modified_gmt":"2022-05-22T20:33:03","slug":"lynis-how-to-find-vulnerabilities-and-harden-a-linux-system","status":"publish","type":"post","link":"https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/","title":{"rendered":"Lynis (How to find vulnerabilities and harden a Linux system)"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction:<\/h2>\n\n\n\n<p>In the security industry, there is so much emphasis on Windows server and workstation security with thousands of security products dedicated to finding vulnerabilities and hardening servers. A few products that we have in the market are Nessus,&nbsp; Nexpose, and OpenVAS, one may say they do support Linux and I agree entirely, but they are not that integrated for Linux systems.<\/p>\n\n\n\n<p>To tackle that we have CISOFY&#8217;s Lynis project. It is an open-source security tool that performs system hardening and compliance testing on Linux, macOS, or Unix-based operating systems. As per their official website, the typical use case for the project is Security auditing, Compliance testing (eg. PCI, HIPAA, Sox), Penetration Testing, Vulnerability Detection, and System hardening<\/p>\n\n\n\n<p>The workings of these tools are described as such, Lynis scans target system tools and their libraries installed on the system and its scanning method is described as modular and opportunistic. Some of the benefits described on the website are that there are no external dependencies required to run the scan and it also does not require installation.<\/p>\n\n\n\n<p>&nbsp;Let&#8217;s look at the working of the Lynis typical scan:<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Initialization<\/li><li>Perform basic checks, such as file ownership<\/li><li>Determine operating system and tools<\/li><li>Search for available software components<\/li><li>Check the latest Lynis version<\/li><li>Run enabled plugins<\/li><li>Run security tests per category<\/li><li>Perform execution of your custom tests (optional)<\/li><li>Report status of security scan<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Installation:<\/h2>\n\n\n\n<p>Installation can be done by multiple methods but the recommended one is by using a git clone. Multiple methods for installation can be found in reference link 2. Now we should jump on the installation of Lynis:<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Go to \/usr\/local\/ and do git clone<\/li><\/ol>\n\n\n\n<p>git clone <a href=\"https:\/\/github.com\/CISOfy\/lynis\">https:\/\/github.com\/CISOfy\/lynis<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"639\" data-attachment-id=\"565\" data-permalink=\"https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/image-6\/#main\" data-orig-file=\"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?fit=1032%2C644&amp;ssl=1\" data-orig-size=\"1032,644\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?fit=1024%2C639&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?resize=1024%2C639&#038;ssl=1\" alt=\"\" class=\"wp-image-565\" srcset=\"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?resize=1024%2C639&amp;ssl=1 1024w, https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?resize=300%2C187&amp;ssl=1 300w, https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?resize=768%2C479&amp;ssl=1 768w, https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?w=1032&amp;ssl=1 1032w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\" start=\"2\"><li>Change directory to lynis git folder<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"639\" data-attachment-id=\"566\" data-permalink=\"https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/image-6\/#main\" data-orig-file=\"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?fit=1032%2C644&amp;ssl=1\" data-orig-size=\"1032,644\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?fit=1024%2C639&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?resize=1024%2C639&#038;ssl=1\" alt=\"\" class=\"wp-image-566\" srcset=\"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?resize=1024%2C639&amp;ssl=1 1024w, https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?resize=300%2C187&amp;ssl=1 300w, https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?resize=768%2C479&amp;ssl=1 768w, https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?w=1032&amp;ssl=1 1032w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\" start=\"3\"><li>To run a default scan run the following command<\/li><\/ol>\n\n\n\n<p>.\/lynis audit system<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"639\" data-attachment-id=\"567\" data-permalink=\"https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/image-7\/#main\" data-orig-file=\"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?fit=1032%2C644&amp;ssl=1\" data-orig-size=\"1032,644\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?fit=1024%2C639&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?resize=1024%2C639&#038;ssl=1\" alt=\"\" class=\"wp-image-567\" srcset=\"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?resize=1024%2C639&amp;ssl=1 1024w, https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?resize=300%2C187&amp;ssl=1 300w, https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?resize=768%2C479&amp;ssl=1 768w, https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?w=1032&amp;ssl=1 1032w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>After running a default it will provide a very detailed result on warning and suggestions as follow:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"639\" data-attachment-id=\"568\" data-permalink=\"https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/image-8\/#main\" data-orig-file=\"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?fit=1032%2C644&amp;ssl=1\" data-orig-size=\"1032,644\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?fit=1024%2C639&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?resize=1024%2C639&#038;ssl=1\" alt=\"\" class=\"wp-image-568\" srcset=\"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?resize=1024%2C639&amp;ssl=1 1024w, https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?resize=300%2C187&amp;ssl=1 300w, https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?resize=768%2C479&amp;ssl=1 768w, https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?w=1032&amp;ssl=1 1032w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Help Menu:<\/h2>\n\n\n\n<p>Some common parameters that are available are with Lynis are:<\/p>\n\n\n\n<p>[ Lynis 3.0.8 ]<\/p>\n\n\n\n<p>################################################################################<\/p>\n\n\n\n<p>&nbsp; Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are<\/p>\n\n\n\n<p>&nbsp; welcome to redistribute it under the terms of the GNU General Public License.<\/p>\n\n\n\n<p>&nbsp; See the LICENSE file for details about using this software.<\/p>\n\n\n\n<p>&nbsp; 2007-2021, CISOfy &#8211; <a href=\"https:\/\/cisofy.com\/lynis\/\">https:\/\/cisofy.com\/lynis\/<\/a><\/p>\n\n\n\n<p>&nbsp; Enterprise support available (compliance, plugins, interface and tools)<\/p>\n\n\n\n<p>################################################################################<\/p>\n\n\n\n<p>[+] Initializing program<\/p>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n\n\n\n<p>&nbsp; Usage: lynis command [options]<\/p>\n\n\n\n<p>&nbsp; Command:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; audit<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; audit system&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Perform local security scan<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; audit system remote &lt;host&gt;&nbsp;&nbsp;&nbsp; : Remote security scan<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; audit dockerfile &lt;file&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Analyze Dockerfile<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; show<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; show&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Show all commands<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; show version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Show Lynis version<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; show help&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Show help<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; update<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; update info&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Show update details<\/p>\n\n\n\n<p>&nbsp; Options:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Alternative system audit modes<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; &#8211;forensics&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Perform forensics on a running or mounted system<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; &#8211;pentest&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Non-privileged, show points of interest for pentesting<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Layout options<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; &#8211;no-colors&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Don&#8217;t use colors in output<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; &#8211;quiet (-q)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : No output<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; &#8211;reverse-colors&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Optimize color display for light backgrounds<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; &#8211;reverse-colours&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Optimize colour display for light backgrounds<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Misc options<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; &#8211;debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Debug logging to screen<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; &#8211;no-log&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Don&#8217;t create a log file<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; &#8211;profile &lt;profile&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Scan the system with the given profile file<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; &#8211;view-manpage (&#8211;man)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : View man page<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; &#8211;verbose&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Show more details on screen<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; &#8211;version (-V)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Display version number and quit<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; &#8211;wait&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Wait between a set of tests<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; &#8211;slow-warning &lt;seconds&gt;&nbsp; : Threshold for slow test warning in seconds (default 10)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Enterprise options<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; &#8211;plugindir &lt;path&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Define path of available plugins<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; &#8211;upload&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Upload data to central node<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; More options available. Run &#8216;.\/lynis show options&#8217;, or use the man page.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">References:<\/h2>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li><a href=\"https:\/\/cisofy.com\/lynis\/\">https:\/\/cisofy.com\/lynis\/<\/a><\/li><li><a href=\"https:\/\/cisofy.com\/documentation\/lynis\/get-started\/\">https:\/\/cisofy.com\/documentation\/lynis\/get-started\/<\/a><\/li><li><a href=\"https:\/\/github.com\/CISOfy\/lynis\">https:\/\/github.com\/CISOfy\/lynis<\/a><\/li><li><a href=\"https:\/\/opensource.com\/article\/20\/5\/linux-security-lynis\">https:\/\/opensource.com\/article\/20\/5\/linux-security-lynis<\/a><\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: In the security industry, there is so much emphasis on Windows server and workstation security with thousands of security products dedicated to finding vulnerabilities and hardening servers. A few products that we have in the market are Nessus,&nbsp; Nexpose, and OpenVAS, one may say they do support Linux and I agree entirely, but they &#8230; <a title=\"Lynis (How to find vulnerabilities and harden a Linux system)\" class=\"read-more\" href=\"https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/\" aria-label=\"Read more about Lynis (How to find vulnerabilities and harden a Linux system)\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[60,94,17,95,93,59],"tags":[98,97,34,96,42,62],"class_list":["post-563","post","type-post","status-publish","format-standard","hentry","category-audit","category-hardening","category-linux","category-lynis","category-penetration-testing","category-security","tag-compliance","tag-hardening","tag-linux","tag-lynis","tag-opensource","tag-security-audit"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Lynis (How to find vulnerabilities and harden a Linux system) - Sneh Patel<\/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:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Lynis (How to find vulnerabilities and harden a Linux system) - Sneh Patel\" \/>\n<meta property=\"og:description\" content=\"Introduction: In the security industry, there is so much emphasis on Windows server and workstation security with thousands of security products dedicated to finding vulnerabilities and hardening servers. A few products that we have in the market are Nessus,&nbsp; Nexpose, and OpenVAS, one may say they do support Linux and I agree entirely, but they ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/\" \/>\n<meta property=\"og:site_name\" content=\"Sneh Patel\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-22T20:26:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-05-22T20:33:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image-1024x639.png\" \/>\n<meta name=\"author\" content=\"Sneh Patel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sneh Patel\" \/>\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:\\\/\\\/snehpatel.com\\\/index.php\\\/2022\\\/05\\\/22\\\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/snehpatel.com\\\/index.php\\\/2022\\\/05\\\/22\\\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\\\/\"},\"author\":{\"name\":\"Sneh Patel\",\"@id\":\"https:\\\/\\\/snehpatel.com\\\/#\\\/schema\\\/person\\\/a39105bc63f7e11a0e07b12a4c3dda73\"},\"headline\":\"Lynis (How to find vulnerabilities and harden a Linux system)\",\"datePublished\":\"2022-05-22T20:26:53+00:00\",\"dateModified\":\"2022-05-22T20:33:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/snehpatel.com\\\/index.php\\\/2022\\\/05\\\/22\\\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\\\/\"},\"wordCount\":1148,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/snehpatel.com\\\/#\\\/schema\\\/person\\\/a39105bc63f7e11a0e07b12a4c3dda73\"},\"image\":{\"@id\":\"https:\\\/\\\/snehpatel.com\\\/index.php\\\/2022\\\/05\\\/22\\\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/snehpatel.com\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/image-1024x639.png\",\"keywords\":[\"Compliance\",\"Hardening\",\"Linux\",\"lynis\",\"opensource\",\"Security Audit\"],\"articleSection\":[\"Audit\",\"Hardening\",\"Linux\",\"Lynis\",\"Penetration Testing\",\"Security\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/snehpatel.com\\\/index.php\\\/2022\\\/05\\\/22\\\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/snehpatel.com\\\/index.php\\\/2022\\\/05\\\/22\\\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\\\/\",\"url\":\"https:\\\/\\\/snehpatel.com\\\/index.php\\\/2022\\\/05\\\/22\\\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\\\/\",\"name\":\"Lynis (How to find vulnerabilities and harden a Linux system) - Sneh Patel\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/snehpatel.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/snehpatel.com\\\/index.php\\\/2022\\\/05\\\/22\\\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/snehpatel.com\\\/index.php\\\/2022\\\/05\\\/22\\\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/snehpatel.com\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/image-1024x639.png\",\"datePublished\":\"2022-05-22T20:26:53+00:00\",\"dateModified\":\"2022-05-22T20:33:03+00:00\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/snehpatel.com\\\/index.php\\\/2022\\\/05\\\/22\\\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/snehpatel.com\\\/index.php\\\/2022\\\/05\\\/22\\\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/snehpatel.com\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/image.png?fit=1032%2C644&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/snehpatel.com\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/image.png?fit=1032%2C644&ssl=1\",\"width\":1032,\"height\":644},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/snehpatel.com\\\/#website\",\"url\":\"https:\\\/\\\/snehpatel.com\\\/\",\"name\":\"Sneh Patel\",\"description\":\"Cyber Security Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/snehpatel.com\\\/#\\\/schema\\\/person\\\/a39105bc63f7e11a0e07b12a4c3dda73\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/snehpatel.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/snehpatel.com\\\/#\\\/schema\\\/person\\\/a39105bc63f7e11a0e07b12a4c3dda73\",\"name\":\"Sneh Patel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/i0.wp.com\\\/snehpatel.com\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/cropped-Slide4-1.jpg?fit=672%2C222&ssl=1\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/snehpatel.com\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/cropped-Slide4-1.jpg?fit=672%2C222&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/snehpatel.com\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/cropped-Slide4-1.jpg?fit=672%2C222&ssl=1\",\"width\":672,\"height\":222,\"caption\":\"Sneh Patel\"},\"logo\":{\"@id\":\"https:\\\/\\\/i0.wp.com\\\/snehpatel.com\\\/wp-content\\\/uploads\\\/2020\\\/09\\\/cropped-Slide4-1.jpg?fit=672%2C222&ssl=1\"},\"sameAs\":[\"http:\\\/\\\/snehpatel.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Lynis (How to find vulnerabilities and harden a Linux system) - Sneh Patel","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:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/","og_locale":"en_US","og_type":"article","og_title":"Lynis (How to find vulnerabilities and harden a Linux system) - Sneh Patel","og_description":"Introduction: In the security industry, there is so much emphasis on Windows server and workstation security with thousands of security products dedicated to finding vulnerabilities and hardening servers. A few products that we have in the market are Nessus,&nbsp; Nexpose, and OpenVAS, one may say they do support Linux and I agree entirely, but they ... Read more","og_url":"https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/","og_site_name":"Sneh Patel","article_published_time":"2022-05-22T20:26:53+00:00","article_modified_time":"2022-05-22T20:33:03+00:00","og_image":[{"url":"https:\/\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image-1024x639.png","type":"","width":"","height":""}],"author":"Sneh Patel","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sneh Patel","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/#article","isPartOf":{"@id":"https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/"},"author":{"name":"Sneh Patel","@id":"https:\/\/snehpatel.com\/#\/schema\/person\/a39105bc63f7e11a0e07b12a4c3dda73"},"headline":"Lynis (How to find vulnerabilities and harden a Linux system)","datePublished":"2022-05-22T20:26:53+00:00","dateModified":"2022-05-22T20:33:03+00:00","mainEntityOfPage":{"@id":"https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/"},"wordCount":1148,"commentCount":0,"publisher":{"@id":"https:\/\/snehpatel.com\/#\/schema\/person\/a39105bc63f7e11a0e07b12a4c3dda73"},"image":{"@id":"https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/#primaryimage"},"thumbnailUrl":"https:\/\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image-1024x639.png","keywords":["Compliance","Hardening","Linux","lynis","opensource","Security Audit"],"articleSection":["Audit","Hardening","Linux","Lynis","Penetration Testing","Security"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/","url":"https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/","name":"Lynis (How to find vulnerabilities and harden a Linux system) - Sneh Patel","isPartOf":{"@id":"https:\/\/snehpatel.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/#primaryimage"},"image":{"@id":"https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/#primaryimage"},"thumbnailUrl":"https:\/\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image-1024x639.png","datePublished":"2022-05-22T20:26:53+00:00","dateModified":"2022-05-22T20:33:03+00:00","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/snehpatel.com\/index.php\/2022\/05\/22\/lynis-how-to-find-vulnerabilities-and-harden-a-linux-system\/#primaryimage","url":"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?fit=1032%2C644&ssl=1","contentUrl":"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2022\/05\/image.png?fit=1032%2C644&ssl=1","width":1032,"height":644},{"@type":"WebSite","@id":"https:\/\/snehpatel.com\/#website","url":"https:\/\/snehpatel.com\/","name":"Sneh Patel","description":"Cyber Security Blog","publisher":{"@id":"https:\/\/snehpatel.com\/#\/schema\/person\/a39105bc63f7e11a0e07b12a4c3dda73"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/snehpatel.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/snehpatel.com\/#\/schema\/person\/a39105bc63f7e11a0e07b12a4c3dda73","name":"Sneh Patel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2020\/09\/cropped-Slide4-1.jpg?fit=672%2C222&ssl=1","url":"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2020\/09\/cropped-Slide4-1.jpg?fit=672%2C222&ssl=1","contentUrl":"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2020\/09\/cropped-Slide4-1.jpg?fit=672%2C222&ssl=1","width":672,"height":222,"caption":"Sneh Patel"},"logo":{"@id":"https:\/\/i0.wp.com\/snehpatel.com\/wp-content\/uploads\/2020\/09\/cropped-Slide4-1.jpg?fit=672%2C222&ssl=1"},"sameAs":["http:\/\/snehpatel.com"]}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/snehpatel.com\/index.php\/wp-json\/wp\/v2\/posts\/563","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/snehpatel.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/snehpatel.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/snehpatel.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/snehpatel.com\/index.php\/wp-json\/wp\/v2\/comments?post=563"}],"version-history":[{"count":3,"href":"https:\/\/snehpatel.com\/index.php\/wp-json\/wp\/v2\/posts\/563\/revisions"}],"predecessor-version":[{"id":571,"href":"https:\/\/snehpatel.com\/index.php\/wp-json\/wp\/v2\/posts\/563\/revisions\/571"}],"wp:attachment":[{"href":"https:\/\/snehpatel.com\/index.php\/wp-json\/wp\/v2\/media?parent=563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/snehpatel.com\/index.php\/wp-json\/wp\/v2\/categories?post=563"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/snehpatel.com\/index.php\/wp-json\/wp\/v2\/tags?post=563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}