{"id":811,"date":"2026-11-08T10:40:30","date_gmt":"2026-11-08T02:40:30","guid":{"rendered":"https:\/\/blog.ofuyuan.com\/?p=811"},"modified":"2026-11-08T10:47:40","modified_gmt":"2026-11-08T02:47:40","slug":"svrguard-003-hacked-host","status":"publish","type":"post","link":"https:\/\/blog.ofuyuan.com\/?p=811","title":{"rendered":"[03][\u4e3b\u6a5f\u9632\u79a6-SvrGuard] \u6a5f\u5668\u88ab\u99ed\u4e86\uff0c\u4f60\u6703\u600e\u9ebc\u505a\u5462\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" style=\"width: 100%; max-width: 100%; height: auto; display: block; margin: 1em 0;\" src=\"https:\/\/blog.ofuyuan.com\/wp-content\/uploads\/2026\/11\/hero.jpg\" alt=\"\u6a5f\u5668\u88ab\u99ed\u4e4b\u5f8c\uff1a\u5728\u6a5f\u623f\u88e1\u62ff\u8457\u624b\u96fb\u7b52\u9010\u4e00\u6aa2\u67e5\u4f3a\u670d\u5668\u7684\u7ba1\u7406\u54e1\" \/><\/p>\n<p>\u524d\u9663\u5b50\u8655\u7406\u4e00\u53f0 Ubuntu 14.04 \u7684\u6a5f\u5668\uff0c\u5e38\u5e38\u9023\u4e0d\u4e0a\u3001CPU \u7a81\u7136\u98c6\u9ad8\uff0c\u9032\u5165\u7cfb\u7d71\u5f8c\u7528 ps \u6aa2\u67e5\uff0c\u767c\u73fe\u6709\u8a31\u591a\u5947\u602a\u7684 Process \u5728\u57f7\u884c\uff0c\u4e00\u76f4\u4ee5\u4f86\u6211\u5c0d\u65bc\u9019\u7a2e\u5947\u602a\u7684 Process \u90fd\u6703\u7279\u5225\u6ce8\u610f\u3002\u6c92\u932f\uff0c\u662f\u6a5f\u5668\u88ab\u99ed\u4e86\uff0c\u5e6b\u4eba\u5de5\u4f5c(\u6316\u7926)\uff0c\u4f46\u53ea\u662f\u6316\u7926\u5012\u662f\u55ae\u7d14\u3002\u8b93\u6211\u66f4\u64d4\u5fc3\u7684\u53cd\u800c\u662f\u5176\u4ed6\u7684\u6a5f\u5668\u662f\u5426\u4e5f\u88ab\u5165\u4fb5\u4e86\u3002<\/p>\n<p>\u4f46\u6211\u4e26\u6c92\u6709\u6025\u8457\u628a\u5b83\u6e05\u4e7e\u6de8\uff0c\u800c\u662f\u5148\u89c0\u5bdf\u9019\u99ed\u5ba2\u7684\u884c\u70ba\uff0c\u6e05\u7684\u540c\u6642\u4e5f\u628a\u73fe\u5834\u7559\u4e0b\u4f86\uff1a<code>\/etc<\/code>\u3001\u6392\u7a0b\u3001\u65e5\u8a8c\u3001\u7576\u4e0b\u7684\u884c\u7a0b\u8868\u90fd\u5099\u4efd\u4e00\u4efd\uff0c\u5728\u8dd1\u7684\u7a0b\u5f0f\u672c\u9ad4\u4e5f\u5f9e <code>\/proc\/PID\/exe<\/code> \u6488\u56de\u4f86\uff0c\u7b97\u597d\u96dc\u6e4a\uff0c\u5e36\u96e2\u9019\u53f0\u6a5f\u5668\u518d\u770b\u3002<\/p>\n<p>\u65e2\u7136\u77e5\u9053\u9019\u53f0\u88ab\u99ed\uff0c\u90a3\u6a5f\u5668\u4e0a\u7684\u5de5\u5177\u662f\u4e0d\u80fd\u4fe1\u4e86\uff0c\u7528 <code>dpkg -V<\/code> \u6bd4\u5c0d\u7cfb\u7d71\u7a0b\u5f0f\uff0c<code>\/bin\/ls<\/code> \u5df2\u7d93\u88ab\u63db\u6389\uff1b<code>\/etc\/ld.so.preload<\/code> \u639b\u8457\u4e00\u500b rootkit\uff0c\u4e00\u822c\u7a0b\u5f0f\u555f\u52d5\u90fd\u6703\u5148\u8f09\u5165\u5b83\u3002\u4e5f\u5c31\u662f\u8aaa\uff0c\u5728\u9019\u53f0\u6a5f\u5668\u4e0a\u6253 <code>ls<\/code>\u3001<code>ps<\/code> \u770b\u5230\u7684\uff0c\u662f\u99ed\u5ba2\u60f3\u8b93\u6211\u770b\u5230\u7684\u3002\u5f8c\u9762\u7684\u6aa2\u67e5\uff0c\u6211\u6539\u7528\u975c\u614b\u7de8\u8b6f\u7684 busybox\uff0c\u5728\u7368\u7acb\u7684 mount namespace \u88e1\u628a <code>ld.so.preload<\/code> \u906e\u6389\u518d\u8dd1\u3002<\/p>\n<p>\u90a3\u5b83\u5230\u5e95\u505a\u4e86\u4ec0\u9ebc\uff1a<\/p>\n<ul>\n<li><strong>\u5c0d\u5916\u9023\u7dda<\/strong>\uff1a<code>netstat -tnp<\/code> \u770b\u5230\u5b83\u9023\u8457\u7926\u6c60\u7684 3333 \u57e0\uff1b\u6e05\u5230\u4e00\u534a\uff0c\u5b83\u63db\u4e86\u53e6\u4e00\u500b\u7926\u6c60\u7e7c\u7e8c\u9023\u3002<\/li>\n<li><strong>\u6392\u7a0b<\/strong>\uff1a\u6bcf\u5c0f\u6642\u5f9e\u5916\u90e8\u7db2\u7ad9\u4e0b\u8f09\u4e00\u6bb5\u8173\u672c\uff0c\u76f4\u63a5\u4ea4\u7d66 shell \u57f7\u884c\u3002<\/li>\n<li><strong>\u81ea\u6211\u4fee\u5fa9<\/strong>\uff1a\u884c\u7a0b\u88ab\u6bba\uff0csystemd \u99ac\u4e0a\u628a\u5b83\u62c9\u56de\u4f86\uff1b\u6a94\u6848\u88ab\u8a2d\u6210 immutable\uff0c\u522a\u4e0d\u6389\uff1bcrontab \u6e05\u6389\uff0c\u6c92\u591a\u4e45\u53c8\u88ab\u88dd\u56de\u53bb\uff1b\u5e33\u865f\u522a\u6389\uff0c\u540c\u4e00\u5206\u9418\u53c8\u88ab\u5efa\u56de\u4f86\u3002<\/li>\n<\/ul>\n<p>\u7528 <code>last<\/code>\u3001<code>lastb<\/code> \u8b80\u767b\u5165\u7d00\u9304\uff1a\u4e00\u500b\u5728 sudo \u7fa4\u7d44\u88e1\u7684\u5e33\u865f\uff0c\u5728\u767b\u5165\u5931\u6557\u7d00\u9304\u88e1\u88ab\u8a66\u4e86\u4e09\u5343\u591a\u6b21\u5bc6\u78bc\uff0c\u6700\u5f8c\u88ab\u731c\u4e2d\uff0c\u540c\u4e00\u6b21\u767b\u5165\u5c31\u62ff\u5230 root\u3002\u4e4b\u5f8c\u5b83\u5efa\u4e86\u4e00\u500b\u53eb <code>systemd<\/code> \u7684\u5e33\u865f\uff0c\u540d\u5b57\u770b\u8d77\u4f86\u50cf\u7cfb\u7d71\u7684\u4e00\u90e8\u5206\uff0c\u4e26\u5728 sudoers \u6700\u5f8c\u4e00\u884c\u7d66\u5b83\u514d\u5bc6\u78bc\u7684 root\u3002\u5f9e\u7b2c\u4e00\u6b21\u767b\u5165\u5230\u88ab\u767c\u73fe\uff0c\u904e\u4e86 52 \u5929\u3002<\/p>\n<p>\u66f4\u9ebb\u7169\u7684\u662f\uff0c\u9019\u53f0\u6a5f\u5668\u7684 <code>auth.log<\/code> \u88e1\u627e\u4e0d\u5230\u4efb\u4f55 sshd \u7684\u7d00\u9304\u3002\u66b4\u529b\u7834\u89e3\u3001\u767b\u5165\u6210\u529f\uff0c\u90fd\u6c92\u6709\u7559\u5728\u6700\u8a72\u7559\u7684\u5730\u65b9\u3002<\/p>\n<p><img decoding=\"async\" style=\"width: 100%; max-width: 100%; height: auto; display: block; margin: 1em 0;\" src=\"https:\/\/blog.ofuyuan.com\/wp-content\/uploads\/2026\/11\/intrusion_flow.png\" alt=\"\u6a5f\u5668\u88ab\u99ed\u7684\u516d\u500b\u6b65\u9a5f\uff1a\u731c\u5bc6\u78bc\u3001\u62ff\u5230 root\u3001\u85cf\u8d77\u4f86\u3001\u8cf4\u8457\u4e0d\u8d70\u3001\u96a8\u6642\u66f4\u65b0\u3001\u958b\u59cb\u6316\u7926\" \/><\/p>\n<p>\u4fee\u6389\u4e86\u4ee5\u4e0b\u7684\u7a0b\u5f0f\uff1a<\/p>\n<ul>\n<li><code>ld.so.preload<\/code> \u639b\u7684 rootkit\uff0c\u548c\u88ab\u63db\u6389\u7684 <code>\/bin\/ls<\/code><\/li>\n<li>\u958b\u6a5f\u81ea\u52d5\u57f7\u884c\u7684 <code>\/usr\/sshd<\/code>\uff0c\u548c\u6703\u628a\u5b83\u62c9\u56de\u4f86\u7684 systemd \u670d\u52d9<\/li>\n<li>\u6bcf\u5c0f\u6642\u5f9e\u5916\u90e8\u4e0b\u8f09\u8173\u672c\u7684\u6392\u7a0b\uff0c\u548c\u88ab\u5165\u4fb5\u5e33\u865f\u7684 crontab<\/li>\n<li>\u5192\u540d\u7684 <code>systemd<\/code> \u5e33\u865f\uff0c\u548c sudoers \u88e1\u7684\u514d\u5bc6\u78bc root<\/li>\n<\/ul>\n<p>\u6e05\u5b8c\u8907\u67e5\uff0c\u9019\u4e9b\u90fd\u6c92\u6709\u518d\u51fa\u73fe\u3002\u5373\u4f7f\u5982\u6b64\uff0c\u4f46\u9084\u662f\u64d4\u5fc3\u6709\u6f0f\u7db2\u4e4b\u9b5a\uff0c\u4e5f\u64d4\u5fc3\u5bc6\u78bc\u3001\u91d1\u9470\u7b49\u5916\u6d29\uff0c\u6700\u5f8c\u9084\u662f\u6c7a\u5b9a\u91cd\u704c\u4e00\u52de\u6c38\u9038\u3002<\/p>\n<p>\u4e4b\u5f8c\u6211\u628a\u6aa2\u67e5\u7684\u6e05\u55ae\uff0c\u5beb\u6210\u6aa2\u67e5\u7a0b\u5f0f\uff1a<code>ld.so.preload<\/code>\u3001\u884c\u7a0b\u7684\u57f7\u884c\u6a94\u4f4d\u7f6e\u3001cron\u3001systemd \u55ae\u5143\u3001sudoers\u3001\u5e33\u865f\u3001\u88ab\u6539\u904e\u7684\u7cfb\u7d71\u6a94\u3001immutable \u6a94\u3001\u6838\u5fc3\u6a21\u7d44\u3001\u9023\u5f80\u7926\u6c60\u7684\u9023\u7dda\u3001\u964c\u751f\u7684\u76e3\u807d\u57e0\u7b49\u3002<\/p>\n<p>\u81f3\u65bc\u5176\u4ed6\u6a5f\u5668\uff0c\u540c\u4e00\u652f\u7a0b\u5f0f\u6211\u4e5f\u62ff\u53bb\u53e6\u4e00\u53f0\u6b63\u5f0f\u4e3b\u6a5f\u8dd1\u4e86\u4e00\u904d\uff0c\u9084\u597d\u6c92\u6709\u767c\u73fe\u5f8c\u9580\u7684\u8de1\u8c61\u3002<\/p>\n<p>\u5f8c\u4f86\u4e5f\u628a\u9019\u500b\u6aa2\u67e5\u7a0b\u5f0f\u6574\u5408\u9032 SvrGuard\uff1a\u5f9e\u66ab\u5b58\u76ee\u9304\u8dd1\u8d77\u4f86\u7684\u7a0b\u5f0f\u3001<code>ld.so.preload<\/code>\u3001\u5f9e\u66ab\u5b58\u76ee\u9304\u555f\u52d5\u7684 cron \u8207 systemd\u3001sudoers \u88e1\u7684\u514d\u5bc6\u78bc root\u3001\u9023\u5f80\u7926\u6c60\u7684\u5c0d\u5916\u9023\u7dda\u3002<\/p>\n<p>\u9019\u500b\u7d93\u9a57\u8b93\u6211\u6df1\u6df1\u9ad4\u6703\uff0c\u61c9\u8a72\u8981\u6709\u4e00\u500b\u6301\u7e8c\u5e6b\u6211\u76e3\u63a7\u3001\u4e3b\u52d5\u9632\u79a6\u8ddf\u6aa2\u67e5\u53ca\u96a8\u6642\u901a\u77e5\u7cfb\u7d71\u767c\u751f\u751a\u9ebc\u554f\u984c\u7684\u5de5\u5177\uff0c\u9810\u9632\u52dd\u65bc\u6cbb\u7642\uff0c\u9019\u6a23\u5c31\u4e0d\u7528\u96a8\u6642\u64d4\u5fc3\u751a\u9ebc\u6642\u5019\u88ab\u99ed\u3002<\/p>\n<hr \/>\n<p>\u672c\u7cfb\u5217\u6587\u7ae0\uff1a<a href=\"https:\/\/blog.ofuyuan.com\/?cat=78\">\u4e3b\u6a5f\u9632\u79a6\u7cfb\u7d71-SvrGuard<\/a>\u3002\u60f3\u4e86\u89e3\u66f4\u591a SvrGuard\uff0c\u6b61\u8fce\u9020\u8a2a <a href=\"https:\/\/svrguard.ofuyuan.com\/zh\/\" target=\"_blank\" rel=\"noopener\">SvrGuard \u5b98\u65b9\u7db2\u7ad9<\/a>\uff0c\u6709\u554f\u984c\u6216\u60f3\u6cd5\u6b61\u8fce\u5230 <a href=\"https:\/\/forum.ofuyuan.com\/\" target=\"_blank\" rel=\"noopener\">SvrGuard \u8a0e\u8ad6\u5340<\/a>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6a5f\u5668\u88ab\u99ed\u4e86\uff1a\u5e38\u9023\u4e0d\u4e0a\u3001CPU \u98c6\u9ad8\uff0cps \u4e00\u770b\u5168\u662f\u5947\u602a\u7684\u884c\u7a0b\u3002\u6211\u6c92\u6709\u6025\u8457\u6e05\uff0c\u800c\u662f\u5148\u770b\u5b83\u505a\u4e86\u4ec0\u9ebc\u3001\u600e\u9ebc\u9032\u4f86\u3001\u8eb2\u5728\u54ea\u88e1\uff0c\u6700\u5f8c\u600e\u9ebc\u6536\u62fe\u3002 <a href=\"https:\/\/blog.ofuyuan.com\/?p=811\">\u95b1\u8b80\u5168\u6587 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":841,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[78],"tags":[100,79,99,101,98,97,102,87],"class_list":["post-811","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category--svrguard","tag-rootkit","tag-svrguard","tag-99","tag-101","tag-98","tag-97","tag-102","tag-87"],"_links":{"self":[{"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=\/wp\/v2\/posts\/811","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=811"}],"version-history":[{"count":35,"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=\/wp\/v2\/posts\/811\/revisions"}],"predecessor-version":[{"id":848,"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=\/wp\/v2\/posts\/811\/revisions\/848"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=\/wp\/v2\/media\/841"}],"wp:attachment":[{"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=811"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=811"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ofuyuan.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}