{"id":201951,"date":"2020-10-03T10:29:21","date_gmt":"2020-10-03T02:29:21","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=201951"},"modified":"2020-09-25T13:30:50","modified_gmt":"2020-09-25T05:30:50","slug":"lynis-accouting-tools","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/lynis-accouting-tools.html","title":{"rendered":"Lynis – \u7528\u4e8eLinux\u670d\u52a1\u5668\u7684\u81ea\u52a8\u5b89\u5168\u5ba1\u8ba1\u5de5\u5177"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nLynis\u662fUnix\/Linux\u7b49\u64cd\u4f5c\u7cfb\u7edf\u7684\u4e00\u6b3e\u5b89\u5168\u5ba1\u8ba1\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u53d1\u73b0\u57fa\u4e8eLinux\u7cfb\u7edf\u4e2d\u7684\u6076\u610f\u8f6f\u4ef6\u548c\u5b89\u5168\u6f0f\u6d1e\u3002Lynis\u662f\u514d\u8d39\u5f00\u6e90\u7684\u670d\u52a1\u5668\u5ba1\u8ba1\u5de5\u5177\uff0c\u4e00\u65e6\u5ba1\u8ba1\u5b8c\u6210\uff0c\u6211\u4eec\u53ef\u4ee5\u5ba1\u67e5\u7ed3\u679c\u3001\u8b66\u544a\u548c\u5efa\u8bae\uff0c\u7136\u540e\u6211\u4eec\u53ef\u4ee5\u6839\u636e\u5b83\u5b9e\u73b0\u6211\u4eec\u7684\u5b89\u5168\u7b56\u7565\u3002\u5b83\u5c06\u663e\u793a\u4e00\u4e2a\u62a5\u544a\uff0c\u8be5\u62a5\u544a\u53ef\u4ee5\u88ab\u5206\u6210\u51e0\u4e2a\u90e8\u5206\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u901a\u5e38\u6211\u4eec\u5728Linux\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\u5f88\u591a\u4e1c\u897f\uff0c\u6bd4\u5982\u7f51\u7edc\u670d\u52a1\u3001\u6570\u636e\u5e93\u670d\u52a1\u3001\u7535\u5b50\u90ae\u4ef6\u670d\u52a1\u3001FTP\u670d\u52a1\u7b49\u7b49\u3002\u901a\u8fc7\u5728\u6240\u6709Linux\u673a\u5668\u4e0a\u8fdb\u884c\u81ea\u52a8\u7684\u5b89\u5168\u5ba1\u8ba1\u548c\u6e17\u900f\u6d4b\u8bd5\uff0cLynis\u53ef\u4ee5\u7b80\u5316\u7ba1\u7406\u5458\u7684\u5de5\u4f5c\u3002<\/p>\n

\u73af\u5883<\/strong><\/div>\n

Centos8<\/p>\n

lynis-3.0.0<\/p>\n

\u5b89\u88c5Lynix<\/strong><\/div>\n

Lynis\u662f\u4e00\u6b3e\u8f7b\u91cf\u7ea7\u7684\u8f6f\u4ef6\uff0c\u5b83\u4e0d\u4f1a\u7834\u574f\u7cfb\u7edf\uff0c\u4e5f\u4e0d\u4f1a\u5f71\u54cdLinux\u7cfb\u7edf\u4e0a\u7684\u4efb\u4f55\u5e94\u7528\u7a0b\u5e8f\u6216\u670d\u52a1\u3002\u9996\u5148\uff0c\u6211\u4eec\u5c06\u4e3aLynis\u7684\u5b89\u88c5\u521b\u5efa\u4e00\u4e2a\u76ee\u5f55\uff0c\u8fdb\u5165\u8be5\u76ee\u5f55\uff0cwget\u4e0b\u8f7d\u6700\u65b0\u7684Lynis\u6e90\u4ee3\u7801\uff1a<\/p>\n

\r\n[root@localhost ~]# mkdir \/usr\/local\/lynis\r\n[root@localhost ~]# cd \/usr\/local\/lynis\/\r\n[root@localhost lynis]# wget https:\/\/downloads.cisofy.com\/lynis\/lynis-3.0.0.tar.gz\r\n<\/pre>\n

\"\"
\n\u89e3\u538b\u538b\u7f29\u5305\uff0c\u8fdb\u5165\u89e3\u538b\u51fa\u6765\u7684\u76ee\u5f55<\/p>\n

\r\n[root@localhost lynis]# tar xvf lynis-3.0.0.tar.gz \r\n[root@localhost lynis]# cd lynis\r\n<\/pre>\n

\u8fd0\u884clynis\u663e\u793a\u5e2e\u52a9\u4fe1\u606f\u3002\u5177\u6709\u7ba1\u7406\u5458\u6743\u9650\u7684\u7528\u6237\u53ef\u4ee5\u8fd0\u884c\u8be5\u811a\u672c\uff0c\u6240\u6709\u65e5\u5fd7\u548c\u8f93\u51fa\u5c06\u4fdd\u5b58\u5728\/var\/log\/lynis.log<\/code>\u6587\u4ef6\u4e2d\uff1a<\/p>\n

\r\n[root@localhost lynis]# .\/lynis\r\n<\/pre>\n

\"\"<\/p>\n

\u5f00\u59cb\u5ba1\u8ba1\u5e76\u67e5\u627e\u6f0f\u6d1e<\/strong><\/div>\n

\u6267\u884c\u672c\u5730\u5b89\u5168\u626b\u63cf\uff0c\u6240\u4ee5\u4f7f\u7528\u2018audit system\u2019\u53c2\u6570\u6765\u626b\u63cf\u6574\u4e2a\u7cfb\u7edf\u3002\u8fd0\u884c\u4e0b\u9762\u7684\u547d\u4ee4\u6765\u542f\u52a8\u5bf9\u6574\u4e2a\u7cfb\u7edf\u7684\u5ba1\u8ba1\uff1a<\/p>\n

\r\n[root@localhost lynis]# .\/lynis audit system\r\n\u6216\u8005\r\n[root@localhost lynis]# .\/lynis audit system --wait \r\n<\/pre>\n

--wait<\/code>\u9009\u9879\uff1a\u7b49\u5f85\u7528\u6237\u6309\u56de\u8f66\u952e\u663e\u793a\u4e0b\u4e00\u8282\u7684\u62a5\u544a\u3002<\/p>\n

\u6709\u65f6\u6211\u4eec\u4e0d\u60f3\u626b\u63cf\u6216\u5ba1\u8ba1\u6574\u4e2a\u7cfb\u7edf\u7684\u5e94\u7528\u7a0b\u5e8f\u6216\u670d\u52a1\uff0c\u6240\u4ee5\u6211\u4eec\u53ef\u4ee5\u6309\u7c7b\u522b\u5ba1\u8ba1\u81ea\u5b9a\u4e49\u5e94\u7528\u7a0b\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u5148\u5217\u51fa\u6240\u6709\u7684\u7ec4\uff0c\u7136\u540e\u9009\u62e9\u9700\u8981\u5ba1\u8ba1\u6216\u626b\u63cf\u7684\u7ec4\u3002<\/p>\n

\r\n[root@localhost lynis]# .\/lynis show groups\r\n<\/pre>\n

\"\"
\n\u73b0\u5728\u6211\u4eec\u5c06\u5bf9\"kernel\"\u548c\"firewalls\"\u8fdb\u884c\u7b80\u5355\u7684\u5ba1\u8ba1\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u3002<\/p>\n

\r\n[root@localhost lynis]# .\/lynis --tests-from-group \"kernel firewalls\"\r\n<\/pre>\n

\"\"
\n\"\"
\n\"\"
\n\"\"
\n\u8981\u67e5\u770b\u66f4\u591a\u7684lynis\u547d\u4ee4\u9009\u9879\uff0c\u8bf7\u53c2\u8003\u5b83\u7684\u624b\u518c\u9875\uff1a<\/p>\n

\r\n[root@localhost lynis]# .\/lynis --man\r\n<\/pre>\n
\u603b\u7ed3<\/strong><\/div>\n

Lynis\u662fUnix\/Linux\u7b49\u64cd\u4f5c\u7cfb\u7edf\u7684\u4e00\u6b3e\u5b89\u5168\u5ba1\u8ba1\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u53d1\u73b0\u57fa\u4e8eLinux\u7cfb\u7edf\u4e2d\u7684\u6076\u610f\u8f6f\u4ef6\u548c\u5b89\u5168\u6f0f\u6d1e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u901a\u5e38\u6211\u4eec\u5728Linux\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\u5f88\u591a\u4e1c\u897f\uff0c\u6bd4\u5982\u7f51\u7edc\u670d\u52a1\u3001\u6570\u636e\u5e93\u670d\u52a1\u3001\u7535\u5b50\u90ae\u4ef6\u670d\u52a1\u3001FTP\u670d\u52a1\u7b49\u7b49\u3002\u901a\u8fc7\u5728\u6240\u6709L […]<\/p>\n","protected":false},"author":309,"featured_media":201952,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-201951","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/201951","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/309"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=201951"}],"version-history":[{"count":2,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/201951\/revisions"}],"predecessor-version":[{"id":201961,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/201951\/revisions\/201961"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/201952"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=201951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=201951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=201951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}