{"id":268554,"date":"2023-03-29T20:05:12","date_gmt":"2023-03-29T12:05:12","guid":{"rendered":"https:\/\/lrxjmw.cn\/lhmcxjcxtlsb.html"},"modified":"2023-03-29T20:05:12","modified_gmt":"2023-03-29T12:05:12","slug":"lhmcxjcxtlsb","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/lhmcxjcxtlsb.html","title":{"rendered":"linux\u540e\u95e8\u7a0b\u5e8f \u68c0\u67e5\u7cfb\u7edf\uff08Linux\uff09\u662f\u4e0d\u662f\u88ab\u9ed1\uff0c\u5176\u590d\u6742\u7a0b\u5ea6\u4e3b\u8981\u53d6\u51b3\u4e8e\u5165\u4fb5\u8005"},"content":{"rendered":"

\u5b89\u5168\u7c7b\u95ee\u9898>linuxCentOS\u68c0\u6d4b\u89c1\u4fa7\u95e8\u7a0b\u5e8f\u7684shell<\/p>\n

linuxCentOS\u68c0\u6d4b\u89c1\u4fa7\u95e8\u7a0b\u5e8f\u7684shell<\/p>\n

\u901a\u5e38\u4fa7\u95e8\u7a0b\u5e8f\uff0c\u5728ps\u7b49\u8fdb\u7a0b\u67e5\u770b\u5de5\u5177\u91cc\u627e\u4e0d\u5230\uff0c\u7531\u4e8e\u8fd9\u79cd\u5e38\u7528\u5de5\u5177\u751a\u81f3\u7cfb\u7edf<\/a>\u5e93\u5728\u7cfb\u7edf\u88ab\u5165\u4fb5\u4ee5\u540e\u57fa\u672c\u4e0a\u65e9\u5df2\u88ab\u52a8\u8fc7\u56db\u80a2\uff08\u7f51\u4e0a\u7559\u4f20\u7740\u5927\u91cf\u7684rootkit\u3002\u5982\u679c\u662f\u5185\u6838\u7ea7\u7684\u6728\u9a6c\uff0c\u8fd9\u4e48\u8be5\u6280\u5de7\u5c31\u65e0\u6548\u4e86\uff09\u3002<\/p>\n

\u7531\u4e8e\u66f4\u6539\u7cfb\u7edf\u5185\u6838\u76f8\u5bf9\u590d\u6742\uff08\u5982\u679c\u5185\u6838\u88ab\u66f4\u6539\u8fc7linux \u4e0b\u8f7d\u5de5\u5177\uff0c\u6216\u5219\u662f\u5185\u6838\u7ea7\u7684\u6728\u9a6c\uff0c\u5c31\u66f4\u96be\u53d1\u89c9\u4e86\uff09linux\u540e\u95e8\u7a0b\u5e8f<\/strong>\uff0c\u6240\u4ee5\u5728\/proc\u4e0b\uff0c\u57fa\u672c\u4e0a\u8fd8\u90fd\u53ef\u4ee5\u627e\u5230\u6728\u9a6c\u7684\u75d5\u8ff9\u3002<\/p>\n

\u601d\u8def\uff1a<\/p>\n

\u5728\/proc\u4e2d\u5b58\u5728\u7684\u8fdb\u7a0bIDlinux\u540e\u95e8\u7a0b\u5e8f<\/strong>\uff0c\u5728ps\u4e2d\u67e5\u770b\u4e0d\u5230\uff08\u88ab\u9690\u85cf\uff09\uff0c\u5fc5\u6709\u95ee\u9898\u3002<\/p>\n

#!\/bin\/bash<\/p>\n

str_pids=\"`ps-A|awk'{print$1}'`\";<\/p>\n

foriin\/proc\/[[:digit:]]*;<\/p>\n

do<\/p>\n

ifecho\"$str_pids\"|grep-qs`basename\"$i\"`;<\/p>\n

then<\/p>\n

:<\/p>\n

else<\/p>\n

linux\u3000\u540e\u95e8_linux\u540e\u95e8\u7a0b\u5e8f_\u7a0b\u5e8f\u540e\u95e8<\/p>\n

echo\"Rootkit'sPID:$(basename\"$i\")\";<\/p>\n

fi<\/p>\n

done<\/p>\n

linux\u3000\u540e\u95e8_linux\u540e\u95e8\u7a0b\u5e8f_\u7a0b\u5e8f\u540e\u95e8<\/p>\n

\u8ba8\u8bba\uff1a<\/p>\n

\u68c0\u6d4b\u7cfb\u7edf(Linux<\/a>)\u662f\u4e0d\u662f\u88ab\u9ed1linux\u6570\u636e\u6062\u590d\uff0c\u5176\u590d\u6742\u7a0b\u5ea6\u4e3b\u8981\u53d6\u51b3\u4e8e\u5165\u4fb5\u8005\u201c\u626b\u5c3e\u5de5\u4f5c\u201d\u662f\u5426\u505a\u5f97\u5145\u8db3\u3002\u5bf9\u4e8e\u4e00\u6b21\u505a\u8db3\u529f\u8bfe\u7684\u5165\u4fb5\u6765\u8bf4\uff0c\u8981\u60f3\u5254\u9664\u5e72\u51c0\uff0c\u5c06\u662f\u4e00\u4ef6\u5206\u7cbe\u5bc6\u3001\u75db\u82e6\u7684\u4e8b\u60c5\uff0c\u4e00\u822c\u8fd9\u4e9b\u60c5\u51b5\uff0c\u987b\u8981\u7528\u4e13\u4e1a\u7684\u7b2c\u4e09\u65b9\u7684\u5de5\u5177\uff08\u6709\u5f00\u6e90\u7684\uff0c\u4f8b\u5982tripwire\uff0c\u4f8b\u5982aide\uff09\u6765\u505a\u8fd9\u4ef6\u4e8b\u60c5\u3002<\/p>\n

\u800c\u4e13\u4e1a\u7684\u5de5\u5177\uff0c\u5e03\u7f72\u3001\u4f7f\u7528\u76f8\u5bf9\u6bd4\u8f83\u9ebb\u70e6\uff0c\u4e5f\u5e76\u975e\u6240\u6709\u7684\u7ba1\u7406\u5458\u90fd\u80fd\u719f\u7ec3\u4f7f\u7528\u3002<\/p>\n

\u5b9e\u9645\u4e0aLinux\u7cfb\u7edf\u672c\u8eab\u65e9\u5df2\u63d0\u4f9b\u4e86\u4e00\u5957\u201c\u6821\u9a8c\u201d\u673a\u5236\uff0c\u5728\u68c0\u6d4b\u7cfb\u7edf\u4e0a\u7684\u7a0b\u5e8f\u6ca1\u6709\u88ab\u66f4\u6539\u3002\u4f8b\u5982rpm\u5305\u7ba1\u7406\u7cfb\u7edf\u63d0\u4f9b\u7684-V\u529f\u80fd\uff1a<\/p>\n

rpm-Va<\/p>\n

\u5373\u53ef\u6821\u51c6\u7cfb\u7edf\u4e0a\u6240\u6709\u7684\u5305\uff0c\u8f93\u51fa\u4e0e\u5b89\u88c5\u65f6\u88ab\u66f4\u6539\u8fc7\u7684\u6587\u4ef6\u53ca\u76f8\u5173\u4fe1\u606f\u3002\u5e76\u4e14rpm\u7cfb\u7edf\u4e5f\u53ef\u80fd\u88ab\u7834\u574f\u4e86\uff0c\u4f8b\u5982\u88ab\u66f4\u6539\u8fc7\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

CentOS\u68c0\u67e5\u89c1\u540e\u95e8\u7a0b\u5e8f\u7684shellCentOS\u68c0\u67e5\u89c1\u540e\u95e8\u7a0b\u5e8f\u7684shell\u4e00\u822c\u540e\u95e8\u7a0b\u5e8f\uff0c\u5728ps\u7b49\u8fdb\u7a0b\u67e5\u770b\u5de5\u5177\u91cc\u627e\u4e0d\u5230\uff0c\u56e0\u4e3a\u8fd9\u4e9b\u5e38\u7528\u5de5\u5177\u751a\u81f3\u7cfb\u7edf\u5e93\u5728\u7cfb\u7edf\u88ab\u5165\u4fb5\u4e4b\u540e\u57fa\u672c\u4e0a\u5df2\u7ecf\u88ab\u52a8\u8fc7\u624b\u811a\uff08\u7f51\u4e0a\u6d41\u4f20\u7740\u5927\u91cf\u7684rootkit\u3002\u5b9e\u9645\u4e0aLinux\u7cfb\u7edf\u672c\u8eab\u5df2\u7ecf\u63d0\u4f9b\u4e86\u4e00\u5957\u201c\u6821\u9a8c\u201d\u673a\u5236\uff0c\u5728\u68c0\u67e5\u7cfb\u7edf\u4e0a\u7684\u7a0b\u5e8f\u6ca1\u6709\u88ab\u4fee\u6539\u3002\u5373\u53ef\u6821\u9a8c\u7cfb\u7edf\u4e0a\u6240\u6709\u7684\u5305\uff0c\u8f93\u51fa\u4e0e\u5b89\u88c5\u65f6\u88ab\u4fee\u6539\u8fc7\u7684\u6587\u4ef6\u53ca\u76f8\u5173\u4fe1\u606f\u3002<\/p>\n","protected":false},"author":1,"featured_media":268555,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-268554","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/268554","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=268554"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/268554\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/268555"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=268554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=268554"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=268554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}