{"id":162847,"date":"2019-11-26T09:13:54","date_gmt":"2019-11-26T01:13:54","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=162847"},"modified":"2019-10-30T09:15:09","modified_gmt":"2019-10-30T01:15:09","slug":"linux-cve-sudo","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/linux-cve-sudo.html","title":{"rendered":"Linux\u670d\u52a1\u5668\u51fa\u73b0\u5de8\u5927\u6f0f\u6d1e\uff0c\u53ef\u7ed5\u8fc7root\u6743\u9650"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nlinux\u4e00\u76f4\u4ee5\u6765\u5f88\u5c11\u6709\u6f0f\u6d1e,\u7a33\u5b9a,\u9ad8\u6548,\u5b89\u5168.\u6df1\u53d7\u7f51\u7ad9,app\u8fd0\u8425\u8005\u7684\u559c\u6b22\u4e0e\u9752\u7750,\u5f88\u591a\u7f51\u7ad9\u670d\u52a1\u5668\u7684\u8fd0\u8425\u6280\u672f\u548c\u8fd0\u7ef4,\u5728\u7ef4\u62a4\u670d\u52a1\u5668\u7684\u540c\u65f6\u90fd\u4f1a\u4f7f\u7528sudo\u547d\u4ee4\u6765\u505a\u5b89\u5168,\u6b8a\u4e0d\u77e5sudo\u8fd1\u671f\u88ab\u7206\u51fa\u6f0f\u6d1e,\u5e76\u767b\u4e0aCVE-2019-14287\u7ea7\u522b,\u53ef\u89c1\u6f0f\u6d1e\u7684\u5371\u5bb3\u6027\u8f83\u5927\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

Linux\u6f0f\u6d1e,\u76ee\u524d\u6765\u770b\u4f7f\u7528centos\u7cfb\u7edf\u7684\u670d\u52a1\u5668,\u4ee5\u53ca\u7f51\u7ad9\u90fd\u4f1a\u53d7\u5230\u8be5\u6f0f\u6d1e\u7684\u5f71\u54cd,\u6211\u4eecSINE\u5b89\u5168\u5efa\u8bae\u5927\u5bb6\u5c3d\u5feb\u5347\u7ea7sudo\u7684\u7248\u672c\u5230\u6700\u65b0\u76841.8.28\u7248\u672c,\u5c06\u635f\u5931\u964d\u5230\u6700\u4f4e.\u9632\u6b62\u7f51\u7ad9,\u670d\u52a1\u5668,APP\u56e0\u4e3aLINUX\u6f0f\u6d1e\u88ab\u653b\u51fb.<\/p>\n

CVE-2019-14287 sudo\u6f0f\u6d1e\u5230\u5e95\u662f\u4e3a\u4f55\u4ea7\u751f,\u5230\u5e95\u4ec0\u4e48\u662fSUDO,\u6211\u4eecSINE\u5b89\u5168\u6280\u672f\u6765\u8ddf\u5927\u5bb6\u8bb2\u89e3\u4e00\u4e0b,SUDO\u662flinux\u7cfb\u7edf\u7684\u7ba1\u7406\u547d\u4ee4,\u53ef\u4ee5\u5141\u8bb8\u7528\u6237\u5728\u4e0d\u9700\u8981\u5207\u6362\u8d26\u53f7\u7684\u60c5\u51b5\u4e0b,\u4f7f\u7528sudo\u7684\u547d\u4ee4\u6765\u8fd0\u884croot\u7684\u547d\u4ee4,\u51cf\u5c11root\u7684\u767b\u5f55\u4e0e\u7ba1\u7406,\u8ba9\u64cd\u4f5clinux centos\u7cfb\u7edf\u66f4\u65b9\u4fbf.\u540c\u65f6\u53ef\u4ee5\u5c06\u670d\u52a1\u5668\u7684\u5b89\u5168\u52a0\u5f3a.<\/p>\n

\u800c\u8be5\u6f0f\u6d1e\u53ef\u4ee5\u5c06sudo\u914d\u7f6e\u7684\u7528\u6237\u53ef\u4ee5\u4f7f\u7528\u9ed8\u8ba4\u7684\u914d\u7f6e\u89c4\u5219\u6765\u4f7f\u7528\u4efb\u610f\u7684\u7528\u6237\u8d26\u53f7\u6765\u6267\u884croot\u7ba1\u7406\u5458\u547d\u4ee4,\u653b\u51fb\u8005\u5229\u7528\u7ed5\u8fc7\u89c4\u5219\u7684\u65b9\u5f0f\u5c06\u6076\u610f\u547d\u4ee4\u4f20\u5165\u5230\u670d\u52a1\u5668\u4e2d\u8fdb\u884c\u6267\u884c.\u4ece\u800c\u7ed5\u8fc7root\u6743\u9650,\u8fdb\u884c\u653b\u51fb\u670d\u52a1\u5668<\/p>\n

\"\"<\/p>\n

\u6211\u4eecSINE\u5b89\u5168\u6280\u672f\u4ee5\u5b9e\u9645\u7684\u6f0f\u6d1e\u6d4b\u8bd5\u4e3a\u57fa\u51c6,\u53d1\u73b0\u5927\u90e8\u5206\u7684linux\u670d\u52a1\u5668\u7cfb\u7edf\u5b58\u5728\/etc\/sudoers\/\u76ee\u5f55,\u5982\u4e0b\u56fe\u6240\u793a\u4e00\u6837,\u5176\u4e2d\u767d\u8272\u5b57\u4f53ALL\u540e\u9762\u8ddf\u7684\u5c31\u662f\u7528\u6237\u7684\u7ec4\u4e0e\u53ef\u4ee5\u4f7f\u7528sudo root\u547d\u4ee4\u7684\u6240\u5c5e\u8d26\u53f7.\u90a3\u4e48\u8be5\u5982\u4f55\u5229\u7528linux\u6f0f\u6d1e\u5462? \u9996\u5148\u7528\u6237\u9700\u8981\u6709sudo\u7684\u6743\u9650,\u5e76\u914d\u7f6e\u6587\u4ef6\u5141\u8bb8\u4efb\u610f\u7684\u8d26\u6237ID\u6765\u5141\u8bb8\u547d\u4ee4\u7684\u6267\u884c,\u8fbe\u5230\u4ee5\u4e0a\u6761\u4ef6\u540e.\u6211\u4eec\u6765\u6784\u9020\u6267\u884c\u547d\u4ee4,\u4f7f\u5176\u7ed5\u8fc7root\u6743\u9650,\u6267\u884c\u7ba1\u7406\u5458\u7684\u547d\u4ee4.\u4ee3\u7801\u5982\u4e0b:<\/p>\n

sine my.ini = (ALL, !root) \/usr\/bin\/vi,\u53ef\u4ee5\u76f4\u63a5\u5141\u8bb8\u4f7f\u7528VI\u547d\u4ee4\u7f16\u8f91\u6587\u4ef6,sudo -u#-1vi\u5c31\u53ef\u4ee5\u4ee5root\u7684\u7ba1\u7406\u5458\u6743\u9650\u7f16\u8f91\u6587\u4ef6\u4e86,\u5177\u4f53\u7684linux\u6f0f\u6d1ePOC\u590d\u73b0\u8fc7\u7a0b\u770b\u4e0b\u56fe:
\n\"\"<\/p>\n

\u76ee\u524d\u53d7\u5f71\u54cd\u7684linux\u7248\u672c\u662f\u5c0f\u4e8e1.8.28\u7684sudo\u7248\u672c\u90fd\u4f1a\u53d7\u5230\u8be5\u6f0f\u6d1e\u7684\u653b\u51fb,\u5371\u5bb3\u8f83\u5927\u53ef\u5bfc\u81f4\u670d\u52a1\u5668\u88ab\u653b\u51fb,\u88ab\u5165\u4fb5,\u5e76\u63d0\u6743,\u5982\u679c\u670d\u52a1\u5668\u91cc\u8fd0\u884c\u7f51\u7ad9,APP,\u6570\u636e\u5e93\u7684\u8bdd,\u5f88\u6709\u53ef\u80fd\u6570\u636e\u6cc4\u9732,\u6570\u636e\u7be1\u6539\u7b49\u653b\u51fb\u95ee\u9898\u7684\u53d1\u751f.\u8bf7\u5404\u4f4d\u7f51\u7ad9\u670d\u52a1\u5668\u7684\u7ef4\u62a4\u4eba\u5458,\u5c3d\u5feb\u5347\u7ea7sudo\u5230\u6700\u65b0\u7248\u672c,\u4fee\u590d\u6f0f\u6d1e,\u5c06\u635f\u5931\u964d\u5230\u6700\u4f4e,\u5b89\u5168\u4e0d\u53ef\u5ffd\u89c6.<\/p>\n","protected":false},"excerpt":{"rendered":"

Linux\u6f0f\u6d1e,\u76ee\u524d\u6765\u770b\u4f7f\u7528centos\u7cfb\u7edf\u7684\u670d\u52a1\u5668,\u4ee5\u53ca\u7f51\u7ad9\u90fd\u4f1a\u53d7\u5230\u8be5\u6f0f\u6d1e\u7684\u5f71\u54cd,\u6211\u4eecSINE\u5b89\u5168\u5efa\u8bae\u5927\u5bb6\u5c3d […]<\/p>\n","protected":false},"author":1482,"featured_media":113301,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[21],"tags":[],"class_list":["post-162847","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/162847","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\/1482"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=162847"}],"version-history":[{"count":5,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/162847\/revisions"}],"predecessor-version":[{"id":162897,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/162847\/revisions\/162897"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/113301"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=162847"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=162847"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=162847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}