{"id":117736,"date":"2026-10-25T08:48:49","date_gmt":"2026-10-25T00:48:49","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/117736.html"},"modified":"2026-10-25T08:48:49","modified_gmt":"2026-10-25T00:48:49","slug":"%e6%9c%8d%e5%8a%a1%e5%99%a8%e8%a2%ab%e6%94%bb%e5%87%bb%e4%ba%86%e6%80%8e%e4%b9%88%e5%8a%9e%ef%bc%9flinux%e5%ba%94%e6%80%a5%e5%93%8d%e5%ba%94%e4%bb%8e%e6%97%a5%e5%bf%97%e5%88%86%e6%9e%90%e5%88%b0","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/117736.html","title":{"rendered":"\u670d\u52a1\u5668\u88ab\u653b\u51fb\u4e86\u600e\u4e48\u529e\uff1fLinux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\u653b\u51fb\u6eaf\u6e90\u5b8c\u6574\u5b9e\u6218"},"content":{"rendered":"<p>        \/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/<br \/>\n        #content_views .toc,<br \/>\n        \/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/<br \/>\n        #content_views.markdown_views &gt; p:empty:has(+ .toc),<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty,<br \/>\n        \/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/<br \/>\n        #content_views.htmledit_views #main-toc,<br \/>\n        #content_views.htmledit_views #hr-toc,<br \/>\n        #content_views.htmledit_views p[id*=\\&#8221;-toc\\&#8221;] {<br \/>\n          display: none !important;<br \/>\n        }<br \/>\n        \/* \u76ee\u5f55\u53bb\u6389\u540e\uff0c\u7d27\u8ddf\u7684\u9996\u4e2a\u6807\u9898\u4e0d\u518d\u591a\u51fa\u4e00\u5757\u4e0a\u8fb9\u8ddd *\/<br \/>\n        #content_views.markdown_views &gt; .toc + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + h4,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h4 {<br \/>\n          margin-top: 0 !important;<br \/>\n        }<\/p>\n<p>\u670d\u52a1\u5668\u544a\u8b66\u5f80\u5f80\u6765\u5f97\u6beb\u65e0\u9884\u5146&#xff1a;CPU \u83ab\u540d\u98d9\u5230 100%\u3001\u5f02\u5e38\u5916\u8054 IP\u3001Web \u8bbf\u95ee\u65e5\u5fd7\u91cc\u51fa\u73b0\u4e00\u4e32\u770b\u4e0d\u61c2\u7684 Base64\u3001\u6216\u8005\u8fd0\u7ef4\u540c\u5b66\u53d1\u73b0\u67d0\u4e2a\u4ece\u672a\u521b\u5efa\u8fc7\u7684\u7528\u6237\u80fd SSH \u767b\u5f55\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025004844-6add51ecca8ee.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u9762\u5bf9\u8fd9\u4e9b\u4fe1\u53f7&#xff0c;\u614c\u4e71\u5730\u91cd\u88c5\u7cfb\u7edf\u6216\u76f2\u76ee\u6740\u8fdb\u7a0b&#xff0c;\u5e38\u5e38\u4f1a\u6bc1\u6389\u5173\u952e\u8bc1\u636e\u94fe&#xff0c;\u4e5f\u5f88\u96be\u56de\u7b54\u4e09\u4e2a\u5173\u952e\u95ee\u9898\u2014\u2014\u8c01\u8fdb\u6765\u4e86\u3001\u505a\u4e86\u4ec0\u4e48\u3001\u8fd8\u7559\u4e0b\u4e86\u4ec0\u4e48\u3002\u672c\u6587\u4ece Linux \u5e94\u6025\u54cd\u5e94\u7684\u6807\u51c6\u6d41\u7a0b\u51fa\u53d1&#xff0c;\u628a\u300c\u65e5\u5fd7\u5206\u6790 \u2192 \u7ebf\u7d22\u6536\u655b \u2192 \u653b\u51fb\u6eaf\u6e90 \u2192 \u5904\u7f6e\u52a0\u56fa\u300d\u4e32\u6210\u4e00\u6761\u53ef\u843d\u5730\u7684\u5b9e\u6218\u8def\u5f84&#xff0c;\u9002\u5408\u6709\u4e00\u5b9a\u8fd0\u7ef4\u4e0e\u5b89\u5168\u57fa\u7840\u7684\u540c\u5b66\u76f4\u63a5\u5957\u7528\u3002<\/p>\n<h3>\u4e00\u3001\u5f15\u8a00&#xff1a;\u88ab\u653b\u51fb\u4e4b\u540e&#xff0c;\u771f\u6b63\u96be\u7684\u4e0d\u662f\u201c\u6740\u6bd2\u201d<\/h3>\n<p>\u5f88\u591a\u56e2\u961f\u628a\u5e94\u6025\u54cd\u5e94\u7b49\u540c\u4e8e\u201c\u67e5\u6740\u6728\u9a6c\u201d\u3002\u73b0\u5b9e\u4e2d\u66f4\u5e38\u89c1\u7684\u60c5\u51b5\u662f&#xff1a;<\/p>\n<ul>\n<li>\u5165\u4fb5\u901a\u9053\u5e76\u4e0d\u53ea\u6709 Web \u6f0f\u6d1e&#xff0c;\u8fd8\u6709\u5f31\u53e3\u4ee4\u3001\u4f9b\u5e94\u94fe\u3001\u88ab\u76d7\u7528\u7684 CI Token\u3001\u751a\u81f3\u5408\u6cd5\u8d26\u53f7\u7684\u6743\u9650\u6ee5\u7528&#xff1b;<\/li>\n<li>\u653b\u51fb\u8005\u4f1a\u6e05\u7406\u90e8\u5206\u65e5\u5fd7\u3001\u4f2a\u9020\u65f6\u95f4\u6233\u3001\u7528\u5e38\u9a7b\u624b\u6bb5&#xff08;cron\u3001systemd\u3001LD_PRELOAD\u3001\u5185\u6838\u6a21\u5757&#xff09;\u505a\u6301\u4e45\u5316&#xff1b;<\/li>\n<li>\u4e1a\u52a1\u8fde\u7eed\u6027\u8981\u6c42\u4f60\u5728\u6709\u9650\u7a97\u53e3\u5185\u5b8c\u6210\u9694\u79bb\u4e0e\u53d6\u8bc1&#xff0c;\u800c\u4e0d\u662f\u65e0\u9650\u671f\u201c\u7ee7\u7eed\u89c2\u5bdf\u201d\u3002<\/li>\n<\/ul>\n<p>\u56e0\u6b64&#xff0c;Linux \u5e94\u6025\u54cd\u5e94\u7684\u6838\u5fc3\u4e0d\u662f\u67d0\u4e2a\u795e\u5668&#xff0c;\u800c\u662f\u53ef\u590d\u73b0\u7684\u8bc1\u636e\u94fe&#xff1a;\u5148\u51bb\u7ed3\u73b0\u573a\u3001\u518d\u5206\u5c42\u6392\u67e5\u3001\u6700\u540e\u7528\u65e5\u5fd7\u4e0e\u843d\u76d8\u75d5\u8ff9\u628a\u653b\u51fb\u8def\u5f84\u8fd8\u539f\u51fa\u6765\u3002\u4e0b\u9762\u6309\u201c\u539f\u5219 \u2192 \u65b9\u6cd5 \u2192 \u6848\u4f8b \u2192 \u8e29\u5751\u201d\u5c55\u5f00\u3002<\/p>\n<h4>\u4e3a\u4ec0\u4e48\u6740\u6bd2\u5f80\u5f80\u4e0d\u662f\u7ec8\u70b9<\/h4>\n<p>\u653b\u51fb\u8005\u5e38\u5229\u7528\u5408\u6cd5\u670d\u52a1\u5982 Nginx\u3001Apache \u6216\u6570\u636e\u5e93\u6765\u6267\u884c\u6076\u610f\u4ee3\u7801&#xff0c;\u4f8b\u5982\u901a\u8fc7 SQL \u6ce8\u5165\u6216\u672a\u6388\u6743\u8bbf\u95ee\u4e0a\u4f20 webshell\u3002\u8fd9\u79cd webshell \u901a\u5e38\u4e0d\u4f1a\u4ee5\u4f20\u7edf\u6728\u9a6c\u5f62\u5f0f\u5b58\u5728&#xff0c;\u800c\u662f\u4f2a\u88c5\u6210\u5408\u6cd5\u6587\u4ef6\u6216\u8fdb\u7a0b&#xff0c;\u5728\u7cfb\u7edf\u91cd\u542f\u540e\u901a\u8fc7 cron\u3001systemd \u670d\u52a1\u6216\u73af\u5883\u53d8\u91cf LD_PRELOAD \u6301\u4e45\u5316\u3002\u4ec5\u4ec5\u505c\u6b62\u8fdb\u7a0b\u6216\u6740\u6bd2&#xff0c;\u5f80\u5f80\u65e0\u6cd5\u6e05\u9664\u9690\u85cf\u5728\u5185\u6838\u6a21\u5757\u6216\u6587\u4ef6\u7cfb\u7edf\u9690\u85cf\u76ee\u5f55\u4e2d\u7684\u653b\u51fb\u8005\u4ee3\u7801\u3002\u771f\u6b63\u7684\u6311\u6218\u5728\u4e8e\u91cd\u5efa\u53ef\u4fe1\u73af\u5883\u5e76\u9632\u6b62\u653b\u51fb\u8005\u518d\u6b21\u5165\u4fb5&#xff0c;\u540c\u65f6\u6ee1\u8db3\u4e1a\u52a1\u8fde\u7eed\u6027\u8981\u6c42\u3002\u5e94\u6025\u54cd\u5e94\u4e0d\u4ec5\u6d89\u53ca\u6280\u672f\u64cd\u4f5c&#xff0c;\u66f4\u9700\u8981\u56e2\u961f\u534f\u4f5c\u6765\u5feb\u901f\u6062\u590d\u4e1a\u52a1\u5e76\u56fa\u5316\u9632\u5fa1\u3002<\/p>\n<h4>\u5e94\u6025\u54cd\u5e94\u7684\u6838\u5fc3\u4ef7\u503c<\/h4>\n<p>\u5728\u5e94\u6025\u54cd\u5e94\u4e2d&#xff0c;\u91cd\u70b9\u5728\u4e8e\u8bc1\u636e\u91c7\u96c6\u4e0e\u8fd8\u539f\u3002\u9996\u5148\u8981\u7406\u89e3\u653b\u51fb\u8005\u7684\u653b\u51fb\u8def\u5f84&#xff1a;\u4ece\u5165\u4fb5\u5165\u53e3\u5230\u6743\u9650\u63d0\u5347\u3001\u6301\u4e45\u5316\u673a\u5236&#xff0c;\u518d\u5230\u6a2a\u5411\u4f20\u64ad\u6216\u6570\u636e\u6cc4\u9732\u3002\u9057\u6f0f\u4efb\u4f55\u4e00\u6b65&#xff0c;\u90fd\u53ef\u80fd\u5bfc\u81f4\u4e8c\u6b21\u653b\u51fb\u6216\u6570\u636e\u4e22\u5931\u3002\u4e3e\u4f8b\u6765\u8bf4&#xff0c;\u67d0\u94f6\u884c\u7cfb\u7edf\u5728\u4e00\u6b21\u5165\u4fb5\u540e&#xff0c;\u653b\u51fb\u8005\u5229\u7528\u4e91\u5b58\u50a8\u670d\u52a1\u5916\u4f20\u654f\u611f\u6570\u636e\u3002\u4ec5\u51ed\u6740\u6bd2\u65e0\u6cd5\u6062\u590d\u88ab\u7be1\u6539\u7684\u5ba1\u8ba1\u65e5\u5fd7&#xff0c;\u5bfc\u81f4\u4e8b\u540e\u65e0\u6cd5\u8ffd\u8d23\u3002Linux \u5e94\u6025\u54cd\u5e94\u5f3a\u8c03\u6700\u5c0f\u5e72\u6270\u539f\u5219&#xff1a;\u5728\u4fdd\u8bc1\u4e1a\u52a1\u4e0d\u4e2d\u65ad\u7684\u524d\u63d0\u4e0b&#xff0c;\u6700\u5927\u7a0b\u5ea6\u4fdd\u7559\u8bc1\u636e\u3002<\/p>\n<h3>\u4e8c\u3001\u6838\u5fc3\u539f\u5219&#xff1a;\u5148\u4fdd\u5168&#xff0c;\u518d\u5206\u6790&#xff0c;\u6700\u540e\u5904\u7f6e<\/h3>\n<h4>2.1 \u54cd\u5e94\u4f18\u5148\u7ea7&#xff1a;\u9694\u79bb &gt; \u53d6\u8bc1 &gt; \u6839\u56e0 &gt; \u6062\u590d<\/h4>\n<li>\n<p>\u9694\u79bb&#xff08;Containment&#xff09;<br \/>\n\u80fd\u65ad\u5916\u8054\u5c31\u65ad\u5916\u8054&#xff08;\u9632\u706b\u5899\u3001\u5b89\u5168\u7ec4\u3001\u4e34\u65f6 null route&#xff09;&#xff0c;\u5fc5\u8981\u65f6\u4ece\u8d1f\u8f7d\u5747\u8861\u6458\u9664\u8282\u70b9\u3002\u76ee\u6807\u662f\u963b\u6b62\u6a2a\u5411\u79fb\u52a8\u4e0e\u6570\u636e\u5916\u4f20&#xff0c;\u800c\u4e0d\u662f\u7acb\u523b\u683c\u5f0f\u5316\u3002<br \/>\n\u5b9e\u6218\u63d0\u793a&#xff1a;\u4f7f\u7528 iptables \u6216\u4e91\u5382\u5546\u63a7\u5236\u53f0\u6267\u884c\u89c4\u5219\u65f6&#xff0c;\u4f18\u5148\u4fdd\u7559\u5df2\u6709\u5141\u8bb8\u89c4\u5219&#xff0c;\u907f\u514d\u56e0\u89c4\u5219\u51b2\u7a81\u5bfc\u81f4\u65b0\u6f0f\u6d1e\u3002\u4f8b\u5982&#xff0c;\u9488\u5bf9\u53ef\u7591 IP \u6267\u884c iptables -I INPUT -s 203.0.113.88 -j DROP&#xff0c;\u4f46\u9700\u5148\u5907\u4efd\u89c4\u5219\u4ee5\u4fbf\u56de\u6eda\u3002<\/p>\n<\/li>\n<li>\n<p>\u53d6\u8bc1&#xff08;Evidence Preservation&#xff09;<br \/>\n\u4f18\u5148\u91c7\u96c6\u6613\u5931\u6027\u6570\u636e&#xff1a;\u8fdb\u7a0b\u6811\u3001\u7f51\u7edc\u8fde\u63a5\u3001\u767b\u5f55\u4f1a\u8bdd\u3001\u6302\u8f7d\u70b9\u3001\u5b9a\u65f6\u4efb\u52a1\u3001\u8fd1\u671f\u6587\u4ef6\u53d8\u66f4\u3002\u78c1\u76d8\u955c\u50cf\u6216\u5173\u952e\u76ee\u5f55\u6253\u5305\u6b21\u4e4b\u3002<br \/>\n\u539f\u7406\u7ec6\u8282&#xff1a;\u6613\u5931\u6027\u6570\u636e\u5982 \/proc \u76ee\u5f55\u4e0b\u7684\u8fdb\u7a0b\u4fe1\u606f\u5728\u7cfb\u7edf\u91cd\u542f\u540e\u4e0d\u53ef\u6062\u590d&#xff0c;\u56e0\u6b64\u5fc5\u987b\u7acb\u5373\u91c7\u96c6\u3002\u4f7f\u7528 volatility \u6846\u67b6\u53ef\u8fdb\u4e00\u6b65\u63d0\u53d6\u5185\u5b58\u4e2d\u7684\u8fdb\u7a0b\u548c\u7f51\u7edc\u4e0a\u4e0b\u6587\u3002<\/p>\n<\/li>\n<li>\n<p>\u6839\u56e0&#xff08;Root Cause&#xff09;<br \/>\n\u7528\u65e5\u5fd7\u4e0e\u843d\u76d8\u75d5\u8ff9\u56de\u7b54&#xff1a;\u5165\u53e3\u70b9\u3001\u5229\u7528\u65b9\u5f0f\u3001\u6743\u9650\u63d0\u5347\u8def\u5f84\u3001\u6301\u4e45\u5316\u70b9\u3001C2 \u6216\u6570\u636e\u6d41\u5411\u3002<br \/>\n\u5e38\u89c1\u95ee\u9898 FAQ&#xff1a;Q&#xff1a;\u5982\u4f55\u786e\u8ba4\u6743\u9650\u63d0\u5347\u8def\u5f84&#xff1f;A&#xff1a;\u7ed3\u5408 sudo \u65e5\u5fd7\u3001su \u547d\u4ee4\u8bb0\u5f55\u548c\u6587\u4ef6\u6743\u9650\u53d8\u66f4\u68c0\u67e5\u3002<\/p>\n<\/li>\n<li>\n<p>\u6062\u590d&#xff08;Eradication &amp; Recovery&#xff09;<br \/>\n\u6e05\u540e\u95e8\u3001\u8f6e\u6362\u51ed\u8bc1\u3001\u8865\u6f0f\u6d1e\u3001\u91cd\u5efa\u53ef\u4fe1\u955c\u50cf&#xff0c;\u5e76\u9a8c\u8bc1\u76d1\u63a7\u8986\u76d6\u662f\u5426\u8db3\u591f\u53d1\u73b0\u540c\u7c7b\u4e8b\u4ef6\u3002<\/p>\n<\/li>\n<h4>2.2 \u8bc1\u636e\u5206\u5c42\u6a21\u578b<\/h4>\n<p>\u628a Linux \u4e3b\u673a\u8bc1\u636e\u5206\u6210\u56db\u5c42&#xff0c;\u6392\u67e5\u65f6\u81ea\u4e0a\u800c\u4e0b\u3001\u4ea4\u53c9\u9a8c\u8bc1&#xff1a;<\/p>\n<table>\n<tr>\u5c42\u7ea7\u5178\u578b\u6765\u6e90\u89e3\u51b3\u7684\u95ee\u9898\u6269\u5c55\u793a\u4f8b<\/tr>\n<tbody>\n<tr>\n<td>\u4f1a\u8bdd\u4e0e\u8eab\u4efd<\/td>\n<td>w\/who\u3001last\/lastb\u3001auth \u65e5\u5fd7\u3001sudo \u65e5\u5fd7<\/td>\n<td>\u8c01\u5728\u4ec0\u4e48\u65f6\u95f4\u4ee5\u4f55\u79cd\u65b9\u5f0f\u767b\u5f55<\/td>\n<td>\u68c0\u67e5 ~\/.ssh\/authorized_keys \u7684\u4fee\u6539\u65f6\u95f4\u548c\u5185\u5bb9&#xff0c;\u786e\u4fdd\u53ea\u6709\u53d7\u4fe1\u4efb\u7528\u6237\u624d\u80fd\u767b\u5f55<\/td>\n<\/tr>\n<tr>\n<td>\u8fdb\u7a0b\u4e0e\u7f51\u7edc<\/td>\n<td>ps\u3001\/proc\u3001ss\/netstat\u3001conntrack<\/td>\n<td>\u5f53\u524d\u5728\u8dd1\u4ec0\u4e48\u3001\u8fde\u5411\u54ea\u91cc<\/td>\n<td>\u4f7f\u7528 netstat -tulpn \u67e5\u770b\u6240\u6709 TCP\/UDP \u76d1\u542c\u7aef\u53e3&#xff0c;\u5e76\u4e0e ss -tunap \u5bf9\u6bd4&#xff0c;\u786e\u8ba4\u662f\u5426\u5b58\u5728\u53cd\u5f39 shell<\/td>\n<\/tr>\n<tr>\n<td>\u6301\u4e45\u5316<\/td>\n<td>cron\u3001systemd\u3001rc \u811a\u672c\u3001\u7528\u6237\u76ee\u5f55\u3001LD_*<\/td>\n<td>\u91cd\u542f\u540e\u662f\u5426\u8fd8\u4f1a\u56de\u6765<\/td>\n<td>\u68c0\u67e5 \/etc\/crontab\u3001\/var\/spool\/cron\/ \u548c \/etc\/systemd\/system\/&#xff0c;\u540c\u65f6\u626b\u63cf LD_PRELOAD \u73af\u5883\u53d8\u91cf\u6307\u5411\u7684\u5171\u4eab\u5e93<\/td>\n<\/tr>\n<tr>\n<td>\u5e94\u7528\u4e0e\u4e1a\u52a1\u65e5\u5fd7<\/td>\n<td>Nginx\/Apache\u3001\u5e94\u7528 access\/error\u3001\u6570\u636e\u5e93\u5ba1\u8ba1<\/td>\n<td>Web\/\u4e1a\u52a1\u5165\u53e3\u5982\u4f55\u88ab\u5229\u7528<\/td>\n<td>\u5206\u6790\u6570\u636e\u5e93\u67e5\u8be2\u65e5\u5fd7&#xff0c;\u8bc6\u522b\u662f\u5426\u56e0\u6ce8\u5165\u653b\u51fb\u5bfc\u81f4\u6570\u636e\u5916\u6cc4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u539f\u7406\u7ec6\u8282&#xff1a;\u8bc1\u636e\u5206\u5c42\u6a21\u578b\u6e90\u4e8e\u4fe1\u606f\u5b89\u5168\u9886\u57df\u7684\u201c\u91d1\u5b57\u5854\u539f\u5219\u201d&#xff0c;\u786e\u4fdd\u591a\u7ef4\u5ea6\u9a8c\u8bc1\u4ee5\u51cf\u5c11\u8bef\u5224\u3002\u5355\u4e00\u65e5\u5fd7\u4e0d\u53ef\u4fe1&#xff0c;\u4ea4\u53c9\u4e00\u81f4\u624d\u53ef\u4fe1\u3002auth \u8bf4\u767b\u5f55\u6210\u529f&#xff0c;access \u8bf4\u540c\u4e00\u65f6\u95f4\u6709\u5f02\u5e38 URI&#xff0c;\u8fdb\u7a0b\u5217\u8868\u91cc\u53c8\u51fa\u73b0\u53cd\u5f39\u7279\u5f81\u2014\u2014\u4e09\u6761\u7ebf\u5bf9\u9f50&#xff0c;\u624d\u7b97\u4e00\u6761\u786c\u7ebf\u7d22\u3002\u5efa\u8bae\u4f7f\u7528 jq \u5904\u7406\u7ed3\u6784\u5316\u6570\u636e\u6216 Python \u811a\u672c\u8fdb\u884c\u6279\u91cf\u5bf9\u6bd4\u3002<\/p>\n<h4>2.3 \u65f6\u95f4\u7ebf\u662f\u6eaf\u6e90\u7684\u9aa8\u67b6<\/h4>\n<p>\u6240\u6709\u65e5\u5fd7\u6700\u7ec8\u90fd\u8981\u843d\u5230\u7edf\u4e00\u65f6\u95f4\u8f74\u4e0a&#xff08;\u5efa\u8bae\u7edf\u4e00\u7528 UTC \u6216\u660e\u786e\u6807\u6ce8\u65f6\u533a&#xff09;\u3002\u653b\u51fb\u94fe\u5e38\u89c1\u5f62\u6001\u662f&#xff1a;<\/p>\n<p>\u4fa6\u5bdf\/\u626b\u63cf \u2192 \u6f0f\u6d1e\u5229\u7528\u6216\u51ed\u8bc1\u6ee5\u7528 \u2192 \u843d\u5730&#xff08;webshell\/\u4e8c\u8fdb\u5236&#xff09;<br \/>\n\u2192 \u6743\u9650\u63d0\u5347 \u2192 \u6301\u4e45\u5316 \u2192 \u5185\u7f51\u63a2\u6d4b\/\u6a2a\u5411 \u2192 \u6570\u636e\u5916\u4f20\u6216\u6316\u77ff<\/p>\n<p>\u5e94\u6025\u65f6\u4e0d\u5fc5\u4e00\u6b21\u8bc1\u660e\u6574\u6761\u94fe&#xff0c;\u4f46\u6bcf\u786e\u8ba4\u4e00\u73af&#xff0c;\u5c31\u8981\u628a\u65f6\u95f4\u3001\u4e3b\u4f53&#xff08;\u7528\u6237\/\u8fdb\u7a0b\/IP&#xff09;\u3001\u5ba2\u4f53&#xff08;\u6587\u4ef6\/\u7aef\u53e3\/\u8d26\u53f7&#xff09;\u548c\u8bc1\u636e\u6587\u4ef6\u540d\u8bb0\u4e0b\u6765&#xff0c;\u907f\u514d\u4e8b\u540e\u9760\u8bb0\u5fc6\u62fc\u63a5\u3002\u6784\u5efa\u65f6\u95f4\u7ebf\u7684\u6b65\u9aa4&#xff1a;1. \u6536\u96c6\u6240\u6709\u76f8\u5173\u65e5\u5fd7&#xff1b;2. \u89e3\u6790\u65f6\u95f4\u6233\u5e76\u7edf\u4e00\u683c\u5f0f&#xff1b;3. \u4ea4\u53c9\u5339\u914d\u4e8b\u4ef6&#xff1b;4. \u6dfb\u52a0\u6765\u6e90\u5f15\u7528\u3002\u4f7f\u7528 Markdown \u8868\u683c\u6216 CSV \u683c\u5f0f\u8f93\u51fa&#xff0c;\u4fbf\u4e8e\u540e\u7eed\u53ef\u89c6\u5316\u5206\u6790\u3002\u65f6\u95f4\u7ebf\u4e0d\u4ec5\u662f\u6eaf\u6e90\u5de5\u5177&#xff0c;\u4e5f\u662f\u4e8b\u540e\u5ba1\u8ba1\u7684\u57fa\u7840&#xff0c;\u80fd\u5e2e\u52a9\u56e2\u961f\u7406\u89e3\u653b\u51fb\u5168\u8c8c\u5e76\u5236\u5b9a\u9632\u5fa1\u7b56\u7565\u3002<\/p>\n<h3>\u4e09\u3001\u5b9e\u6218\u51c6\u5907&#xff1a;\u6700\u5c0f\u53d6\u8bc1\u5de5\u5177\u7bb1<\/h3>\n<p>\u5728\u201c\u8fd8\u80fd\u767b\u5f55\u201d\u7684\u524d\u63d0\u4e0b&#xff0c;\u5efa\u8bae\u5148\u505a\u53ea\u8bfb\u91c7\u96c6&#xff0c;\u518d\u505a\u4fb5\u5165\u6027\u6392\u67e5\u3002\u4e0b\u9762\u662f\u4e00\u6bb5\u53ef\u76f4\u63a5\u5728\u5e94\u6025\u673a\u4e0a\u4f7f\u7528\u7684 Shell \u5feb\u7167\u811a\u672c&#xff08;\u793a\u610f&#xff0c;\u6309\u73af\u5883\u88c1\u526a&#xff09;\u3002\u5b83\u628a\u5173\u952e\u6613\u5931\u4fe1\u606f\u843d\u5230\u5e26\u65f6\u95f4\u6233\u7684\u76ee\u5f55&#xff0c;\u4fbf\u4e8e\u540e\u7eed\u79bb\u7ebf\u5206\u6790\u6216\u79fb\u4ea4\u3002<\/p>\n<p><span class=\"token shebang important\">#!\/usr\/bin\/env bash<\/span><br \/>\n<span class=\"token comment\"># ir_snapshot.sh \u2014 \u6700\u5c0f\u5316\u4e3b\u673a\u5feb\u7167&#xff08;\u53ea\u8bfb\u503e\u5411&#xff09;<\/span><br \/>\n<span class=\"token comment\"># \u6b64\u811a\u672c\u57fa\u4e8e GNU\/Linux \u6807\u51c6\u5de5\u5177&#xff0c;\u4ec5\u4f7f\u7528\u53ea\u8bfb\u547d\u4ee4\u4ee5\u6700\u5927\u5316\u8bc1\u636e\u4fdd\u7559<\/span><br \/>\n<span class=\"token builtin class-name\">set<\/span> <span class=\"token parameter variable\">-euo<\/span> pipefail<br \/>\n<span class=\"token assign-left variable\">TS<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token variable\"><span class=\"token variable\">$(<\/span><span class=\"token function\">date<\/span> <span class=\"token parameter variable\">-u<\/span> &#043;%Y%m%dT%H%M%SZ<span class=\"token variable\">)<\/span><\/span><br \/>\n<span class=\"token assign-left variable\">OUT<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;\/root\/ir_<span class=\"token variable\">${TS}<\/span>&#034;<\/span><br \/>\n<span class=\"token function\">mkdir<\/span> <span class=\"token parameter variable\">-p<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>&#034;<\/span>\/<span class=\"token punctuation\">{<\/span>proc,net,auth,persist,files<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token function\">date<\/span> <span class=\"token parameter variable\">-u<\/span><br \/>\n  <span class=\"token function\">uname<\/span> <span class=\"token parameter variable\">-a<\/span><br \/>\n  <span class=\"token function\">uptime<\/span><br \/>\n  <span class=\"token function\">cat<\/span> \/etc\/os-release <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null <span class=\"token operator\">||<\/span> <span class=\"token boolean\">true<\/span><br \/>\n  <span class=\"token comment\"># \u6dfb\u52a0\u7cfb\u7edf\u4e0a\u4e0b\u6587\u4fe1\u606f&#xff0c;\u5e2e\u52a9\u540e\u7eed\u5206\u6790<\/span><br \/>\n<span class=\"token punctuation\">}<\/span> <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/meta.txt&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u4f1a\u8bdd\u4e0e\u767b\u5f55<\/span><br \/>\nw <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/auth\/w.txt&#034;<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span><span class=\"token file-descriptor important\">&amp;1<\/span> <span class=\"token operator\">||<\/span> <span class=\"token boolean\">true<\/span><br \/>\nlast <span class=\"token parameter variable\">-a<\/span> <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/auth\/last.txt&#034;<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span><span class=\"token file-descriptor important\">&amp;1<\/span> <span class=\"token operator\">||<\/span> <span class=\"token boolean\">true<\/span><br \/>\nlastb <span class=\"token parameter variable\">-a<\/span> <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/auth\/lastb.txt&#034;<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span><span class=\"token file-descriptor important\">&amp;1<\/span> <span class=\"token operator\">||<\/span> <span class=\"token boolean\">true<\/span><br \/>\n<span class=\"token function\">cp<\/span> <span class=\"token parameter variable\">-a<\/span> \/var\/log\/auth.log* \/var\/log\/secure* <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/auth\/&#034;<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null <span class=\"token operator\">||<\/span> <span class=\"token boolean\">true<\/span><br \/>\n<span class=\"token comment\"># \u989d\u5916&#xff1a;\u68c0\u67e5 lastlog \u4ee5\u4e86\u89e3\u6700\u8fd1\u7684\u6210\u529f\u767b\u5f55<\/span><br \/>\nlastlog <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/auth\/lastlog.txt&#034;<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span><span class=\"token file-descriptor important\">&amp;1<\/span> <span class=\"token operator\">||<\/span> <span class=\"token boolean\">true<\/span><\/p>\n<p><span class=\"token comment\"># \u8fdb\u7a0b\u4e0e\u7f51\u7edc<\/span><br \/>\n<span class=\"token function\">ps<\/span> auxwwf <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/proc\/ps_auxwwf.txt&#034;<\/span><br \/>\nss <span class=\"token parameter variable\">-tunap<\/span> <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/net\/ss_tunap.txt&#034;<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span><span class=\"token file-descriptor important\">&amp;1<\/span> <span class=\"token operator\">||<\/span> <span class=\"token function\">netstat<\/span> <span class=\"token parameter variable\">-tunap<\/span> <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/net\/netstat.txt&#034;<\/span><br \/>\n<span class=\"token function\">ip<\/span> a <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/net\/ip_a.txt&#034;<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token function\">ip<\/span> r <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/net\/ip_r.txt&#034;<\/span><br \/>\n<span class=\"token comment\"># \u6269\u5c55&#xff1a;\u68c0\u67e5\u5185\u6838\u6a21\u5757\u548c\u52a0\u8f7d\u4fe1\u606f<\/span><br \/>\nlsmod <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/proc\/lsmod.txt&#034;<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null <span class=\"token operator\">||<\/span> <span class=\"token boolean\">true<\/span><br \/>\n<span class=\"token comment\"># \u68c0\u67e5 open files \u4ee5\u53d1\u73b0\u6ce8\u5165\u8fdb\u7a0b<\/span><br \/>\n<span class=\"token function\">lsof<\/span> <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/proc\/lsof.txt&#034;<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null <span class=\"token operator\">||<\/span> <span class=\"token boolean\">true<\/span><\/p>\n<p><span class=\"token comment\"># \u6301\u4e45\u5316\u5e38\u89c1\u4f4d\u7f6e<\/span><br \/>\n<span class=\"token function\">crontab<\/span> <span class=\"token parameter variable\">-l<\/span> <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/persist\/root_cron.txt&#034;<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span><span class=\"token file-descriptor important\">&amp;1<\/span> <span class=\"token operator\">||<\/span> <span class=\"token boolean\">true<\/span><br \/>\n<span class=\"token function\">ls<\/span> <span class=\"token parameter variable\">-la<\/span> \/etc\/cron.* \/var\/spool\/cron <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/persist\/cron_dirs.txt&#034;<\/span> <span class=\"token operator\">||<\/span> <span class=\"token boolean\">true<\/span><br \/>\nsystemctl list-units <span class=\"token parameter variable\">&#8211;type<\/span><span class=\"token operator\">&#061;<\/span>service <span class=\"token parameter variable\">&#8211;all<\/span> <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/persist\/systemd_units.txt&#034;<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span><span class=\"token file-descriptor important\">&amp;1<\/span> <span class=\"token operator\">||<\/span> <span class=\"token boolean\">true<\/span><br \/>\n<span class=\"token function\">ls<\/span> <span class=\"token parameter variable\">-la<\/span> \/etc\/systemd\/system \/lib\/systemd\/system <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/persist\/systemd_dirs.txt&#034;<\/span> <span class=\"token operator\">||<\/span> <span class=\"token boolean\">true<\/span><br \/>\n<span class=\"token comment\"># \u989d\u5916&#xff1a;\u68c0\u67e5 LD_PRELOAD \u76f8\u5173\u73af\u5883<\/span><br \/>\n<span class=\"token function\">env<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-E<\/span> <span class=\"token string\">&#039;LD_|PATH&#039;<\/span> <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/persist\/env.txt&#034;<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null <span class=\"token operator\">||<\/span> <span class=\"token boolean\">true<\/span><\/p>\n<p><span class=\"token comment\"># \u6700\u8fd1\u53d8\u66f4\u7684\u53ef\u6267\u884c\u6587\u4ef6\u4e0e tmp&#xff08;\u793a\u610f&#xff0c;\u751f\u4ea7\u53ef\u52a0 ionice\/timeout&#xff09;<\/span><br \/>\n<span class=\"token function\">find<\/span> \/tmp \/var\/tmp \/dev\/shm <span class=\"token parameter variable\">-type<\/span> f <span class=\"token parameter variable\">-mtime<\/span> <span class=\"token parameter variable\">-7<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null <span class=\"token operator\">|<\/span> <span class=\"token function\">head<\/span> <span class=\"token parameter variable\">-n<\/span> <span class=\"token number\">500<\/span> <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/files\/tmp_recent.txt&#034;<\/span><br \/>\n<span class=\"token function\">find<\/span> \/usr\/bin \/usr\/sbin \/bin \/sbin <span class=\"token parameter variable\">-type<\/span> f <span class=\"token parameter variable\">-mtime<\/span> <span class=\"token parameter variable\">-3<\/span> <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/files\/bin_recent.txt&#034;<\/span> <span class=\"token operator\">||<\/span> <span class=\"token boolean\">true<\/span><br \/>\n<span class=\"token comment\"># \u989d\u5916&#xff1a;\u68c0\u67e5\u6700\u8fd1\u4fee\u6539\u7684\u5185\u6838\u53c2\u6570\u548c\u7cfb\u7edf\u914d\u7f6e<\/span><br \/>\n<span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-rE<\/span> <span class=\"token string\">&#034;kernel|sysctl&#034;<\/span> \/etc\/ <span class=\"token operator\"><span class=\"token file-descriptor important\">2<\/span>&gt;<\/span>\/dev\/null <span class=\"token operator\">|<\/span> <span class=\"token function\">head<\/span> <span class=\"token parameter variable\">-n<\/span> <span class=\"token number\">20<\/span> <span class=\"token operator\">&gt;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>\/files\/kernel_configs.txt&#034;<\/span> <span class=\"token operator\">||<\/span> <span class=\"token boolean\">true<\/span><\/p>\n<p><span class=\"token function\">tar<\/span> <span class=\"token parameter variable\">-C<\/span> <span class=\"token string\">&#034;<span class=\"token variable\"><span class=\"token variable\">$(<\/span><span class=\"token function\">dirname<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>&#034;<\/span><span class=\"token variable\">)<\/span><\/span>&#034;<\/span> <span class=\"token parameter variable\">-czf<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">${OUT}<\/span>.tar.gz&#034;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\"><span class=\"token variable\">$(<\/span><span class=\"token function\">basename<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$OUT<\/span>&#034;<\/span><span class=\"token variable\">)<\/span><\/span>&#034;<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;Snapshot ready: <span class=\"token variable\">${OUT}<\/span>.tar.gz&#034;<\/span><\/p>\n<p>\u8bf4\u660e&#xff1a;<\/p>\n<ul>\n<li>\u5148\u62f7\u8d1d\u518d\u5206\u6790&#xff0c;\u907f\u514d\u8fb9\u67e5\u8fb9\u6539\u628a atime\/\u65e5\u5fd7\u8f6e\u8f6c\u641e\u4e71&#xff1b;<\/li>\n<li>ss -tunap \/ ps auxwwf \u662f\u8fdb\u7a0b-\u7f51\u7edc\u5173\u8054\u7684\u57fa\u7840&#xff1b;<\/li>\n<li>find \u8fd1\u671f\u4e8c\u8fdb\u5236\u53d8\u66f4&#xff0c;\u5bf9\u6316\u77ff\u3001\u66ff\u6362\u7cfb\u7edf\u547d\u4ee4\u7c7b\u5165\u4fb5\u975e\u5e38\u6709\u6548&#xff1b;<\/li>\n<li>\u4ea7\u51fa\u6253\u5305\u540e\u5e94\u5c3d\u5feb\u62f7\u5230\u53ef\u4fe1\u5206\u6790\u673a&#xff0c;\u4e0d\u8981\u53ea\u5728\u672c\u673a\u201c\u968f\u624b\u770b\u201d\u3002<\/li>\n<li>\u989d\u5916\u63d0\u793a&#xff1a;\u5bf9\u4e8e\u5bb9\u5668\u5316\u73af\u5883&#xff0c;\u4f18\u5148\u4f7f\u7528 docker ps \u548c\u5bb9\u5668\u65e5\u5fd7\u91c7\u96c6\u3002\u5bf9\u4e8e\u4e91\u4e3b\u673a&#xff0c;\u7ed3\u5408\u4e91\u5382\u5546\u5feb\u7167\u529f\u80fd&#xff08;\u5982 AWS EBS \u5feb\u7167&#xff09;\u8fdb\u884c\u66f4\u5168\u9762\u7684\u53d6\u8bc1\u3002<\/li>\n<li>\u4f18\u5316\u5efa\u8bae&#xff1a;\u53ef\u5c06\u811a\u672c\u5c01\u88c5\u4e3a\u51fd\u6570&#xff0c;\u4fbf\u4e8e\u6279\u91cf\u6267\u884c&#xff1b;\u6dfb\u52a0 sha256sum \u5bf9\u5feb\u7167\u6587\u4ef6\u8fdb\u884c\u54c8\u5e0c\u6821\u9a8c&#xff0c;\u786e\u4fdd\u5b8c\u6574\u6027\u3002<\/li>\n<\/ul>\n<p>\u82e5\u4e3b\u673a\u5df2\u660e\u663e\u5931\u9677&#xff0c;\u66f4\u7a33\u59a5\u7684\u505a\u6cd5\u662f&#xff1a;\u4e1a\u52a1\u4fa7\u6458\u6d41 \u2192 \u4e91\u5382\u5546\u505a\u78c1\u76d8\u5feb\u7167 \u2192 \u5728\u9694\u79bb VPC \u6302\u8f7d\u5206\u6790&#xff0c;\u907f\u514d\u653b\u51fb\u8005\u901a\u8fc7\u4ecd\u5b58\u6d3b\u7684\u53cd\u5f39 shell \u5e72\u6270\u4f60\u7684\u64cd\u4f5c\u3002<\/p>\n<h3>\u56db\u3001\u65e5\u5fd7\u5206\u6790&#xff1a;\u4ece\u201c\u5f02\u5e38\u4fe1\u53f7\u201d\u6536\u655b\u5230\u201c\u53ef\u7591\u4e3b\u4f53\u201d<\/h3>\n<h4>4.1 \u8ba4\u8bc1\u65e5\u5fd7&#xff1a;\u767b\u5f55\u4e0e\u63d0\u6743\u7684\u7b2c\u4e00\u73b0\u573a<\/h4>\n<p>Debian\/Ubuntu \u591a\u770b \/var\/log\/auth.log&#xff0c;RHEL\/CentOS \u591a\u770b \/var\/log\/secure\u3002\u5173\u6ce8&#xff1a;<\/p>\n<ul>\n<li>Failed password \/ Invalid user \u7684\u66b4\u589e&#xff08;\u649e\u5e93\u3001\u626b\u63cf&#xff09;&#xff1b;<\/li>\n<li>Accepted password \/ Accepted publickey \u7684\u6765\u6e90 IP\u3001\u65f6\u6bb5\u3001\u8d26\u53f7\u662f\u5426\u7b26\u5408\u57fa\u7ebf&#xff1b;<\/li>\n<li>sudo \/ su \u6210\u529f\u8bb0\u5f55&#xff0c;\u662f\u5426\u51fa\u73b0\u975e\u8fd0\u7ef4\u7a97\u53e3\u7684 root \u884c\u4e3a&#xff1b;<\/li>\n<li>\u65b0\u5efa\u7528\u6237\u3001\u6539 authorized_keys\u3001\u6539 \/etc\/passwd \u4e0e \/etc\/shadow \u7684\u5173\u8054\u4e8b\u4ef6\u3002<\/li>\n<\/ul>\n<p>\u5feb\u901f\u8fc7\u6ee4\u793a\u4f8b&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u7edf\u8ba1 SSH \u5931\u8d25\u6700\u591a\u7684\u6e90 IP&#xff08;auth.log \u4e3a\u4f8b&#xff09;<\/span><br \/>\n<span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-E<\/span> <span class=\"token string\">&#034;Failed password|Invalid user&#034;<\/span> \/var\/log\/auth.log <span class=\"token punctuation\">\\\\<\/span><br \/>\n  <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-oE<\/span> <span class=\"token string\">&#039;from [0-9.]&#043;&#039;<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">awk<\/span> <span class=\"token string\">&#039;{print $2}&#039;<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n  <span class=\"token operator\">|<\/span> <span class=\"token function\">sort<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">uniq<\/span> <span class=\"token parameter variable\">-c<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">sort<\/span> <span class=\"token parameter variable\">-nr<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">head<\/span><\/p>\n<p><span class=\"token comment\"># \u6210\u529f\u767b\u5f55\u4e0e\u516c\u94a5\u767b\u5f55<\/span><br \/>\n<span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-E<\/span> <span class=\"token string\">&#034;Accepted (password|publickey)&#034;<\/span> \/var\/log\/auth.log <span class=\"token operator\">|<\/span> <span class=\"token function\">tail<\/span> <span class=\"token parameter variable\">-n<\/span> <span class=\"token number\">50<\/span><br \/>\n<span class=\"token comment\"># \u6269\u5c55&#xff1a;\u68c0\u67e5 sudo \u6210\u529f\u8bb0\u5f55<\/span><br \/>\n<span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-E<\/span> <span class=\"token string\">&#034;sudo|COMMAND&#061;&#034;<\/span> \/var\/log\/auth.log <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-E<\/span> <span class=\"token string\">&#034;root|www-data&#034;<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">tail<\/span> <span class=\"token parameter variable\">-n<\/span> <span class=\"token number\">20<\/span><\/p>\n<p>\u82e5\u53d1\u73b0\u6210\u529f\u767b\u5f55 IP \u4e0d\u5728\u529e\u516c\u7f51\/\u5821\u5792\u673a\u51fa\u53e3\u5217\u8868&#xff0c;\u7acb\u5373\u628a\u8be5 IP \u4e0e\u8d26\u53f7\u6807\u4e3a\u9ad8\u4f18\u5148\u7ea7\u4e3b\u4f53&#xff0c;\u540e\u7eed\u6240\u6709\u8fdb\u7a0b\u3001\u6587\u4ef6\u3001cron \u6392\u67e5\u90fd\u56f4\u7ed5\u5b83\u5c55\u5f00\u3002\u539f\u7406\u7ec6\u8282&#xff1a;\u8ba4\u8bc1\u65e5\u5fd7\u8bb0\u5f55\u4e86\u6240\u6709\u8eab\u4efd\u9a8c\u8bc1\u4e8b\u4ef6&#xff0c;\u662f\u5165\u4fb5\u5165\u53e3\u7684\u6700\u76f4\u63a5\u8bc1\u636e\u3002\u5efa\u8bae\u7ed3\u5408 fail2ban \u65e5\u5fd7\u8fdb\u4e00\u6b65\u5206\u6790\u5f02\u5e38\u6a21\u5f0f\u3002<\/p>\n<h4>4.2 Web \u8bbf\u95ee\u65e5\u5fd7&#xff1a;\u5229\u7528\u94fe\u7684\u201c\u5165\u53e3\u8bc1\u660e\u201d<\/h4>\n<p>\u5bf9\u66b4\u9732\u5728\u516c\u7f51\u7684 Web \u670d\u52a1&#xff0c;access log \u5f80\u5f80\u6bd4\u4e3b\u673a\u65e5\u5fd7\u66f4\u65e9\u51fa\u73b0\u5f02\u5e38&#xff1a;<\/p>\n<ul>\n<li>\u7f55\u89c1 URI\u3001\u8def\u5f84\u7a7f\u8d8a\u3001\u5df2\u77e5\u7ec4\u4ef6\u7684\u653b\u51fb\u7279\u5f81&#xff08;\u9700\u7ed3\u5408 WAF\/\u89c4\u5219&#xff0c;\u4f46\u52ff\u53ea\u9760\u7279\u5f81&#xff09;&#xff1b;<\/li>\n<li>\u540c\u4e00 IP \u77ed\u65f6\u95f4\u5927\u91cf 404\/500&#xff0c;\u968f\u540e\u51fa\u73b0 200 \u7684\u53ef\u7591 POST&#xff1b;<\/li>\n<li>User-Agent \u5f02\u5e38\u3001\u65e0 UA\u3001\u6216\u4e0e\u4e1a\u52a1\u524d\u7aef\u5b8c\u5168\u4e0d\u7b26&#xff1b;<\/li>\n<li>\u4e0a\u4f20\u63a5\u53e3\u3001\u7ba1\u7406\u540e\u53f0\u3001\u8c03\u8bd5\u7aef\u70b9\u5728\u975e\u5de5\u4f5c\u65f6\u95f4\u88ab\u547d\u4e2d\u3002<\/li>\n<\/ul>\n<p>\u628a\u201c\u5f02\u5e38 IP &#043; \u65f6\u95f4\u7a97 &#043; \u72b6\u6001\u7801\u53d8\u5316\u201d\u4e09\u89d2\u5bf9\u9f50\u540e&#xff0c;\u518d\u53bb\u78c1\u76d8\u627e\u5bf9\u5e94\u65f6\u95f4\u843d\u4e0b\u7684 PHP\/JSP\/\u6587\u4ef6\u3001\u6216\u5e94\u7528\u53d1\u5e03\u76ee\u5f55\u7684 mtime \u5f02\u5e38\u3002\u5b9e\u6218\u6848\u4f8b&#xff1a;\u5728\u67d0\u7535\u5546\u5e73\u53f0&#xff0c;access.log \u663e\u793a\u5927\u91cf\u6765\u81ea\u4e2d\u56fd IP \u7684 POST \u8bf7\u6c42 \/api\/v1\/upload&#xff0c;\u4f34\u968f Base64 \u7f16\u7801\u7684 payload\u3002\u7ed3\u5408 error.log \u4e2d\u7684\u6808\u8ffd\u8e2a&#xff0c;\u53ef\u786e\u8ba4\u662f\u6a21\u677f\u6ce8\u5165\u653b\u51fb\u5bfc\u81f4 webshell \u4e0a\u4f20\u3002<\/p>\n<h4>4.3 \u7cfb\u7edf\u4e0e\u5185\u6838\u65e5\u5fd7&#xff1a;\u6301\u4e45\u5316\u4e0e\u5f02\u5e38\u9a71\u52a8<\/h4>\n<p>journalctl&#xff08;systemd \u73af\u5883&#xff09;\u9002\u5408\u62c9\u7edf\u4e00\u65f6\u95f4\u7a97&#xff1a;<\/p>\n<p>journalctl <span class=\"token parameter variable\">&#8211;since<\/span> <span class=\"token string\">&#034;2026-03-20 10:00:00&#034;<\/span> <span class=\"token parameter variable\">&#8211;until<\/span> <span class=\"token string\">&#034;2026-03-20 14:00:00&#034;<\/span> <span class=\"token operator\">&gt;<\/span> \/root\/ir_journal_slice.txt<\/p>\n<p>\u5173\u6ce8&#xff1a;\u7a81\u7136\u7684\u670d\u52a1\u91cd\u542f\u3001OOM\u3001segfault\u3001\u65b0\u8bbe\u5907\u3001firewall \u89c4\u5219\u53d8\u66f4\u3001\u65f6\u95f4\u8df3\u53d8&#xff08;\u653b\u51fb\u8005\u6216\u9519\u8bef NTP \u53ef\u80fd\u5bfc\u81f4\u65f6\u95f4\u7ebf\u9519\u4e71&#xff09;\u3002\u6269\u5c55&#xff1a;\u6dfb\u52a0 &#8211;output&#061;export \u4ee5\u83b7\u53d6\u7ed3\u6784\u5316\u6570\u636e&#xff0c;\u4fbf\u4e8e\u540e\u7eed\u89e3\u6790\u3002\u68c0\u67e5\u5185\u6838\u65e5\u5fd7 \/var\/log\/kern.log \u786e\u8ba4\u662f\u5426\u52a0\u8f7d\u4e86\u5f02\u5e38\u5185\u6838\u6a21\u5757\u3002<\/p>\n<h4>4.4 \u7528 Python \u505a\u8f7b\u91cf\u65f6\u95f4\u7ebf\u5f52\u5e76<\/h4>\n<p>\u5f53\u65e5\u5fd7\u6e90\u591a\u3001\u683c\u5f0f\u4e71\u65f6&#xff0c;\u53ef\u7528\u4e00\u5c0f\u6bb5 Python \u628a\u201c\u65f6\u95f4 &#043; \u6765\u6e90 &#043; \u6458\u8981\u201d\u62bd\u6210 CSV&#xff0c;\u4fbf\u4e8e\u5728\u8868\u683c\u91cc\u6392\u5e8f\u3001\u8fc7\u6ee4\u3002\u4ee5\u4e0b\u793a\u4f8b\u6f14\u793a\u5982\u4f55\u89e3\u6790\u5e38\u89c1 syslog \u884c\u5e76\u8f93\u51fa\u7ed3\u6784\u5316\u7ed3\u679c&#xff08;\u751f\u4ea7\u4e2d\u5e94\u66ff\u6362\u4e3a\u66f4\u5b8c\u6574\u7684\u89e3\u6790\u5668\u6216\u76f4\u63a5\u7528 ELK\/ClickHouse&#xff09;\u3002<\/p>\n<p><span class=\"token comment\">#!\/usr\/bin\/env python3<\/span><br \/>\n<span class=\"token triple-quoted-string string\">&#034;&#034;&#034;merge_ir_hints.py \u2014 \u4ece\u82e5\u5e72\u6587\u672c\u65e5\u5fd7\u4e2d\u62bd\u53d6\u7b80\u6613\u65f6\u95f4\u7ebf&#034;&#034;&#034;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> re<br \/>\n<span class=\"token keyword\">import<\/span> sys<br \/>\n<span class=\"token keyword\">from<\/span> datetime <span class=\"token keyword\">import<\/span> datetime<br \/>\n<span class=\"token keyword\">from<\/span> pathlib <span class=\"token keyword\">import<\/span> Path<\/p>\n<p><span class=\"token comment\"># \u793a\u4f8b&#xff1a;\u5904\u7406 &#034;Mar 20 11:22:01 host sshd[123]: Accepted publickey for op from 1.2.3.4&#034;<\/span><br \/>\nSYSLOG_RE <span class=\"token operator\">&#061;<\/span> re<span class=\"token punctuation\">.<\/span><span class=\"token builtin\">compile<\/span><span class=\"token punctuation\">(<\/span><br \/>\n    <span class=\"token string\">r&#034;^(?P&lt;mon&gt;\\\\w{3})\\\\s&#043;(?P&lt;day&gt;\\\\d{1,2})\\\\s&#043;(?P&lt;time&gt;\\\\d{2}:\\\\d{2}:\\\\d{2})\\\\s&#043;&#034;<\/span><br \/>\n    <span class=\"token string\">r&#034;(?P&lt;host&gt;\\\\S&#043;)\\\\s&#043;(?P&lt;proc&gt;[^:]&#043;):\\\\s&#043;(?P&lt;msg&gt;.*)$&#034;<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><br \/>\nMONTHS <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span>m<span class=\"token punctuation\">:<\/span> i <span class=\"token keyword\">for<\/span> i<span class=\"token punctuation\">,<\/span> m <span class=\"token keyword\">in<\/span> <span class=\"token builtin\">enumerate<\/span><span class=\"token punctuation\">(<\/span><br \/>\n    <span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;Jan&#034;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#034;Feb&#034;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#034;Mar&#034;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#034;Apr&#034;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#034;May&#034;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#034;Jun&#034;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#034;Jul&#034;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#034;Aug&#034;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#034;Sep&#034;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#034;Oct&#034;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#034;Nov&#034;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#034;Dec&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">parse_line<\/span><span class=\"token punctuation\">(<\/span>line<span class=\"token punctuation\">:<\/span> <span class=\"token builtin\">str<\/span><span class=\"token punctuation\">,<\/span> year<span class=\"token punctuation\">:<\/span> <span class=\"token builtin\">int<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    m <span class=\"token operator\">&#061;<\/span> SYSLOG_RE<span class=\"token punctuation\">.<\/span><span class=\"token keyword\">match<\/span><span class=\"token punctuation\">(<\/span>line<span class=\"token punctuation\">.<\/span>strip<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token keyword\">not<\/span> m<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token boolean\">None<\/span><br \/>\n    d <span class=\"token operator\">&#061;<\/span> m<span class=\"token punctuation\">.<\/span>groupdict<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">try<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        dt <span class=\"token operator\">&#061;<\/span> datetime<span class=\"token punctuation\">(<\/span>year<span class=\"token punctuation\">,<\/span> MONTHS<span class=\"token punctuation\">[<\/span>d<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;mon&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token builtin\">int<\/span><span class=\"token punctuation\">(<\/span>d<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;day&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                      <span class=\"token operator\">*<\/span><span class=\"token builtin\">map<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin\">int<\/span><span class=\"token punctuation\">,<\/span> d<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;time&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>split<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;:&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">except<\/span> Exception<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token boolean\">None<\/span><br \/>\n    msg <span class=\"token operator\">&#061;<\/span> d<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;msg&#034;<\/span><span class=\"token punctuation\">]<\/span><br \/>\n    tags <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token string\">&#034;Accepted&#034;<\/span> <span class=\"token keyword\">in<\/span> msg <span class=\"token keyword\">and<\/span> <span class=\"token string\">&#034;from&#034;<\/span> <span class=\"token keyword\">in<\/span> msg<span class=\"token punctuation\">:<\/span><br \/>\n        tags<span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;login_ok&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token string\">&#034;Failed password&#034;<\/span> <span class=\"token keyword\">in<\/span> msg <span class=\"token keyword\">or<\/span> <span class=\"token string\">&#034;Invalid user&#034;<\/span> <span class=\"token keyword\">in<\/span> msg<span class=\"token punctuation\">:<\/span><br \/>\n        tags<span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;login_fail&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token string\">&#034;sudo&#034;<\/span> <span class=\"token keyword\">in<\/span> d<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;proc&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>lower<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">or<\/span> <span class=\"token string\">&#034;COMMAND&#061;&#034;<\/span> <span class=\"token keyword\">in<\/span> msg<span class=\"token punctuation\">:<\/span><br \/>\n        tags<span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;sudo&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token keyword\">not<\/span> tags<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token boolean\">None<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token string-interpolation\"><span class=\"token string\">f&#034;<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>dt<span class=\"token punctuation\">.<\/span>isoformat<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">,<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>d<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;host&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">,<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>d<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;proc&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">,<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span><span class=\"token string\">&#039;|&#039;<\/span><span class=\"token punctuation\">.<\/span>join<span class=\"token punctuation\">(<\/span>tags<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">,<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>msg<span class=\"token punctuation\">.<\/span>replace<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;,&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;;&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span>paths<span class=\"token punctuation\">,<\/span> year<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;ts,host,proc,tags,msg&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> p <span class=\"token keyword\">in<\/span> paths<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">for<\/span> line <span class=\"token keyword\">in<\/span> Path<span class=\"token punctuation\">(<\/span>p<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>read_text<span class=\"token punctuation\">(<\/span>errors<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;ignore&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>splitlines<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n            row <span class=\"token operator\">&#061;<\/span> parse_line<span class=\"token punctuation\">(<\/span>line<span class=\"token punctuation\">,<\/span> year<span class=\"token punctuation\">)<\/span><br \/>\n            <span class=\"token keyword\">if<\/span> row<span class=\"token punctuation\">:<\/span><br \/>\n                <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>row<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">if<\/span> __name__ <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token string\">&#034;__main__&#034;<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>sys<span class=\"token punctuation\">.<\/span>argv<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">3<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;Usage: merge_ir_hints.py &lt;year&gt; &lt;log1&gt; [log2&#8230;]&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token builtin\">file<\/span><span class=\"token operator\">&#061;<\/span>sys<span class=\"token punctuation\">.<\/span>stderr<span class=\"token punctuation\">)<\/span><br \/>\n        sys<span class=\"token punctuation\">.<\/span>exit<span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    main<span class=\"token punctuation\">(<\/span>sys<span class=\"token punctuation\">.<\/span>argv<span class=\"token punctuation\">[<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">:<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token builtin\">int<\/span><span class=\"token punctuation\">(<\/span>sys<span class=\"token punctuation\">.<\/span>argv<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u7528\u6cd5\u793a\u610f&#xff1a;<br \/>\npython3 merge_ir_hints.py 2026 \/root\/ir_xxx\/auth\/auth.log &gt; timeline.csv<br \/>\n\u7136\u540e\u5728\u8868\u683c\u4e2d\u6309 login_ok\u3001\u6e90 IP\u3001\u8d26\u53f7\u8fc7\u6ee4&#xff0c;\u4e0e ss\/ps \u5feb\u7167\u5bf9\u9f50\u3002\u4ef7\u503c\u5728\u4e8e\u5f3a\u5236\u4f60\u4ea7\u51fa\u7ed3\u6784\u5316\u65f6\u95f4\u7ebf&#xff0c;\u800c\u4e0d\u662f\u5728\u7ec8\u7aef\u91cc\u65e0\u9650 grep\u3002\u6269\u5c55&#xff1a;\u53ef\u6dfb\u52a0\u6b63\u5219\u8868\u8fbe\u5f0f\u5339\u914d\u66f4\u591a\u6a21\u5f0f&#xff0c;\u5982 Base64 \u7f16\u7801\u7684\u547d\u4ee4\u6216\u5f02\u5e38\u7684 execve \u8c03\u7528\u3002\u5efa\u8bae\u7ed3\u5408 Pandas \u5e93\u8fdb\u884c\u6570\u636e\u5206\u6790&#xff0c;\u8f93\u51fa\u4ea4\u4e92\u5f0f\u62a5\u544a\u3002<\/p>\n<h3>\u4e94\u3001\u5b8c\u6574\u5b9e\u6218\u6848\u4f8b&#xff1a;Web \u5165\u53e3 \u2192 \u843d\u5730 \u2192 \u6301\u4e45\u5316 \u2192 \u5916\u8054<\/h3>\n<p>\u4ee5\u4e0b\u4e3a\u5408\u6210\u6559\u5b66\u573a\u666f&#xff0c;\u65b9\u6cd5\u53ef\u6620\u5c04\u5230\u771f\u5b9e\u4e8b\u4ef6\u3002\u5047\u8bbe&#xff1a;\u7535\u5546\u4e1a\u52a1\u673a app-01&#xff08;Ubuntu 22.04&#xff09;&#xff0c;\u5bf9\u5916 Nginx &#043; \u65e7\u7248\u4e1a\u52a1\u7ec4\u4ef6&#xff1b;\u76d1\u63a7\u53d1\u73b0\u8be5\u673a\u5bf9\u5883\u5916 IP 203.0.113.88:443 \u6301\u7eed\u51fa\u7ad9&#xff0c;CPU \u88ab kworker \u4f2a\u88c5\u8fdb\u7a0b\u6253\u6ee1\u3002<\/p>\n<h4>5.1 \u9694\u79bb\u4e0e\u5feb\u7167<\/h4>\n<li>\u5b89\u5168\u7ec4\u62d2\u7edd\u8be5\u8282\u70b9\u51fa\u7ad9&#xff08;\u6216\u4ec5\u653e\u884c\u5230\u65e5\u5fd7\/\u54cd\u5e94\u8df3\u677f&#xff09;&#xff1b;<\/li>\n<li>\u4ece SLB \u6458\u9664&#xff1b;<\/li>\n<li>\u6267\u884c\u4e0a\u4e00\u8282 ir_snapshot.sh&#xff0c;\u5e76\u628a \/var\/log\/nginx\/\u3001\u4e1a\u52a1\u76ee\u5f55\u6253\u5305\u62f7\u51fa\u3002<\/li>\n<h4>5.2 \u7f51\u7edc\u4e0e\u8fdb\u7a0b\u5173\u8054<\/h4>\n<p>ss -tunap \u663e\u793a bash \u4e0e 203.0.113.88:443 \u6709 ESTAB&#xff0c;PID \u6307\u5411\u7528\u6237 www-data\u3002ps auxwwf \u89c1&#xff1a;<\/p>\n<ul>\n<li>nginx worker \u6b63\u5e38&#xff1b;<\/li>\n<li>\u5176\u4e0b\u6302\u7740 \/tmp\/.X11-unix\/.font \u4e00\u7c7b\u9690\u85cf\u8def\u5f84\u53ef\u6267\u884c\u6587\u4ef6&#xff08;\u540d\u79f0\u523b\u610f\u4f2a\u88c5&#xff09;&#xff1b;<\/li>\n<li>\u53e6\u6709 cron \u4ee5 root \u8dd1\u7684\u5f02\u5e38\u4efb\u52a1\u3002<\/li>\n<\/ul>\n<p>\u7ed3\u8bba\u521d\u5224&#xff1a;Web \u8fdb\u7a0b\u4e0a\u4e0b\u6587\u88ab\u6ee5\u7528&#xff0c;\u5e76\u5df2\u62ff\u5230\u66f4\u9ad8\u6743\u9650\u7684\u6301\u4e45\u5316\u3002<\/p>\n<h4>5.3 \u65e5\u5fd7\u4fa7\u8bc1\u660e\u5165\u53e3<\/h4>\n<p>Nginx access \u5728 CPU \u5f02\u5e38\u524d\u7ea6 40 \u5206\u949f\u51fa\u73b0&#xff1a;<\/p>\n<ul>\n<li>\u540c\u4e00\u5883\u5916 IP \u5bf9 \/admin\/upload \u7684\u8fde\u7eed POST&#xff1b;<\/li>\n<li>\u968f\u540e\u5bf9 \/uploads\/2026\/03\/shell.jsp&#xff08;\u6216 .php&#xff09;\u7684\u8bf7\u6c42\u8fd4\u56de 200&#xff1b;<\/li>\n<li>\u5e94\u7528 error log \u51fa\u73b0\u53cd\u5e8f\u5217\u5316\/\u6a21\u677f\u6ce8\u5165\u76f8\u5173\u6808&#xff08;\u4f9d\u5b9e\u9645\u7ec4\u4ef6\u800c\u5b9a&#xff09;\u3002<\/li>\n<\/ul>\n<p>auth.log \u65e0\u8be5\u65f6\u95f4\u70b9\u7684 SSH \u6210\u529f\u8bb0\u5f55 \u2192 \u5165\u53e3\u66f4\u504f\u5411 Web \u800c\u975e SSH \u66b4\u7834\u3002<\/p>\n<h4>5.4 \u843d\u76d8\u4e0e\u6301\u4e45\u5316<\/h4>\n<ul>\n<li>\/var\/www\/app\/uploads\/ \u4e0b\u53d1\u73b0\u4e0e\u8bbf\u95ee\u65e5\u5fd7\u6587\u4ef6\u540d\u4e00\u81f4\u7684\u4e00\u53e5\u8bdd\u6216\u5185\u5b58\u9a6c\u843d\u76d8\u6837\u672c&#xff1b;<\/li>\n<li>www-data \u7684 crontab \u5199\u5165\u4e86\u5b9a\u65f6\u62c9\u53d6\u811a\u672c&#xff1b;<\/li>\n<li>\/etc\/systemd\/system\/sys-update.service \u4e3a\u5047\u66f4\u65b0\u670d\u52a1&#xff0c;ExecStart \u6307\u5411 \/usr\/local\/bin\/sysd-update&#xff08;\u5b9e\u4e3a\u8fdc\u63a7&#xff09;&#xff1b;<\/li>\n<li>authorized_keys \u88ab\u8ffd\u52a0\u964c\u751f\u516c\u94a5&#xff08;root&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u81f3\u6b64\u653b\u51fb\u94fe\u53ef\u63cf\u8ff0\u4e3a&#xff1a;<\/p>\n<p>\u6f0f\u6d1e\u4e0a\u4f20\/\u5229\u7528 \u2192 WebShell \u2192 \u53cd\u5f39\u4e0e\u63d0\u6743 \u2192 systemd\/cron\/SSH key \u4e09\u91cd\u6301\u4e45\u5316 \u2192 \u6316\u77ff\u6216 C2 \u5916\u8054\u3002<\/p>\n<h4>5.5 \u6eaf\u6e90\u8981\u56de\u7b54\u7684\u4ea4\u4ed8\u7269<\/h4>\n<p>\u4e00\u4efd\u5408\u683c\u7684\u6eaf\u6e90\u7b80\u62a5\u81f3\u5c11\u5305\u542b&#xff1a;<\/p>\n<li>\u65f6\u95f4\u7ebf\u8868&#xff08;UTC&#xff09;&#xff1a;\u5173\u952e\u4e8b\u4ef6 &#043; \u65e5\u5fd7\u8bc1\u636e\u8def\u5f84 &#043; \u6587\u4ef6 hash&#xff1b;<\/li>\n<li>\u5165\u53e3\u7ed3\u8bba&#xff1a;\u7ec4\u4ef6 CVE\/\u903b\u8f91\u6f0f\u6d1e\/\u5f31\u53e3\u4ee4\u7b49&#xff08;\u80fd\u5b9a\u7ea7\u5230\u914d\u7f6e\u8d23\u4efb\u65b9&#xff09;&#xff1b;<\/li>\n<li>\u5f71\u54cd\u9762&#xff1a;\u54ea\u4e9b\u4e3b\u673a\u3001\u8d26\u53f7\u3001\u5bc6\u94a5\u3001\u6570\u636e\u76ee\u5f55\u88ab\u89e6\u53ca&#xff1b;<\/li>\n<li>IOC \u5217\u8868&#xff1a;IP\/\u57df\u540d\u3001\u6587\u4ef6\u8def\u5f84\u3001hash\u3001\u670d\u52a1\u540d\u3001\u5bc6\u94a5\u6307\u7eb9&#xff1b;<\/li>\n<li>\u5904\u7f6e\u72b6\u6001&#xff1a;\u5df2\u6740\u8fdb\u7a0b \/ \u5df2\u5220\u540e\u95e8 \/ \u5df2\u8f6e\u6362\u5bc6\u94a5 \/ \u672a\u5b8c\u6210\u9879\u3002<\/li>\n<p>\u6269\u5c55\u7b80\u62a5\u6a21\u677f&#xff1a;\u4f7f\u7528 Markdown \u6216 Word \u683c\u5f0f&#xff0c;\u5305\u542b\u622a\u56fe\u548c\u547d\u4ee4\u8f93\u51fa\u9644\u4ef6\u3002\u5efa\u8bae\u5305\u542b\u98ce\u9669\u7b49\u7ea7\u8bc4\u4f30&#xff08;\u5982\u9ad8\u3001\u4e2d\u3001\u4f4e&#xff09;\u548c\u5efa\u8bae\u7684\u4fee\u590d\u4f18\u5148\u7ea7\u3002<\/p>\n<h4>5.6 \u5904\u7f6e\u987a\u5e8f&#xff08;\u907f\u514d\u201c\u6740\u5e72\u51c0\u53c8\u56de\u6765\u201d&#xff09;<\/h4>\n<li>\u65ad C2 \u4e0e\u6316\u77ff\u5916\u8054&#xff1b;<\/li>\n<li>\u5220\u9664\u6076\u610f systemd\/cron\/keys&#xff0c;\u5e76\u68c0\u67e5 \/etc\/rc.local\u3001~\/.bashrc\u3001ld.so.preload&#xff1b;<\/li>\n<li>\u8f6e\u6362\u6240\u6709\u53ef\u80fd\u6cc4\u9732\u7684\u5bc6\u94a5&#xff08;SSH\u3001\u4e91 AK\u3001DB\u3001JWT\u3001CI&#xff09;&#xff1b;<\/li>\n<li>\u4fee\u590d Web \u6f0f\u6d1e\u4e0e\u4e0a\u4f20\u76ee\u5f55\u6267\u884c\u6743\u9650&#xff1b;<\/li>\n<li>\u80fd\u91cd\u88c5\u5219\u7528\u5e72\u51c0\u955c\u50cf &#043; \u6570\u636e\u6062\u590d\u4f18\u4e8e\u201c\u672c\u673a\u624b\u5de5\u6e05\u573a\u201d&#xff1b;<\/li>\n<li>\u6062\u590d\u524d\u7528 IOC \u5728\u5168\u673a\u7fa4\u626b\u4e00\u904d\u6a2a\u5411\u3002<\/li>\n<p>\u4f18\u5316\u5efa\u8bae&#xff1a;\u5728\u6062\u590d\u9636\u6bb5&#xff0c;\u4f7f\u7528 Ansible \u81ea\u52a8\u5316\u914d\u7f6e\u626b\u63cf\u548c\u8865\u4e01\u5e94\u7528&#xff0c;\u786e\u4fdd\u4e00\u81f4\u6027\u3002<\/p>\n<h3>\u516d\u3001\u8e29\u5751\u4e0e\u4f18\u5316\u5efa\u8bae<\/h3>\n<h4>6.1 \u5e38\u89c1\u5751<\/h4>\n<p>\u5751 1&#xff1a;\u5148\u6740\u8fdb\u7a0b\u518d\u53d6\u8bc1<br \/>\n\u5185\u5b58\u91cc\u7684\u53c2\u6570\u3001\u65e0\u6587\u4ef6\u8fdb\u7a0b\u3001\u6ce8\u5165\u5173\u7cfb<br \/>\n\u6269\u5c55&#xff1a;\u5728\u751f\u4ea7\u73af\u5883\u76f4\u63a5 kill \u8fdb\u7a0b\u53ef\u80fd\u5bfc\u81f4\u6570\u636e\u4e22\u5931\u6216\u4e1a\u52a1\u4e2d\u65ad\u3002\u653b\u51fb\u8005\u5e38\u5229\u7528\u6ce8\u5165\u6280\u672f&#xff08;\u5982\u5728 Nginx \u8fdb\u7a0b\u4e2d\u6ce8\u5165\u5171\u4eab\u5e93&#xff09;&#xff0c;\u8fd9\u4e9b\u8fdb\u7a0b\u5728 ps \u4e2d\u4e0d\u53ef\u89c1\u3002\u5efa\u8bae\u4f7f\u7528 strace \u8ffd\u8e2a\u7cfb\u7edf\u8c03\u7528&#xff0c;\u6216\u5728\u4e8b\u540e\u5185\u5b58\u8f6c\u50a8\u540e\u518d\u5206\u6790\u3002<\/p>\n<p>\u5751 2&#xff1a;\u65e5\u5fd7\u88ab\u6e05\u7406<br \/>\n\u653b\u51fb\u8005\u5e38\u901a\u8fc7 logrotate \u6216\u624b\u52a8 truncate \u6e05\u7406\u65e5\u5fd7\u3002<br \/>\nFAQ&#xff1a;Q&#xff1a;\u5982\u4f55\u6062\u590d\u88ab\u5220\u9664\u7684\u65e5\u5fd7&#xff1f;A&#xff1a;\u4ece\u5907\u4efd\u6587\u4ef6\u6216 rsyslog \u7684 \/var\/log\/journal\/ \u4e2d\u6062\u590d\u3002<\/p>\n<p>\u5751 3&#xff1a;\u65f6\u95f4\u7ebf\u6df7\u4e71<br \/>\n\u653b\u51fb\u8005\u53ef\u80fd\u4fee\u6539\u7cfb\u7edf\u65f6\u95f4\u6765\u6df7\u6dc6\u6eaf\u6e90\u3002<br \/>\n\u89e3\u51b3&#xff1a;\u4f7f\u7528 chrony \u6821\u51c6\u65f6\u95f4\u6216\u68c0\u67e5 ntpd \u65e5\u5fd7\u3002<\/p>\n<p>\u5751 4&#xff1a;\u4e0d\u8003\u8651\u5bb9\u5668\u6216\u4e91\u73af\u5883<br \/>\n\u5728 Kubernetes \u96c6\u7fa4\u4e2d&#xff0c;\u5165\u4fb5\u53ef\u80fd\u9690\u85cf\u5728\u591a\u4e2a\u5bb9\u5668\u4e2d\u3002<\/p>\n<h4>6.2 \u4f18\u5316\u5efa\u8bae<\/h4>\n<li>\u81ea\u52a8\u5316\u5de5\u5177&#xff1a;\u4f7f\u7528 Falco \u6216 OSSEC \u5b9e\u65f6\u76d1\u63a7\u5f02\u5e38\u884c\u4e3a&#xff0c;\u63d0\u524d\u53d1\u73b0\u5165\u4fb5\u4fe1\u53f7\u3002<\/li>\n<li>\u591a\u673a\u90e8\u7f72&#xff1a;\u5728\u4f01\u4e1a\u73af\u5883\u4e2d&#xff0c;\u90e8\u7f72\u4e2d\u5fc3\u5316\u65e5\u5fd7\u6536\u96c6\u5668&#xff08;\u5982 ELK Stack&#xff09;&#xff0c;\u4fbf\u4e8e\u8de8\u4e3b\u673a\u5206\u6790\u3002<\/li>\n<li>\u5b9a\u671f\u6f14\u7ec3&#xff1a;\u5c06\u5e94\u6025\u54cd\u5e94\u6d41\u7a0b\u7eb3\u5165\u5e74\u5ea6\u5b89\u5168\u6f14\u7ec3&#xff0c;\u63d0\u5347\u56e2\u961f\u54cd\u5e94\u80fd\u529b\u3002<\/li>\n<li>\u6cd5\u5f8b\u4e0e\u5408\u89c4&#xff1a;\u786e\u4fdd\u53d6\u8bc1\u8fc7\u7a0b\u7b26\u5408 GDPR \u6216\u7b49\u4fdd\u8981\u6c42&#xff0c;\u8bb0\u5f55\u6240\u6709\u64cd\u4f5c\u3002<\/li>\n<h4>6.3 \u603b\u7ed3\u4e0e\u6700\u4f73\u5b9e\u8df5<\/h4>\n<p>\u5e94\u6025\u54cd\u5e94\u7684\u6210\u529f\u5173\u952e\u5728\u4e8e\u53ef\u91cd\u590d\u6027\u3002\u901a\u8fc7\u672c\u6587\u63d0\u4f9b\u7684\u5de5\u5177\u548c\u65b9\u6cd5&#xff0c;\u53ef\u6784\u5efa\u4e00\u4e2a\u53ef\u590d\u7528\u7684\u54cd\u5e94 playbook\u3002\u8bb0\u4f4f&#xff1a;\u5b89\u5168\u4e0d\u662f\u4e00\u52b3\u6c38\u9038&#xff0c;\u800c\u662f\u6301\u7eed\u7684\u8fc7\u7a0b\u3002\u6301\u7eed\u76d1\u63a7\u3001\u8865\u4e01\u7ba1\u7406\u548c\u6e17\u900f\u6d4b\u8bd5\u662f\u9884\u9632\u5165\u4fb5\u7684\u9ec4\u91d1\u6cd5\u5219\u3002<\/p>\n<p>&#xff08;\u5b57\u6570\u7edf\u8ba1&#xff1a;\u7ea6 4287 \u5b57&#xff0c;\u8f83\u539f\u6587\u589e\u52a0\u4e86\u8d85\u8fc7 1146 \u5b57&#xff0c;\u6db5\u76d6\u4e86\u539f\u7406\u7ec6\u8282\u3001\u6269\u5c55\u547d\u4ee4\u3001\u4ee3\u7801\u6ce8\u91ca\u3001\u6848\u4f8b\u6df1\u5316\u3001\u8e29\u5751\u6269\u5c55\u548c\u4f18\u5316\u5efa\u8bae\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025004845-6add51eda9841.gif\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025004845-6add51edd771a.png\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025004846-6add51eed85df.png\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025004847-6add51ef95c4c.png\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025004847-6add51eff3be0.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u66f4\u591a\u786c\u6838\u7f51\u5b89\u4e0eAI\u5de5\u5177\u5305&#xff0c;\u8bf7\u626b\u7801\u83b7\u53d6\u5b8c\u6574\u6e90\u7801&#xff01;<br \/>\n&#xff09;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content<\/p>\n","protected":false},"author":2,"featured_media":117730,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,1870,43,122,44],"topic":[],"class_list":["post-117736","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-linux","tag-1870","tag-43","tag-122","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u670d\u52a1\u5668\u88ab\u653b\u51fb\u4e86\u600e\u4e48\u529e\uff1fLinux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\u653b\u51fb\u6eaf\u6e90\u5b8c\u6574\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/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:\/\/www.wsisp.com\/helps\/117736.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u670d\u52a1\u5668\u88ab\u653b\u51fb\u4e86\u600e\u4e48\u529e\uff1fLinux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\u653b\u51fb\u6eaf\u6e90\u5b8c\u6574\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/117736.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-25T00:48:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025004844-6add51ecca8ee.jpg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/117736.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/117736.html\",\"name\":\"\u670d\u52a1\u5668\u88ab\u653b\u51fb\u4e86\u600e\u4e48\u529e\uff1fLinux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\u653b\u51fb\u6eaf\u6e90\u5b8c\u6574\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-25T00:48:49+00:00\",\"dateModified\":\"2026-10-25T00:48:49+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/117736.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/117736.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/117736.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u670d\u52a1\u5668\u88ab\u653b\u51fb\u4e86\u600e\u4e48\u529e\uff1fLinux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\u653b\u51fb\u6eaf\u6e90\u5b8c\u6574\u5b9e\u6218\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u670d\u52a1\u5668\u88ab\u653b\u51fb\u4e86\u600e\u4e48\u529e\uff1fLinux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\u653b\u51fb\u6eaf\u6e90\u5b8c\u6574\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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:\/\/www.wsisp.com\/helps\/117736.html","og_locale":"zh_CN","og_type":"article","og_title":"\u670d\u52a1\u5668\u88ab\u653b\u51fb\u4e86\u600e\u4e48\u529e\uff1fLinux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\u653b\u51fb\u6eaf\u6e90\u5b8c\u6574\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content","og_url":"https:\/\/www.wsisp.com\/helps\/117736.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-25T00:48:49+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261025004844-6add51ecca8ee.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"8 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/117736.html","url":"https:\/\/www.wsisp.com\/helps\/117736.html","name":"\u670d\u52a1\u5668\u88ab\u653b\u51fb\u4e86\u600e\u4e48\u529e\uff1fLinux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\u653b\u51fb\u6eaf\u6e90\u5b8c\u6574\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-25T00:48:49+00:00","dateModified":"2026-10-25T00:48:49+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/117736.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/117736.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/117736.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u670d\u52a1\u5668\u88ab\u653b\u51fb\u4e86\u600e\u4e48\u529e\uff1fLinux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\u653b\u51fb\u6eaf\u6e90\u5b8c\u6574\u5b9e\u6218"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/117736","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=117736"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/117736\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/117730"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=117736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=117736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=117736"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=117736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}