{"id":96909,"date":"2024-05-30T23:20:10","date_gmt":"2024-05-30T15:20:10","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=96909"},"modified":"2024-05-30T23:20:10","modified_gmt":"2024-05-30T15:20:10","slug":"linux-server-protection","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/linux-server-protection.html","title":{"rendered":"Linux\u670d\u52a1\u5668\u4fdd\u62a4\u7684\u5e38\u7528\u65b9\u6cd5"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u5728\u5b9e\u9645\u7684\u751f\u4ea7\u73af\u5883\u4e2d\uff0c\u5f00\u53d1\u548c\u6d4b\u8bd5\u4eba\u5458\u90fd\u5c3d\u53ef\u80fd\u7684\u4fdd\u8bc1\u5b89\u5168\uff0c\u4ee5\u907f\u514d\u4e00\u4e9b\u91cd\u8981\u4fe1\u606f\u6cc4\u9732\u751a\u81f3\u88ab\u7a83\u53d6\u3002\u8bb8\u591a\u4f01\u4e1a\u6216\u7ec4\u7ec7\u8fd8\u62e5\u6709\u8f83\u4e3a\u5b8c\u5584\u7684\u5a01\u80c1\u5efa\u6a21\uff0c\u4f46\u5373\u4fbf\u5982\u6b64\u5b89\u5168\u95ee\u9898\u4ecd\u5c42\u51fa\u4e0d\u7a77\u3002\u6709\u7684\u4f01\u4e1a\u5219\u671f\u671b\u901a\u8fc7\u7f51\u7edc\u4e0a\u7684\u767d\u5e3d\u6216\u9ed1\u5e3d\u4eec\uff0c\u6765\u5e2e\u52a9\u4ed6\u4eec\u5171\u540c\u5b8c\u6210\u4f01\u4e1a\u7684\u5b89\u5168\u5efa\u8bbe\u3002\u4f46\u662f\u4f5c\u4e3a\u4f01\u4e1a\u9700\u8981\u660e\u767d\u4e00\u70b9\uff0c\u5e76\u4e0d\u662f\u6240\u6709\u7684\u767d\u5e3d\u6216\u9ed1\u5e3d\uff0c\u90fd\u613f\u610f\u5c06\u81ea\u5df1\u7684\u5b89\u5168\u5efa\u8bae\u5206\u4eab\u7ed9\u4ed6\u4eec\u3002\u5bf9\u4e8e\u5b89\u5168\u9632\u62a4\u4e5f\u4e0d\u4ec5\u4ec5\u662f\u4f7f\u75282FA\u548c\u5bc6\u7801\u7ba1\u7406\u5668\uff0c\u5b89\u88c5\u66f4\u65b0\u548c\u4e0d\u70b9\u51fb\u53ef\u7591\u94fe\u63a5\u8fd9\u4e00\u53e3\u53f7\u90a3\u4e48\u7b80\u5355\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \u8fd9\u7bc7\u6587\u7ae0\u7684\u5185\u5bb9\u5176\u5b9e\u6211\u5728\u4e00\u4e9b\u5b89\u5168\u4f1a\u8bae\u4e0a\u5df2\u7ecf\u6f14\u8bb2\u8fc7\u4e24\u56de\u4e86\uff0c\u5728\u8fd9\u91cc\u6211\u5bf9\u90e8\u5206\u5185\u5bb9\u505a\u4e86\u4e00\u4e9b\u4fee\u6539\u5e76\u5e0c\u671b\u518d\u6b21\u5206\u4eab\u7ed9\u5927\u5bb6\uff0c\u4e3b\u8981\u9762\u5411\u90a3\u4e9b\u521a\u521a\u5b66\u4e60\u6216\u4e86\u89e3Linux\u5b89\u5168\u7684\u4eba\u3002\u5728\u672c\u6587\u6211\u5e76\u4e0d\u4f1a\u5b9e\u9645\u8ba8\u8bbaWeb\u5e94\u7528\u7684\u5b89\u5168\uff0c\u60f3\u8981\u4e86\u89e3\u548c\u5b66\u4e60\u8fd9\u65b9\u9762\u7684\u5185\u5bb9\uff0c\u5927\u53ef\u4ee5\u53c2\u8003OWASP Top 10\u5b83\u53ef\u4ee5\u6559\u4f1a\u5f00\u53d1\u548c\u6d4b\u8bd5\u4eba\u5458\u6709\u5173SQL\u6ce8\u5165\uff0cCSRF\uff0cXSS\uff0c\u4f1a\u8bdd\u7ba1\u7406\u7b49\u77e5\u8bc6\u3002\u5982\u679c\u4f60\u62c5\u5fc3\u7684\u662f\u66f4\u52a0\u9ad8\u7ea7\u7684\u653b\u51fb\u8005\uff0c\u5e76\u4e14\u9700\u8981\u9632\u8303\u53ef\u80fd\u7684\u6076\u610f\u4ee3\u7801\u6216\u63d0\u6743\u811a\u672c\u88ab\u6267\u884c\uff0c\u90a3\u4e48\u5728\u672c\u6587\u4e2d\u4f60\u5c06\u5b66\u4e60\u5230\u4f60\u60f3\u4e86\u89e3\u7684\u77e5\u8bc6\u3002\u8fdc\u7aef\u7684\u5165\u4fb5\u8005\u751a\u81f3\u662f\u4e00\u4e2a\u4e0d\u8d77\u773c\u7684\u5185\u90e8\u5a01\u80c1\u8005\uff0c\u6b64\u65f6\u53ef\u80fd\u65e9\u5df2\u6f5c\u4f0f\u5728\u4f60\u7684\u7cfb\u7edf\u4e2d\u4f3a\u673a\u800c\u52a8\u3002<\/p>\n \u4ee5\u4e0b\u6211\u4f1a\u63d0\u5230\u4e00\u4e9b\u57fa\u672c\u6982\u5ff5\uff0c\u5e76\u5305\u542b\u76f8\u5173\u7684\u5de5\u5177\u3002\u540c\u65f6\uff0c\u5728\u8fd9\u91cc\u4f60\u9700\u8981\u95ee\u4f60\u81ea\u5df1\uff1a<\/p>\n ACL\uff08\u8bbf\u95ee\u63a7\u5236\u5217\u8868\uff09<\/strong><\/div>\n \u4f60\u7684\u57fa\u7840\u8bbe\u65bd\u662f\u5426\u5206\u4e3a\u4e0d\u540c\u7684\u7cfb\u7edf\uff0c\u5177\u6709\u4e0d\u540c\u7684\u57fa\u4e8e\u89d2\u8272\u7684\u8bbf\u95ee\u7ea7\u522b\uff0c\u6216\u8005\u7528\u6237\u62e5\u6709\u5b8c\u5168\u76f8\u540c\u7684\u7279\u6743\uff1f<\/p>\n acl: getfacl+setfacl<\/p>\n \u7cfb\u7edf\u5ba1\u8ba1<\/strong><\/div>\n \u4f60\u662f\u5426\u5df2\u5bf9\u767b\u5f55\u5230\u67d0\u53f0\u673a\u5668\u7684\u7528\u6237\u6267\u884c\u8003\u8651\u5468\u5168?<\/p>\n \u67e5\u770b\uff1aauditd, go-audit<\/p>\n \u9759\u6001\u5206\u6790\u548cfuzzing<\/strong><\/div>\n \u4f60\u53ef\u80fd\u6b63\u5728\u8fd0\u884cC\/C++\u3002\u5185\u5b58\u5b89\u5168\u95ee\u9898\uff0c\u5360\u636e\u4e86\u5927\u591a\u6570\u51fa\u73b0\u7684\u6f0f\u6d1e\u3002\u4f60\u662f\u5426\u5bf9\u8fd9\u4e9b\u4ee3\u7801\u505a\u8fc7\u5ba1\u8ba1\uff0c\u9759\u6001\u5206\u6790\u6216fuzzing\u6d4b\u8bd5\u4ee5\u786e\u4fdd\u5b83\u4eec\u7684\u5b89\u5168\u6027\uff1f\u4f60\u662f\u5426\u8003\u8651\u8fc7\u5728 Rust\u4e2d\u5f00\u53d1\uff1f<\/p>\n \u67e5\u770b\uff1aafl, Radamsa, Sulley, boofuzz, Coverity Scan, Valgrind, sanitizers<\/p>\n \u7f51\u7edc\u5206\u6bb5<\/strong><\/div>\n \u4f60\u662f\u5426\u5df2\u5c06\u4f60\u7684\u540e\u7aef\u4e0e\u4f60\u7684\u524d\u7aef\u53ca\u8d1f\u8f7d\u5747\u8861\u5668\u6b63\u786e\u5206\u79bb\uff1f\u4f60\u662f\u5426\u82b1\u65f6\u95f4\u8bbe\u7f6e\u4e86\u516c\u53f8VPN\uff0c\u5e76\u6388\u4e88\u4f60\u7684\u673a\u5668\u79c1\u6709\u7684\u5185\u90e8\u5730\u5740\uff1f<\/p>\n \u67e5\u770b\uff1a iptables, ufw<\/p>\n \u9694\u79bb<\/strong><\/div>\n \u4f60\u7684\u5458\u5de5\u662f\u5426\u5c06\u4ed6\u4eec\u7684\u5de5\u4f5c\u7535\u8111\u7528\u4e8e\u4e2a\u4eba\u6d3b\u52a8\uff0c\u4f8b\u5982\u6e38\u620f\u6216\u4e0e\u5176\u5de5\u4f5c\u65e0\u5173\u7684\u5e94\u7528\u7a0b\u5e8f\uff1f\u6216\u8005\u4ed6\u4eec\u662f\u5426\u6709\u4f7f\u7528\u50cf\u865a\u62df\u673a\u6216\u5bb9\u5668\u4e00\u7c7b\u7684\u4e1c\u897f\u6765\u8fdb\u884c\u6d88\u606f\u4f20\u9012\uff0c\u6d4f\u89c8\uff0c\u5f00\u53d1\u2026\u2026\uff1f<\/p>\n \u67e5\u770b\uff1a Qubes, VirtualBox<\/p>\n \u6587\u4ef6\u6743\u9650\u548cumask<\/strong><\/div>\n \u4efb\u4f55\u5bf9Unix\u6709\u57fa\u7840\u4e86\u89e3\u7684\u4eba\uff0c\u90fd\u4e0d\u4f1a\u5bf9\u6587\u4ef6\u6743\u9650\u611f\u5230\u964c\u751f\u3002\u5982\u679c\u4f60\u6ca1\u6709\u4e25\u683c\u63a7\u5236\u67d0\u4e9b\u6587\u4ef6\u7684\u8bfb\u5199\u6267\u884c\u6743\u9650\uff0c\u90a3\u4e48\u6211\u5f3a\u70c8\u5efa\u8bae\u4f60\u6309\u7167\u6700\u4e25\u683c\u7684\u89c4\u8303\u5b9e\u65bd\u6743\u9650\u63a7\u5236\u3002<\/p>\n \u66f4\u591a\u5185\u5bb9<\/p>\n \u5bb9\u5668<\/strong><\/div>\n \u96c6\u88c5\u7bb1\u5316\u5728\u7406\u8bba\u4e0a\u5bf9\u5b89\u5168\u6709\u5f88\u5927\u7684\u5e2e\u52a9\u3002\u4f46\u6211\u60f3\u77e5\u9053\u8c01\u88ab\u5141\u8bb8\u5efa\u7acb\u5e76\u5c06\u955c\u50cf\u6295\u5165\u751f\u4ea7\u73af\u5883\uff0c\u4ed6\u4eec\u662f\u5426\u4e5f\u8fdb\u884c\u4e86\u7b7e\u540d\u548c\u9a8c\u8bc1\uff0c\u5e76\u5bf9\u5b89\u5168\u66f4\u65b0\u548cCVE\u8fdb\u884c\u76d1\u63a7\uff1f<\/p>\n \u67e5\u770b\uff1aDocker, LXC<\/p>\n \u5229\u7528\u5a01\u80c1\u60c5\u62a5<\/strong><\/div>\n \u4eceIPv4\u5730\u5740\u7a7a\u95f4\u53d1\u8d77\u6076\u610fIP\u6d41\uff0c\u51c6\u5907\u8fdb\u884cDDoS\u653b\u51fb\u7684\u50f5\u5c38\u7f51\u7edc\u4ee5\u53ca\u81ea\u52a8\u5316\u7684\u5229\u7528\u626b\u63cf\u6b63\u5728\u8fdb\u884c\u3002\u4f60\u53ef\u4ee5\u81ea\u5df1\u6536\u96c6\u6709\u5173\u6b64\u7c7b\u6d3b\u52a8\u7684\u60c5\u62a5\uff0c\u4e5f\u53ef\u4ee5\u8ba2\u9605\u76f8\u5173\u4ea7\u54c1\u7684feed\u6216\u9ed1\u540d\u5355\u5217\u8868\u3002\u4f46\u4f60\u7684\u7aef\u70b9\/\u9632\u706b\u5899\uff0c\u662f\u5426\u6709\u5bf9\u6b64\u4f5c\u51fa\u53cd\u5e94\u5e76\u5408\u5e76\u8fd9\u4e9b\u4fe1\u606f\uff1f<\/p>\n \u67e5\u770b\uff1a\u5a01\u80c1\u60c5\u62a5\u8d44\u6e90\u5217\u8868<\/p>\n \u9632\u706b\u5899\u548c\u5305\u8fc7\u6ee4<\/strong><\/div>\n \u4f60\u591a\u4e45\u5ba1\u67e5\u4e00\u6b21\u4f60\u7684iptables\u89c4\u5219\u6216\u4f60\u662f\u5426\u4e86\u89e3\u4f60\u7684\u8def\u7531\u5668\/\u9632\u706b\u5899\u6267\u884c\u7684\u5185\u5bb9\uff0c\u6709\u6ca1\u6709\u5bf9\u5b83\u4eec\u8fdb\u884c\u8fd0\u884c\u9a8c\u8bc1\u6d4b\u8bd5\uff1f\u4f60\u662f\u5426\u6b63\u786e\u914d\u7f6e\u4e86\u5305\u8fc7\u6ee4\u89c4\u5219\uff0c\u4ee5\u786e\u4fdd\u673a\u5668\u53ea\u80fd\u4e0e\u90a3\u4e9b\u9700\u8981\u7684\u6570\u636e\u901a\u4fe1\uff1f<\/p>\n \u67e5\u770b\uff1apfSense, OPNsense<\/p>\n DNS\u548c\u57df\u540d\u6ce8\u518c\u5546<\/strong><\/div>\n \u4f60\u4e3a\u6b64\u9501\u5b9a\u4e86\u591a\u5c11\u52aa\u529b\uff1f\u4f60\u5df2\u7ecf\u4ed8\u51fa\u4e86\u591a\u5c11\u52aa\u529b\u6765\u9501\u5b9a\u5b83\uff1f\u5f53\u4f60\u7684\u57df\u540d\u670d\u52a1\u5668\u6216DNS\u533a\u57df\u6587\u4ef6\u88ab\u672a\u7ecf\u6388\u6743\u66f4\u6539\u65f6\uff0c\u4f60\u662f\u5426\u4f1a\u6536\u5230\u76f8\u5e94\u8b66\u62a5\uff1f\u6b64\u5916\uff0c\u4f60\u662f\u5426\u542f\u7528\u4e86DNSSEC\uff1f<\/p>\n \u5c31\u6211\u4e2a\u4eba\u800c\u8a00\uff0c\u6211\u5efa\u8bae\u5c06Namecheap\u4f5c\u4e3a\u6ce8\u518c\u670d\u52a1\u5546\uff0c\u5e76\u5c06Cloudflare\u7528\u4e8e\u9ad8\u6027\u80fdDNS\u3002<\/p>\n \u7269\u7406\u8bbf\u95ee<\/strong><\/div>\n \u5982\u679c\u6211\u662f\u6cd5\u9662\u7684\u6267\u6cd5\u4eba\u5458\uff0c\u6570\u636e\u4e2d\u5fc3\u5de5\u4f5c\u4eba\u5458\u6216\u4f60\u7684\u6258\u7ba1\u670d\u52a1\u63d0\u4f9b\u5546\uff0c\u6211\u662f\u5426\u53ef\u4ee5\u81ea\u7531\u7684\u7684\u8bfb\u53d6\u4f60\u670d\u52a1\u5668\u7684\u5185\u5bb9\uff08\u5168\u76d8\u52a0\u5bc6\u9664\u5916\uff09\uff1f\u5f53\u4f60\u7684\u78c1\u76d8\u9000\u5f79\u6216\u66f4\u6362\u65f6\uff0c\u5176\u4e2d\u7684\u5185\u5bb9\u662f\u5426\u4f1a\u88ab\u64e6\u9664\uff1f\u5982\u679c\u6709\u4eba\u5c06USB\u63d2\u51651U\u673a\u67b6\u4f3a\u670d\u5668\uff0c\u4f60\u662f\u5426\u4f1a\u6536\u5230\u8b66\u62a5\u63d0\u9192\uff1f<\/p>\n \u67e5\u770b\uff1aLUKS\/cryptsetup<\/p>\n \u4f60\u6709\u786e\u5b9a\u6027\u7684\u6784\u5efa\u5417\uff1f<\/strong><\/div>\n \u5f53\u5f00\u53d1\u4eba\u5458\u5c06\u6784\u5efa\u4ee3\u7801\u63a8\u9001\u5230\u751f\u4ea7\u73af\u5883\u4e2d\u65f6\uff0c\u4f60\u662f\u5426\u53ef\u4ee5\u9a8c\u8bc1\u8fd9\u4e9b\u4ee3\u7801\u7684\u771f\u5b9e\u610f\u56fe\uff0c\u5e76\u4e14\u4fdd\u8bc1\u6e90\u7801\u6216\u9759\u6001\u94fe\u63a5\u7684\u4f9d\u8d56\u5173\u7cfb\u672a\u88ab\u6076\u610f\u4fee\u6539\uff1f<\/p>\n \u67e5\u770b\uff1aGitian<\/p>\n \u9a8c\u8bc1\u6570\u5b57\u7b7e\u540d<\/strong><\/div>\n \u6beb\u65e0\u7591\u95ee\uff0c\u4f60\u53ef\u80fd\u4f1a\u4ece\u4e00\u4e9b\u975e\u5b98\u65b9\u7ad9\u70b9\u83b7\u53d6\u6216\u4e0b\u8f7d\u4e00\u4e9b\u4ee3\u7801\u548c\u8f6f\u4ef6\u3002\u90a3\u4e48\u5728\u56e2\u961f\u6210\u5458\u7ee7\u7eed\u6784\u5efa\u6216\u5b89\u88c5\u4e4b\u524d\uff0c\u4f60\u662f\u5426\u6bd4\u8f83\u8fc7\u6821\u9a8c\u548c\/\u54c8\u5e0c\u6216\u9a8c\u8bc1\u4e86\u8be5\u4e0b\u8f7d\u7684\u7b7e\u540d\uff1f<\/p>\n \u67e5\u770b\uff1a\u4f7f\u7528GnuPG\u5236\u4f5c\u548c\u9a8c\u8bc1\u7b7e\u540d<\/p>\n \u6c99\u76d2\u73af\u5883<\/strong><\/div>\n \u5b83\u662f\u5426\u5177\u6709AppArmor\u914d\u7f6e\u6587\u4ef6\uff0cseccomp\u8fc7\u6ee4\u5668\u6216RBAC\u7b56\u7565\uff0c\u6307\u5b9a\u5b83\u5728\u7cfb\u7edf\u8c03\u7528\u548c\u8bbf\u95ee\u6743\u9650\u65b9\u9762\u7684\u529f\u80fd\uff1f<\/p>\n \u67e5\u770b\uff1aseccomp, AppArmor<\/p>\n TLS\u548c\u52a0\u5bc6\u914d\u7f6e<\/strong><\/div>\n \u4f60\u662f\u5426\u5df2\u7ecf\u5b8c\u5168\u5f03\u7528\u90a3\u4e9b\u4e0d\u5b89\u5168\u7684\u52a0\u5bc6\u5957\u4ef6\u548c\u7b97\u6cd5\uff08\u4f8b\u5982MD5\uff0cSHA1\uff0cRC4\uff09\uff1f\u5e76\u5728\u517c\u5bb9\u6027\u548c\u7528\u6237\u671f\u671b\u4e0a\u9009\u62e9\u6700\u4f73\u7684\u52a0\u5bc6\u65b9\u5f0f\uff0cHMAC\u548c\u5bc6\u94a5\u4ea4\u6362\u7b97\u6cd5\u3002\u5982\u679c\u53ef\u7528\uff0c\u4f18\u5148\u8003\u8651\u4f7f\u7528RSA\u52a0\u5bc6\u7b97\u6cd5\u3002\u8fd9\u9002\u7528\u4e8eOpenSSH\uff0cGnuPG\uff0cOpenVPN\u7b49\u3002\u4f7f\u7528Let\u2019s Encrypt.t\u5373\u53ef\u8f7b\u677e\u83b7\u5f97ssl\u7684\u514d\u8d39\u8bc1\u4e66\u3002<\/p>\n \u67e5\u770b\uff1a\u5e94\u7528\u5bc6\u7801\u52a0\u56fa\uff0cSSL\u548cTLS\uff0c\u670d\u52a1\u5668\u7aefTLS<\/p>\n \u516c\u5bc6\u94a5\u7ba1\u7406<\/strong><\/div>\n \u5982\u679c\u4f60\u7684\u6bcf\u4e2a\u5458\u5de5\u90fd\u62e5\u6709\u81ea\u5df1\u7684\u5bc6\u94a5\uff0c\u8bf7\u8003\u8651\u5728\u6574\u4e2a\u57df\u4e2d\u5bf9\u5176\u8fdb\u884c\u540c\u6b65\uff0c\u5e76\u5c06\u5bc6\u94a5\u79fb\u51fa\u7248\u672c\u63a7\u5236\u3002<\/p>\n \u67e5\u770b\uff1aGPGSync, sops, Vault<\/p>\n HTTP\u5934\u5b89\u5168<\/strong><\/div>\n \u5173\u4e8eHTTP\u5934\u5b89\u5168\uff0c\u8fd9\u91cc\u6709\u4e00\u4e2a\u5217\u8868\u53ef\u4f9b\u5927\u5bb6\u53c2\u8003\uff1aX-Frame-Options, X-XSS-Protection, X-Content-Type-Options, X-Download-Options, X-Permitted-Cross-Domain-Policies, Content-Security-Policy, Referrer-Policy, Strict-Transport-Security, Public-Key-Pins\u3002\u8fd9\u4e9b\u54cd\u5e94\u5934\u7684\u6b63\u786e\u914d\u7f6e\uff0c\u5bf9\u5b89\u5168\u4e5f\u81f3\u5173\u91cd\u8981\u3002<\/p>\n \u67e5\u770b\uff1a securityheaders.io, Mozilla web\u5b89\u5168\u6307\u5357<\/p>\n \u6587\u4ef6\u5b8c\u6574\u6027\u76d1\u63a7<\/strong><\/div>\n \u4f60\u662f\u5426\u5bf9\u91cd\u8981\u6587\u4ef6\u505a\u5b9a\u671f\u68c0\u67e5\uff0c\u5df2\u786e\u4fdd\u6587\u4ef6\u672a\u88ab\u4fee\u6539\u5e76\u751f\u6210\u88ab\u66f4\u6539\u7684\u8b66\u62a5\uff1f<\/p>\n \u67e5\u770b\uff1a Tripwire, OSSEC<\/p>\n \u5165\u4fb5\u68c0\u6d4b<\/strong><\/div>\n \u6216\u8bb8\u4f60\u5df2\u7ecf\u90e8\u7f72\u4e86\u591a\u79cd\u7c7b\u578b\u7684\u5165\u4fb5\u68c0\u6d4b\u5de5\u5177\uff0c\u4f46\u4f60\u662f\u5426\u4ec5\u4ec5\u53ea\u662f\u6309\u7167\u9ed8\u8ba4\u7684\u89c4\u5219\u914d\u7f6e\u6765\u8fd0\u884c\u5b83\uff0c\u5e76\u6ca1\u6709\u82b1\u8d39\u65f6\u95f4\u6765\u5b66\u4e60\u76f8\u5173\u7684\u6280\u672f\u77e5\u8bc6\uff0c\u4ee5\u53ca\u6839\u636e\u81ea\u8eab\u5e94\u7528\u60c5\u51b5\u6765\u914d\u7f6e\u5408\u9002\u7684\u89c4\u5219\u96c6\uff1f<\/p>\n \u67e5\u770b\uff1a\u6bd4\u8f83\u57fa\u4e8e\u4e3b\u673a\u7684\u5165\u4fb5\u68c0\u6d4b\u7cfb\u7edf\uff0cSnort<\/p>\n \u6f0f\u6d1e\u7ba1\u7406<\/strong><\/div>\n \u901a\u8fc7\u8ba2\u9605\u90ae\u4ef6\uff0c\u6211\u4eec\u53ef\u4ee5\u83b7\u53d6\u65b0\u7684\u6f0f\u6d1e\u62a5\u544a\u5e76\u4fee\u590d\u6f0f\u6d1e\u3002\u90a3\u4e48\uff0c\u4f60\u8fd8\u8bb0\u5f97\u4f60\u6700\u540e\u4e00\u6b21\u68c0\u67e5CVE\u6d3b\u52a8\u662f\u4ec0\u4e48\u65f6\u5019\u5417\uff1f<\/p>\n \u67e5\u770b\uff1aNessus, CoreOS clair<\/p>\n \u57fa\u7840\u7cfb\u7edf\u7684\u5b89\u5168<\/strong><\/div>\n \u4f60\u662f\u5426\u771f\u7684\u5b8c\u5168\u4fe1\u4efbDebian\/Ubuntu\uff0cRHEL\u6216\u4efb\u4f55\u516c\u53f8\u7684\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u5b58\u50a8\u5e93\uff0c\u53ef\u4ee5\u59cb\u7ec8\u4e3a\u4f60\u63d0\u4f9b\u975e\u6076\u610f\u7684\u8f6f\u4ef6\u5305\uff1f\u8fd9\u91cc\u6709\u4e00\u4e2a\u60f3\u6cd5\uff1a\u4f60\u53ef\u4ee5\u6258\u7ba1\u81ea\u5df1\u7684\u5b58\u50a8\u5e93\uff0c\u56fa\u5b9a\u5230\u7279\u5b9a\u7684\u7248\u672c\uff0c\u5e76\u4e14\u4ec5\u5728\u6d4b\u8bd5\u540e\u624d\u5347\u7ea7\u3002<\/p>\n \u6216\u8005\uff0c\u4f60\u4e5f\u53ef\u4ee5\u8fd0\u884c\u57fa\u4e8eAlpine\u6216LinuxKit\u7684\u6781\u5c0f\u64cd\u4f5c\u7cfb\u7edf\uff0c\u8fd9\u6837\u53ef\u4ee5\u6700\u5927\u7a0b\u5ea6\u4e0a\u7684\u51cf\u5c11\u4f60\u7684\u653b\u51fb\u9762\u3002<\/p>\n LSM\uff08Linux\u5b89\u5168\u6a21\u5757\uff09<\/strong><\/div>\n \u5373AppArmor\u6216SELINUX\uff0c\u4ed6\u4eec\u6700\u8fd1\u662f\u5426\u4e3a\u4f60\u505a\u8fc7\u4efb\u4f55\u4e8b\u60c5\uff1f<\/p>\n Linux\u5185\u6838\u52a0\u56fa<\/strong><\/div>\n \u8fd9\u91cc\u6211\u5efa\u8bae\u5927\u5bb6\u76f4\u63a5\u53bb\u67e5\u770bPaX\u548cgrsecurity\u8865\u4e01\u3002\u524d\u4e0d\u4e45\u88ab\u66dd\u51fa\u7684Spectre\u548cMeltdown\u6f0f\u6d1e\uff0c\u4e5f\u4e3a\u6211\u4eec\u7684\u5185\u6838\u5b89\u5168\u95ee\u9898\u6572\u54cd\u4e86\u8b66\u949f\u3002<\/p>\n \u67e5\u770b\uff1agrsecurity.net\uff0cLinux \u5185\u6838\u5b89\u5168\u536b\u58eb\uff0c\u5185\u6838\u81ea\u6211\u4fdd\u62a4\u9879\u76ee<\/p>\n \u79fb\u9664\u4e0d\u5fc5\u8981\u7684\u8bbe\u5907<\/strong><\/div>\n \u5982\u679c\u4f60\u6ca1\u6709\u4f7f\u7528Thunderbolt\uff0cFirewire\uff0c\u65e0\u7ebf\u7f51\u5361\u6216\u4efb\u4f55\u5177\u6709DMA\uff08\u76f4\u63a5\u5185\u5b58\u8bbf\u95ee\uff09\u6a21\u5f0f\u7684\u6a21\u5757\uff0c\u90a3\u4e48\u4f60\u5c31\u6ca1\u6709\u7406\u7531\u52a0\u8f7d\u8fd9\u4e9b\u5185\u6838\u6a21\u5757\u3002<\/p>\n \u67e5\u770b\uff1a\u5185\u6838\u6a21\u5757\u9ed1\u540d\u5355\u5217\u8868<\/p>\n \u65e5\u5fd7\u8fc7\u6ee4<\/strong><\/div>\n \u4e5f\u8bb8\u4f60\u8fd8\u5728\u901a\u8fc7\u624b\u52a8\u7684\u65b9\u5f0f\u68c0\u67e5\u65e5\u5fd7\u6587\u4ef6\uff0c\u90a3\u4e48\u4f60\u5e94\u8be5\u5b66\u4f1a\u7f16\u5199Logstash\u8fc7\u6ee4\u548cgrok pattern\u3002Grok\u662fLogstash \u6700\u91cd\u8981\u7684\u63d2\u4ef6\u3002\u4f60\u53ef\u4ee5\u5728 grok \u91cc\u9884\u5b9a\u4e49\u597d\u547d\u540d\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u5728\u7a0d\u540e(grok\u53c2\u6570\u6216\u8005\u5176\u4ed6\u6b63\u5219\u8868\u8fbe\u5f0f\u91cc)\u5f15\u7528\u5b83\u3002\u5b83\u975e\u5e38\u9002\u7528\u4e8esyslog logs\uff0capache\u548c\u4e00\u4e9b\u5176\u4ed6\u7684webserver logs\uff0c\u4ee5\u53camysql logs\u3002grok\u6709\u5f88\u591a\u5b9a\u4e49\u597dpattern\uff0c\u5f53\u7136\u4e5f\u53ef\u4ee5\u81ea\u5df1\u5b9a\u4e49\u3002<\/p>\n \u67e5\u770b\uff1aFilebeat, rsyslog, Logstash<\/p>\n \u4f60\u5982\u4f55\u76d1\u63a7\u8d44\u6e90\u7684\u4f7f\u7528\u60c5\u51b5\uff1f<\/strong><\/div>\n RAM\uff0cCPU\u8d1f\u8f7d\uff0c\u53ef\u7528\u78c1\u76d8\u7a7a\u95f4\u3002\u8fd9\u4e9b\u867d\u7136\u770b\u4e0a\u53bb\u65e0\u5173\u7d27\u8981\uff0c\u4f46\u8fd9\u4e9b\u5730\u65b9\u90fd\u662f\u53d1\u751f\u5f02\u5e38\u6d3b\u52a8\u7684\u5173\u952e\u4f4d\u7f6e\uff0c\u56e0\u6b64\u503c\u5f97\u4e00\u63d0\u3002<\/p>\n \u67e5\u770b\uff1aMetricbeat, Prometheus node_exporter, Nagios, Osquery<\/p>\n \u57fa\u7840\u8bbe\u65bd\u6d4b\u8bd5<\/strong><\/div>\n \u4eba\u4eec\u5bf9\u8f6f\u4ef6\u6d4b\u8bd5\u7684\u5404\u4e2a\u65b9\u9762\u90fd\u5f88\u719f\u6089\uff0c\u4f46\u5bf9\u4e8e\u57fa\u7840\u8bbe\u65bd\u7684\u6d4b\u8bd5\u5374\u5e76\u4e0d\u719f\u6089\u3002\u4f60\u5982\u4f55\u786e\u4fdd\u4f60\u7684\u7cfb\u7edf\u72b6\u6001\u59cb\u7ec8\u7b26\u5408\u4f60\u7684\u9884\u671f\uff1f<\/p>\n \u67e5\u770b\uff1aServerspec, Testinfra<\/p>\n \u5e73\u53f0\u548c\u56fa\u4ef6\u5b89\u5168<\/strong><\/div>\n \u4f60\u7684BIOS\u548c\u5176\u4ed6\u4f4e\u7ea7\u63a5\u53e3\u53d7\u5230\u9519\u8bef\u5f71\u54cd\u3002\u82f1\u7279\u5c14\u00aeAMT\u548c\u7ba1\u7406\u5f15\u64ce\uff0c\u4ee5\u53caComputrace\u5e94\u88ab\u7981\u7528\u3002\u4e0b\u9762\u94fe\u63a5\u63d0\u4f9b\u4e86\u4e00\u4e2a\u975e\u5e38\u6709\u7528\u7684\u7528\u4e8e\u5206\u6790\u7cfb\u7edf\u56fa\u4ef6\u548c\u786c\u4ef6\u7ec4\u4ef6\u5b89\u5168\u6027\u7684\u6846\u67b6\u3002<\/p>\n \u67e5\u770b\uff1aCHIPSEC<\/p>\n \u4fdd\u62a4\u8fdc\u7a0bshell<\/strong><\/div>\n sshd\u901a\u7528\u51c6\u5219\uff1a\u7981\u7528root\u767b\u5f55\uff0c\u4f7f\u7528\u5bc6\u94a5\u4ee3\u66ff\u5bc6\u7801\uff0c\u5e76\u8bbe\u7f6e\u66b4\u7834\u9632\u62a4\u3002\u800c\u66f4\u597d\u7684\u89e3\u51b3\u65b9\u6848\u662f\u5c06\u5176\u653e\u7f6e\u5728VPN\u540e\u9762\uff0c\u901a\u8fc7\u9a8c\u8bc1\u7684Tor\u9690\u85cf\u670d\u52a1\uff0c\u6216\u8005\u9700\u8981\u7aef\u53e3\u8bd5\u63a2\u6765\u52a8\u6001\u5f00\u542f\u4e00\u4e9b\u7279\u5b9a\u7aef\u53e3\u8fde\u63a5\u4e3b\u673a\u3002<\/p>\n \u67e5\u770b\uff1afail2ban, denyhosts, sshguard, Secure Secure Shell<\/p>\n Webserver\u6700\u4f73\u5b9e\u8df5<\/strong><\/div>\n \u5982\u679c\u4f60\u4e0d\u60f3\u6cc4\u9732\u4f60\u5f53\u524d\u6b63\u5728\u8fd0\u884c\u670d\u52a1\u5668\u7684\u7248\u672c\u4fe1\u606f\uff0c\u5bf9\u4e8enginx\u4f60\u53ef\u4ee5\u901a\u8fc7\u5c06\u53c2\u6570server_tokens\u8bbe\u4e3aoff\u6765\u5b9e\u73b0\uff0c\u5982\u679c\u662fApache\u5219\u5c06ServerSignature\u8bbe\u4e3aoff\u5373\u53ef\u3002<\/p>\n \u5728\u8fd0\u884c\u4f9d\u8d56\u4e8e\u52a8\u6001\u811a\u672c\u8bed\u8a00\u7684\u590d\u6742\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u8bf7\u8003\u8651\u8fd0\u884c\u7c7b\u4f3cModSecurity\u7684WAF\uff08Web\u5e94\u7528\u7a0b\u5e8f\u9632\u706b\u5899\uff09\u3002 Cloudflare\u6b63\u5927\u89c4\u6a21\u7684\u5411\u5176\u5ba2\u6237\u63d0\u4f9b\u6b64\u9879\u670d\u52a1\u3002<\/p>\n \u6b21\u8981\u56e0\u7d20<\/strong><\/div>\n \u6211\u5f3a\u70c8\u63a8\u8350\u4f7f\u7528YubiKey\uff0c\u5b83\u6709\u5f88\u591a\u6709\u7528\u7684\u529f\u80fd\u3002\u5b83\u53ef\u4ee5\u914d\u7f6e\u4e3a\u8f93\u51fa\u9759\u6001\u5bc6\u7801\uff08\u975e\u5e38\u9002\u5408PAM\u7528\u6237\u767b\u5f55\u6216\u6302\u8f7d\u5377\u52a0\u5bc6\uff09\uff0cHOTP\u6216\u901a\u7528\u53cc\u56e0\u7d20\uff08U2F\uff09\u8ba4\u8bc1\uff0c\u6216\u8005\u53ef\u4ee5\u4f7f\u7528OpenPGP\u667a\u80fd\u5361\u3002\u8fd9\u4e9b\u8bbe\u5907\u5bf9\u4e8e\u4efb\u4f55\u7cfb\u7edf\u7ba1\u7406\u5458\u6765\u8bf4\u90fd\u662f\u4e0d\u53ef\u6216\u7f3a\u7684\u3002\u4e3a\u6b64\uff0c\u6211\u5df2\u7ecf\u53d1\u5e03\u4e86\u8be6\u7ec6\u7684YubiKey GPG+SSH\u7684\u5b89\u88c5\u6307\u5357\u3002<\/p>\n DNS\u89e3\u6790<\/strong><\/div>\n \u4f60\u7684\/etc\/resolv.conf\u6587\u4ef6\u662f\u5426\u6b63\u786e\u914d\u7f6e\uff1f Quad9\u662f\u8c37\u6b4c\u516c\u5171DNS\u6216OpenDNS\u7684\u66ff\u4ee3\u4ea7\u54c1\uff0c\u53ef\u963b\u6b62\u5ba2\u6237\u7aef\u8bbf\u95ee\u6076\u610f\u57df\u540d\uff0c\u8fd9\u4e0eChrome\u6d4f\u89c8\u5668\u901a\u8fc7\u5b89\u5168\u6d4f\u89c8\u529f\u80fd\u6765\u4fdd\u62a4\u7528\u6237\u7684\u529f\u80fd\u7c7b\u4f3c\u3002\u6240\u4ee5\u5c06\u4f60\u7684\u57df\u540d\u670d\u52a1\u5668\u8bbe\u7f6e\u4e3a9.9.9.9\u5c06\u80fd\u66f4\u597d\u7684\u4fdd\u969c\u4f60\u7684\u5b89\u5168\u3002<\/p>\n \u5ba1\u8ba1\u4fe1\u4efb\u65b9<\/strong><\/div>\n \u9664\u4e86\u8ba9\u7cfb\u7edf\u7684\u53ef\u4fe1\u6839\u8bc1\u4e66\u5b58\u50a8\u4fdd\u6301\u6700\u65b0\u4e4b\u5916\uff0c\u8fd8\u5e94\u8be5\u6bcf\u9694\u4e00\u6bb5\u65f6\u95f4\u68c0\u67e5\u4e00\u6b21\u5305\u7ba1\u7406\u5668\uff0c\u4ee5\u67e5\u770b\u54ea\u4e9b\u7b2c\u4e09\u65b9\u662f\u53ef\u4fe1\u7684\uff0c\u4ed6\u4eec\u7684\u5b58\u50a8\u5e93\u7b7e\u540d\u5bc6\u94a5\u662f\u5426\u8db3\u591f\u5f3a\u5927\uff08\u8bb8\u591a\u4ecd\u4f7f\u75281024-bit DSA\uff09\uff0c\u5e76\u5220\u9664\u90a3\u4e9b\u8fc7\u671f\u7684\u3002<\/p>\n \u5c1d\u8bd5\uff1aapt-key list, rpm -qa gpg-pubkey<\/p>\n \u7b7e\u540dgit\u63d0\u4ea4\u548c\u6807\u7b7e<\/strong><\/div>\n \u76ee\u524d\uff0c\u51e0\u4e4e\u6240\u6709\u4eba\u90fd\u5728\u4f7f\u7528git\u8fdb\u884c\u7248\u672c\u63a7\u5236\u3002\u5f53\u4f60\u53d1\u5e03\u65b0\u7248\u672c\u65f6\uff0c\u5b83\u662f\u5426\u57fa\u4e8eGPG\u7b7e\u540dgit\u6807\u7b7e\uff1f\u5982\u679c\u4f60\u559c\u6b22\uff0c\u4f60\u4e5f\u53ef\u4ee5\u7b7e\u540d\u63d0\u4ea4\u3002<\/p>\n \n |