{"id":11983,"date":"2026-09-30T14:00:51","date_gmt":"2026-09-30T05:00:51","guid":{"rendered":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=11983"},"modified":"2026-09-30T14:23:28","modified_gmt":"2026-09-30T05:23:28","slug":"lynis-%ec%8b%9c%ec%8a%a4%ed%85%9c-%eb%b3%b4%ec%95%88-%ec%a0%90%ea%b2%80-%eb%8f%84%ea%b5%ac","status":"publish","type":"post","link":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=11983","title":{"rendered":"Lynis &#8211; \uc2dc\uc2a4\ud15c \ubcf4\uc548 \uc810\uac80 \ub3c4\uad6c"},"content":{"rendered":"<h1>Lynis &#8211; \uc2dc\uc2a4\ud15c \ubcf4\uc548 \uc810\uac80 \ub3c4\uad6c<\/h1>\n<h2>1. Lynis\ub780 \ubb34\uc5c7\uc778\uac00\uc694?<\/h2>\n<p><strong>Lynis<\/strong>\ub294 CISOfy\uc5d0\uc11c \uac1c\ubc1c\ud55c <strong>\uc624\ud508\uc18c\uc2a4 \ubcf4\uc548 \uac10\uc0ac \ubc0f \uc2dc\uc2a4\ud15c \uacbd\ud654 \ub3c4\uad6c<\/strong>\uc785\ub2c8\ub2e4. Linux, macOS, BSD, AIX \ub4f1 \ub2e4\uc591\ud55c Unix \uacc4\uc5f4 \uc2dc\uc2a4\ud15c\uc5d0\uc11c \uc2e4\ud589\ub418\uba70, \uc2dc\uc2a4\ud15c\uc758 \ubcf4\uc548 \ucde8\uc57d\uc810, \ubbf8\ud761\ud55c \uc124\uc815, \uaddc\uc815 \uc900\uc218 \uc5ec\ubd80\ub97c \uc885\ud569\uc801\uc73c\ub85c \uc9c4\ub2e8\ud574 \uc90d\ub2c8\ub2e4.<\/p>\n<h3>\ud83d\udca1 Lynis\uc758 \uc8fc\uc694 \ud2b9\uc9d5<\/h3>\n<ol>\n<li><strong>\uc5d0\uc774\uc804\ud2b8\ub9ac\uc2a4(Agentless) \ubc29\uc2dd:<\/strong> \ubcc4\ub3c4\uc758 \ubb34\uac70\uc6b4 \uc5d0\uc774\uc804\ud2b8 \uc124\uce58 \uc5c6\uc774 \uc178 \uc2a4\ud06c\ub9bd\ud2b8 \uae30\ubc18\uc73c\ub85c \uac00\ubccd\uace0 \ube60\ub974\uac8c \ub3d9\uc791\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>\ube44\ud30c\uad34 \uac80\uc0ac(Non-destructive):<\/strong> \uc2dc\uc2a4\ud15c \uc124\uc815\uc744 \uc784\uc758\ub85c \ubcc0\uacbd\ud558\uc9c0 \uc54a\uace0 \ub2e8\uc21c \uc9c4\ub2e8\ub9cc \uc218\ud589\ud558\ubbc0\ub85c \uac00\ub3d9 \uc911\uc778 \uc6b4\uc601 \uc11c\ubc84\uc5d0\uc11c\ub3c4 \uc548\uc804\ud558\uac8c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<li><strong>\uc218\ubc31 \uac00\uc9c0\uc758 \uac80\uc0ac \ud56d\ubaa9:<\/strong> \ucee4\ub110 \uc124\uc815\ubd80\ud130 \ud30c\uc77c \uad8c\ud55c, \ub124\ud2b8\uc6cc\ud06c, \uc6f9 \uc11c\ubc84, \uc778\uc99d \uc815\ucc45\uae4c\uc9c0 \uc2dc\uc2a4\ud15c \uc804\ubc18\uc744 \uc815\ubc00 \uc2a4\uce94\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>\uad6c\uccb4\uc801\uc778 \uac1c\uc120 \uac00\uc774\ub4dc \uc81c\uacf5:<\/strong> \ubc1c\uacac\ub41c \ubb38\uc81c\uc810\uc5d0 \ub300\ud574 \uad6c\uccb4\uc801\uc778 \uc218\uc6a9 \ub300\ucc45\uacfc \uacf5\uc2dd \ubb38\uc11c \ub9c1\ud06c(URL)\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<hr \/>\n<h2>2. \uc8fc\uc694 \uc810\uac80 \uc601\uc5ed<\/h2>\n<p>Lynis\ub294 \uc2dc\uc2a4\ud15c\uc744 \uc2e4\ud589\ud560 \ub54c \uc544\ub798\uc640 \uac19\uc740 \uc8fc\uc694 \uce74\ud14c\uace0\ub9ac\ub97c \uc21c\ucc28\uc801\uc73c\ub85c \uc810\uac80\ud569\ub2c8\ub2e4.<\/p>\n<ul>\n<li><strong>\uc2dc\uc2a4\ud15c \uc778\uc99d \ubc0f \uacc4\uc815:<\/strong> \ube44\ubc00\ubc88\ud638 \uc815\ucc45, Sudo \uad8c\ud55c, PAM \uc124\uc815, \ubbf8\uc0ac\uc6a9 \uacc4\uc815 \ub4f1<\/li>\n<li><strong>\ubd80\ud305 \ubc0f \ucee4\ub110:<\/strong> GRUB \ubd80\ud2b8\ub85c\ub354 \uc124\uc815, \ucee4\ub110 \ud30c\ub77c\ubbf8\ud130(<code>sysctl<\/code>), \ub85c\ub4dc\ub41c \ubaa8\ub4c8 \uc810\uac80<\/li>\n<li><strong>\ub124\ud2b8\uc6cc\ud06c &amp; \ubc29\ud654\ubcbd:<\/strong> \uc624\ud508\ub41c \ud3ec\ud2b8, <code>iptables<\/code>\/<code>nftables<\/code>\/<code>ufw<\/code> \uc124\uc815, DNS \ubcf4\uc548<\/li>\n<li><strong>\uc8fc\uc694 \uc11c\ube44\uc2a4:<\/strong> SSH, Nginx\/Apache, MySQL\/PostgreSQL, Mail \uc11c\ubc84 \ubcf4\uc548 \uc124\uc815<\/li>\n<li><strong>\ud30c\uc77c \uc2dc\uc2a4\ud15c &amp; \uad8c\ud55c:<\/strong> SUID\/SGID \ud30c\uc77c \uc810\uac80, \ud0ed \uc124\uc815, \ub9c8\uc6b4\ud2b8 \uc635\uc158(<code>noexec<\/code>, <code>nosuid<\/code>)<\/li>\n<li><strong>\ub85c\uadf8 \ubc0f \uac10\uc0ac:<\/strong> <code>rsyslog<\/code>, <code>auditd<\/code> \uc124\uc815 \uc5ec\ubd80 \ubc0f \ub85c\uadf8 \ud30c\uc77c \uad8c\ud55c<\/li>\n<\/ul>\n<hr \/>\n<h2>3. Lynis \uc124\uce58\ud558\uae30<\/h2>\n<p>\uac01 OS \ud328\ud0a4\uc9c0 \uad00\ub9ac\uc790\ub97c \ud1b5\ud574 \uac04\ub2e8\ud788 \uc124\uce58\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>Ubuntu \/ Debian<\/h3>\n<pre><code class=\"language-bash\">sudo apt update\nsudo apt install lynis -y<\/code><\/pre>\n<p>\ucd5c\uc2e0 \ubc84\uc804\uc73c\ub85c \uc5c5\ub370\uc774\ud2b8<\/p>\n<pre><code class=\"language-bash\">wget -O - https:\/\/packages.cisofy.com\/keys\/cisofy-software-public.key | sudo gpg --dearmor -o \/etc\/apt\/trusted.gpg.d\/cisofy-software-public.gpg\necho &quot;deb https:\/\/packages.cisofy.com\/community\/lynis\/deb\/ stable main&quot; | sudo tee \/etc\/apt\/sources.list.d\/cisofy-lynis.list\nsudo apt update\nsudo apt install lynis\n\n# \uc5c5\ub370\uc774\ud2b8 \ud655\uc778\nlynis show version<\/code><\/pre>\n<h3>CentOS \/ RHEL \/ Rocky Linux<\/h3>\n<pre><code class=\"language-bash\">sudo dnf install epel-release -y\nsudo dnf install lynis -y<\/code><\/pre>\n<blockquote>\n<p><strong>Tip!<\/strong> \ub354 \ucd5c\uc2e0 \ubc84\uc804\uc758 Lynis\ub97c \uc0ac\uc6a9\ud558\uace0 \uc2f6\ub2e4\uba74 <a href=\"https:\/\/github.com\/CISOfy\/lynis\">CISOfy \uacf5\uc2dd Git \uc800\uc7a5\uc18c<\/a>\ub97c clone \ubc1b\uc544\uc11c \uc2e4\ud589\ud560 \uc218\ub3c4 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">git clone https:\/\/github.com\/CISOfy\/lynis\ncd lynis\n.\/lynis audit system<\/code><\/pre>\n<\/blockquote>\n<hr \/>\n<h2>4. Lynis \uc2e4\ud589 \ubc0f \uacb0\uacfc \ubd84\uc11d<\/h2>\n<h3>\uc804\uccb4 \uc2dc\uc2a4\ud15c \uc9c4\ub2e8 \uba85\ub839\uc5b4<\/h3>\n<p>\uac00\uc7a5 \uae30\ubcf8\uc774 \ub418\ub294 \uc2dc\uc2a4\ud15c \uc2a4\uce94 \uba85\ub839\uc5b4\uc785\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">sudo lynis audit system<\/code><\/pre>\n<p>\uba85\ub839\uc5b4\ub97c \uc2e4\ud589\ud558\uba74 \ud130\ubbf8\ub110 \uc0c1\uc5d0\uc11c \uac01 \ud56d\ubaa9\ubcc4\ub85c <code>[ OK ]<\/code>, <code>[ WARNING ]<\/code>, <code>[ SUGGESTION ]<\/code> \ub4f1\uc758 \uacb0\uacfc\uac00 \uc2e4\uc2dc\uac04\uc73c\ub85c \ucd9c\ub825\ub429\ub2c8\ub2e4.<\/p>\n<hr \/>\n<h3>\uc9c4\ub2e8 \uacb0\uacfc \uc885\ud569 \ub9ac\ud3ec\ud2b8 \ud655\uc778<\/h3>\n<p>\uc2a4\uce94\uc774 \uc885\ub8cc\ub418\uba74 \ub9e8 \ub9c8\uc9c0\ub9c9\uc5d0 <strong>Hardening Index(\ubcf4\uc548 \uacbd\ud654 \uc9c0\uc218)<\/strong>\uc640 \ud568\uaed8 \uacb0\uacfc \uc694\uc57d\uc774 \ud45c\uc2dc\ub429\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-plain\">================================================================================\n\n  -[ Lynis 3.x.x Results ]-\n\n  Great, no warnings found.\n\n  Suggestions (28):\n  ----------------------------\n  * Consider hardening SSH configuration [SSH-7408] \n    - Details : PermitRootLogin (YES)\n    - Solution : Set PermitRootLogin to &#039;no&#039; or &#039;prohibit-password&#039;\n    - Text : https:\/\/cisofy.com\/lynis\/controls\/SSH-7408\/\n\n  Hardening index : 68 [==================                  ]\n  Tests performed : 250+\n  Plugins enabled : 0\n\n================================================================================<\/code><\/pre>\n<ul>\n<li><strong>Hardening Index:<\/strong> \uc2dc\uc2a4\ud15c\uc758 \ubcf4\uc548 \uc548\uc804\uc131\uc744 \ub098\ud0c0\ub0b4\ub294 \uc810\uc218(100\uc810 \ub9cc\uc810)\uc785\ub2c8\ub2e4. \ubcf4\ud1b5 <strong>70~80\uc810 \uc774\uc0c1<\/strong>\uc744 \ubaa9\ud45c\ub85c \uc124\uc815\ud558\ub294 \uac83\uc744 \uad8c\uc7a5\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>WARNING (\uacbd\uace0):<\/strong> \uc989\uc2dc \ud574\uacb0\ud574\uc57c \ud558\ub294 \uc2ec\uac01\ud55c \ubcf4\uc548 \uc704\ud5d8 \uc694\uc18c\uc785\ub2c8\ub2e4.<\/li>\n<li><strong>SUGGESTION (\uc81c\uc548):<\/strong> \ubcf4\uc548\uc744 \ud55c \ub2e8\uacc4 \ub354 \uac15\ud654\ud558\uae30 \uc704\ud574 \uad8c\uc7a5\ub418\ub294 \uc124\uc815 \ubcc0\uacbd \uc0ac\ud56d\uc785\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h3>\uc138\ubd80 \ub85c\uadf8 \ud30c\uc77c \uc704\uce58<\/h3>\n<ul>\n<li><strong>\uc804\uccb4 \uc0c1\uc138 \uc2e4\ud589 \ub85c\uadf8:<\/strong> <code>\/var\/log\/lynis.log<\/code><\/li>\n<li><strong>\uc810\uac80 \uacb0\uacfc \ub370\uc774\ud130 \ub9ac\ud3ec\ud2b8:<\/strong> <code>\/var\/log\/lynis-report.dat<\/code><\/li>\n<\/ul>\n<hr \/>\n<h2>5. \uc790\uc8fc \uc9c0\uc801\ub418\ub294 \ubcf4\uc548 \ud56d\ubaa9 \uac1c\uc120 \ud301<\/h2>\n<p>Lynis \uc2a4\uce94 \ud6c4 \ubcf4\uc548 \uc810\uc218(Hardening Index)\ub97c \uc62c\ub9ac\uae30 \uc704\ud55c \ub300\ud45c\uc801\uc778 \uac1c\uc120 \uc791\uc5c5\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>1) SSH \uc811\uc18d \ubcf4\uc548 \uac15\ud654 (<code>\/etc\/ssh\/sshd_config<\/code>)<\/h3>\n<ul>\n<li>Root \uc9c1\uc811 \ub85c\uadf8\uc778 \ube44\ud65c\uc131\ud654: <code>PermitRootLogin no<\/code><\/li>\n<li>\ube44\ubc00\ubc88\ud638 \uc778\uc99d \ub300\uc2e0 Key \uae30\ubc18 \uc778\uc99d \uc0ac\uc6a9: <code>PasswordAuthentication no<\/code><\/li>\n<li>SSH \uae30\ubcf8 \ud3ec\ud2b8 \ubcc0\uacbd: <code>Port 2222<\/code> (\uc608\uc2dc)<\/li>\n<\/ul>\n<h3>2) \ucee4\ub110 \ud30c\ub77c\ubbf8\ud130 \uacbd\ud654 (<code>\/etc\/sysctl.conf<\/code>)<\/h3>\n<p>\ub124\ud2b8\uc6cc\ud06c \uc2a4\ud478\ud551 \ubc0f DoS \uacf5\uaca9 \ubc29\uc9c0\ub97c \uc704\ud574 \ucee4\ub110 \uc124\uc815\uc744 \uac15\ud654\ud569\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-ini\"># IP \ud3ec\uc6cc\ub529 \ube44\ud65c\uc131\ud654 (\ub77c\uc6b0\ud130 \uc6a9\ub3c4\uac00 \uc544\ub2cc \uacbd\uc6b0)\nnet.ipv4.ip_forward = 0\n\n# ICMP Redirect \ud328\ud0b7 \ubb34\uc2dc\nnet.ipv4.conf.all.accept_redirects = 0\nnet.ipv6.conf.all.accept_redirects = 0\n\n# SYN Flood \uacf5\uaca9 \ubc29\uc5b4\nnet.ipv4.tcp_syncookies = 1<\/code><\/pre>\n<p>\uc218\uc815 \ud6c4 \uc801\uc6a9: <code>sudo sysctl -p<\/code><\/p>\n<h3>3) \uac10\uc0ac \ub3c4\uad6c(auditd) \uc124\uce58<\/h3>\n<p>\uc2dc\uc2a4\ud15c \ub0b4\ubd80 \ub3d9\uc791\uc744 \uae30\ub85d\ud558\ub294 <code>auditd<\/code> \ud328\ud0a4\uc9c0\ub97c \uc124\uce58\ud558\uba74 \ubcf4\uc548 \uc9c0\uc218\uac00 \ub300\ud3ed \uc0c1\uc2b9\ud569\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">sudo apt install auditd   # Ubuntu\/Debian\nsudo dnf install audit    # RHEL\/Rocky<\/code><\/pre>\n<hr \/>\n<h2>6. \uacb0\ub860 \ubc0f \uc694\uc57d<\/h2>\n<p>Lynis\ub294 \uc815\uae30\uc801\uc778 \uc11c\ubc84 \ubcf4\uc548 \uc810\uac80\uc744 \uc790\ub3d9\ud654\ud558\uace0 \ubcf4\uc548 \ud45c\uc900 \uac00\uc774\ub4dc\ub97c \ubc18\uc601\ud558\ub294 \ub370 \ud544\uc218\uc801\uc778 \uc624\ud508\uc18c\uc2a4 \uc194\ub8e8\uc158\uc785\ub2c8\ub2e4. <\/p>\n<p>\uc6b4\uc601 \uc911\uc778 \uc11c\ubc84\uac00 \uc788\ub2e4\uba74 \uc9c0\uae08 \ubc14\ub85c <code>lynis audit system<\/code> \uba85\ub839\uc5b4\ub97c \ud1b5\ud574 \ubcf4\uc548 \uc810\uc218\ub97c \uce21\uc815\ud574 \ubcf4\uace0, \uc81c\uacf5\ub418\ub294 Suggestion \uac00\uc774\ub4dc\ub97c \ud558\ub098\uc529 \uc801\uc6a9\ud574 \ubcf4\uc2dc\uae38 \uad8c\uc7a5\ud569\ub2c8\ub2e4!<\/p>\n<hr \/>\n<ul>\n<li><strong>\uad00\ub828 \ucc38\uace0 \ub9c1\ud06c:<\/strong> <a href=\"https:\/\/cisofy.com\/lynis\/\">CISOfy \uacf5\uc2dd Lynis \ud648\ud398\uc774\uc9c0<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Lynis &#8211; \uc2dc\uc2a4\ud15c \ubcf4\uc548 \uc810\uac80 \ub3c4\uad6c 1. Lynis\ub780 \ubb34\uc5c7\uc778\uac00\uc694? Lynis\ub294 CISOfy\uc5d0\uc11c \uac1c\ubc1c\ud55c \uc624\ud508\uc18c\uc2a4 \ubcf4\uc548 \uac10\uc0ac \ubc0f \uc2dc\uc2a4\ud15c \uacbd\ud654 \ub3c4\uad6c\uc785\ub2c8\ub2e4. Linux, macOS, BSD, AIX \ub4f1 \ub2e4\uc591\ud55c Unix \uacc4\uc5f4 \uc2dc\uc2a4\ud15c\uc5d0\uc11c \uc2e4\ud589\ub418\uba70, \uc2dc\uc2a4\ud15c\uc758 \ubcf4\uc548 \ucde8\uc57d\uc810, \ubbf8\ud761\ud55c \uc124\uc815, \uaddc\uc815 \uc900\uc218 \uc5ec\ubd80\ub97c \uc885\ud569\uc801\uc73c\ub85c \uc9c4\ub2e8\ud574 \uc90d\ub2c8\ub2e4. \ud83d\udca1 Lynis\uc758 \uc8fc\uc694 \ud2b9\uc9d5 \uc5d0\uc774\uc804\ud2b8\ub9ac\uc2a4(Agentless) \ubc29\uc2dd: \ubcc4\ub3c4\uc758 \ubb34\uac70\uc6b4 \uc5d0\uc774\uc804\ud2b8 \uc124\uce58 \uc5c6\uc774 \uc178 \uc2a4\ud06c\ub9bd\ud2b8 \uae30\ubc18\uc73c\ub85c \uac00\ubccd\uace0\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=11983\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-11983","post","type-post","status-publish","format-standard","hentry","category-devops"],"_links":{"self":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/11983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11983"}],"version-history":[{"count":3,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/11983\/revisions"}],"predecessor-version":[{"id":11986,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/11983\/revisions\/11986"}],"wp:attachment":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}