{"id":136456,"date":"2019-03-04T13:14:42","date_gmt":"2019-03-04T05:14:42","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=136456"},"modified":"2019-02-18T15:16:40","modified_gmt":"2019-02-18T07:16:40","slug":"snapd-dirty-sock","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/snapd-dirty-sock.html","title":{"rendered":"Snapd \u88ab\u66dd \u83b7\u53d6Linux \u7cfb\u7edf root \u6743\u9650\u7684Dirty_Sock \u6f0f\u6d1e"},"content":{"rendered":"

Ubuntu \u548c\u5176\u5b83 Linux \u53d1\u884c\u7248\u672c\u88ab\u66dd\u4e25\u91cd\u7684\u6743\u9650\u63d0\u5347\u6f0f\u6d1e\uff0c\u53ef\u5bfc\u81f4\u672c\u5730\u653b\u51fb\u8005\u6216\u6076\u610f\u7a0b\u5e8f\u83b7\u53d6\u6839\u6743\u9650\u4ee5\u53ca\u5b8c\u5168\u63a7\u5236\u76ee\u6807\u7cfb\u7edf\u3002<\/p>\n

\u8fd9\u4e2a\u6f0f\u6d1e\u88ab\u547d\u540d\u4e3a \u201cDirty_Sock\u201d\uff0c\u7f16\u53f7\u4e3a CVE-2019-7304\uff0c\u662f\u7531\u5b89\u5168\u7814\u7a76\u5458 Chris Moberly \u5728\u4e0a\u4e2a\u6708\u6708\u672b\u53d1\u73b0\u5e76\u79c1\u4e0b\u544a\u77e5 Ubuntu \u5382\u5546 Canonical \u7684\u3002<\/p>\n

\u8be5\u6f0f\u6d1e\u5b58\u5728\u4e8e Linux \u901a\u7528\u6570\u636e\u5305\u7cfb\u7edf snapd \u670d\u52a1\u7684 REST API \u4e2d\uff0c\u5b83\u7684\u4f5c\u7528\u662f\u5728\u65e0\u9700\u4efb\u4f55\u4fee\u6539\u7684\u60c5\u51b5\u4e0b\u4f7f\u5e94\u7528\u7a0b\u5e8f\u548c\u591a\u79cd Linux \u53d1\u884c\u7248\u672c\u517c\u5bb9\u3002<\/p>\n

Snapd \u662f\u7531 Canonical \u6784\u5efa\u7684\uff0c\u9ed8\u8ba4\u5b89\u88c5\u5728\u6240\u6709\u7684 Ubuntu \u7248\u672c\u4e2d\uff0c\u4e14\u7531\u5176\u5b83 Linux \u7248\u672c\u4f7f\u7528\uff0c\u5305\u62ec Debian\u3001OpenSUSE\u3001Arch Linux\u3001Solus \u548c Fedora\u3002<\/p>\n

Snap \u5305\u57fa\u672c\u4e0a\u662f\u548c\u4f9d\u8d56\u5173\u7cfb\u538b\u7f29\u5728\u4e00\u8d77\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u5176\u4e2d\u5305\u62ec\u5173\u4e8e\u5728\u684c\u9762\u3001\u4e91\u548c\u7269\u8054\u7f51\u7684\u591a\u79cd Linux \u7cfb\u7edf\u4e0a\u5982\u4f55\u8fd0\u884c\u5e76\u548c\u5176\u5b83\u8f6f\u4ef6\u4ea4\u4e92\u7684\u6307\u4ee4\u3002<\/p>\n

Snap \u5728\u672c\u5730\u6258\u7ba1 web \u670d\u52a1\u5668 (UNIX_AF \u5957\u63a5\u5b57) \u4ee5\u63d0\u4f9b RESTful API \u5217\u8868\uff0c\u5e2e\u52a9\u8be5\u670d\u52a1\u5728\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u6267\u884c\u591a\u79cd\u52a8\u4f5c\u3002\u8fd9\u4e9b REST API \u5177\u6709\u4e3a\u5177\u4f53\u4efb\u52a1\u5b9a\u4e49\u7528\u6237\u7ea7\u522b\u6743\u9650\u7684\u8bbf\u95ee\u63a7\u5236\u3002\u67d0\u4e9b\u5f3a\u5927\u7684 API \u4ec5\u9002\u7528\u4e8e root \u7528\u6237\uff0c\u800c\u5176\u5b83 API \u53ef\u906d\u4f4e\u6743\u9650\u7528\u6237\u8bbf\u95ee\u3002<\/p>\n

Moberly \u6307\u51fa\uff0c\u8bbf\u95ee\u63a7\u5236\u673a\u5236\u67e5\u770b\u548c\u5411\u670d\u52a1\u5668\u63d0\u51fa\u8bf7\u6c42\u76f8\u5173\u7684 UID \u7684\u65b9\u5f0f\u4e2d\u5b58\u5728\u7f3a\u9677\uff0c\u53ef\u5bfc\u81f4\u653b\u51fb\u8005\u8986\u5199 UID \u53d8\u91cf\u5e76\u8bbf\u95ee\u4efb\u610f API \u51fd\u6570\uff0c\u5305\u62ec\u4ec5\u9650\u4e8e root \u7528\u6237\u7684\u51fd\u6570\u3002<\/p>\n

Ubuntu \u5728\u5b89\u5168\u516c\u544a\u4e2d\u89e3\u91ca\u79f0\uff0c\u201cSnapd \u7248\u672c 2.28 \u81f32.37 \u5728 UNIX \u5957\u63a5\u5b57\u4e0a\u6267\u884c\u8bbf\u95ee\u63a7\u5236\u65f6\u4e0d\u6b63\u786e\u5730\u9a8c\u8bc1\u5e76\u89e3\u6790\u8fdc\u7a0b\u5957\u63a5\u5b57\u5730\u5740\u3002\u672c\u5730\u653b\u51fb\u8005\u80fd\u591f\u501f\u6b64\u8bbf\u95ee\u9ad8\u6743\u9650\u5957\u63a5\u5b57 API \u5e76\u83b7\u53d6\u7ba1\u7406\u5458\u6743\u9650\u3002\u201d<\/p>\n

\u7136\u800c\uff0c\u5e94\u5f53\u6ce8\u610f\u7684\u662f\uff0c\u7531\u4e8e Dirty Sock \u5229\u7528\u4e86\u672c\u5730\u6743\u9650\u63d0\u5347\u7f3a\u9677\uff0c\u56e0\u6b64\u5b83\u4e0d\u5141\u8bb8\u653b\u51fb\u8005\u8fdc\u7a0b\u653b\u9677\u6613\u53d7\u653b\u51fb\u7684 Linux \u7cfb\u7edf\u3002<\/p>\n

Moberly \u8fd8\u5728 GitHub \u4e0a\u53d1\u5e03\u4e86 PoC\uff0c\u5176\u4e2d\u4e00\u4e2a\u8981\u6c42\u5728\u5176\u5b83 PoC \u80fd\u591f\u901a\u8fc7\u6ee5\u7528\u8be5 API \u4fa7\u52a0\u8f7d\u6076\u610f snap\u65f6\u8fdb\u884c SSH \u8fde\u63a5\u3002<\/p>\n

Canonical \u5df2\u53d1\u5e03 snapd \u7248\u672c Snapd 2.37.1 \u89e3\u51b3\u8be5\u6f0f\u6d1e\u95ee\u9898\uff0cUbuntu \u548c\u5176\u5b83\u4e3b\u8981 Linux\u53d1\u884c\u7248\u672c\u5df2\u7ecf\u63a8\u51fa\u6570\u636e\u5305\u4fee\u590d\u7248\u672c\u3002<\/p>\n

\u5f3a\u70c8\u5efa\u8bae Linux \u7528\u6237\u5c3d\u5feb\u5347\u7ea7\u6613\u53d7\u653b\u51fb\u7684\u7248\u672c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Ubuntu \u548c\u5176\u5b83 Linux \u53d1\u884c\u7248\u672c\u88ab\u66dd\u4e25\u91cd\u7684\u6743\u9650\u63d0\u5347\u6f0f\u6d1e\uff0c\u53ef\u5bfc\u81f4\u672c\u5730\u653b\u51fb\u8005\u6216\u6076\u610f\u7a0b\u5e8f\u83b7\u53d6\u6839\u6743\u9650\u4ee5\u53ca\u5b8c\u5168 […]<\/p>\n","protected":false},"author":1903,"featured_media":136457,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[21],"tags":[],"class_list":["post-136456","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\/136456","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\/1903"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=136456"}],"version-history":[{"count":2,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/136456\/revisions"}],"predecessor-version":[{"id":136650,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/136456\/revisions\/136650"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/136457"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=136456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=136456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=136456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}