{"id":69552,"date":"2024-05-03T10:34:13","date_gmt":"2024-05-03T02:34:13","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=69552"},"modified":"2024-05-03T10:34:13","modified_gmt":"2024-05-03T02:34:13","slug":"360-linux-samba","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/360-linux-samba.html","title":{"rendered":"Linux\u7248\u52d2\u7d22\u75c5\u6bd2\u6765\u88ad\uff0c\u667a\u80fd\u786c\u4ef6\u6613\u6210\u91cd\u707e\u533a\uff01"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u8086\u8650\u5168\u7403Windows\u8bbe\u5907\u7684\u201c\u6c38\u6052\u4e4b\u84dd\u201d\u52d2\u7d22\u75c5\u6bd2\u653b\u51fb\u4f59\u6ce2\u672a\u5e73\uff0c\u4e00\u4e2aLinux\u7248\u7684\u201c\u6c38\u6052\u4e4b\u84dd\u201d\u53c8\u51fa\u73b0\u4e86\u3002360\u5b98\u65b9\u535a\u5ba2\u7d27\u6025\u53d1\u5e03\u4e86Samba\u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\u8b66\u62a5(CVE-2017-7494)\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

Samba\u662f\u5728Linux\u548cUnix\u7cfb\u7edf\u4e0a\u5b9e\u73b0SMB\u534f\u8bae\u7684\u5f00\u6e90\u8f6f\u4ef6\uff0c\u6b63\u5e7f\u6cdb\u5e94\u7528\u5728Linux\u670d\u52a1\u5668\u3001NAS\u7f51\u7edc\u5b58\u50a8\u4ea7\u54c1\u4ee5\u53ca\u8def\u7531\u5668\u7b49\u5404\u79cdIoT\u667a\u80fd\u786c\u4ef6\u4e0a\u3002<\/p>\n

360\u65b9\u9762\u4ecb\u7ecd\uff0c\u4e0eWindows\u7248\u7684\u201c\u6c38\u6052\u4e4b\u84dd\u201d\u76f8\u6bd4\uff0cSamba\u6f0f\u6d1e\u76f8\u5bf9\u6bd4\u8f83\u7b80\u5355\u3001\u66f4\u5bb9\u6613\u88ab\u653b\u51fb\uff0c\u800c\u4e14\u540c\u6837\u5a01\u529b\u5de8\u5927\uff0c\u53ef\u4ee5\u8fdc\u7a0b\u6267\u884c\u4efb\u610f\u4ee3\u7801\u3002\u5176\u6f0f\u6d1e\u653b\u51fb\u5de5\u5177\u4e5f\u5df2\u5728\u7f51\u4e0a\u516c\u5f00\uff0c\u5f88\u53ef\u80fd\u88ab\u4e0d\u6cd5\u5206\u5b50\u6076\u610f\u5229\u7528\u3002<\/p>\n

\u5bf9\u666e\u901a\u4e2a\u4eba\u7528\u6237\u6765\u8bf4\uff0cSamba\u6f0f\u6d1e\u4f1a\u5bf9\u5404\u79cd\u5e38\u7528\u7684\u667a\u80fd\u786c\u4ef6\u9020\u6210\u4e25\u91cd\u5a01\u80c1\u3002\u4f8b\u5982\uff0c\u5168\u7403\u6d41\u884c\u7684\u8def\u7531\u5668\u5f00\u6e90\u56fa\u4ef6OpenWrt\u5c31\u53d7\u5230Samba\u6f0f\u6d1e\u5f71\u54cd\uff0c\u53ef\u80fd\u5bfc\u81f4\u8def\u7531\u5668\u88ab\u9ed1\u5ba2\u63a7\u5236\uff0c\u52ab\u6301\u6216\u76d1\u542c\u7f51\u7edc\u6d41\u91cf\uff0c\u751a\u81f3\u7ed9\u4e0a\u7f51\u8bbe\u5907\u690d\u5165\u6728\u9a6c\u3002\u6b64\u5916\uff0c\u5305\u62ec\u667a\u80fd\u7535\u89c6\u7b49\u8bbe\u5907\u4e2d\uff0cSamba\u6587\u4ef6\u5171\u4eab\u4e5f\u662f\u5e38\u7528\u7684\u670d\u52a1\u3002<\/p>\n

\u9488\u5bf9\u5404\u7c7b\u667a\u80fd\u786c\u4ef6\u7528\u6237\uff0c\u5efa\u8bae\u7528\u6237\u53ca\u65f6\u5173\u95ed\u8def\u7531\u5668\u3001\u667a\u80fd\u7535\u89c6\u7b49\u8bbe\u5907\u7684Samba\u6587\u4ef6\u5171\u4eab\u670d\u52a1\uff0c\u7b49\u5f85\u56fa\u4ef6\u8fdb\u884c\u5b89\u5168\u66f4\u65b0\u540e\u518d\u5f00\u542fSamba\u3002<\/p>\n

\u9488\u5bf9\u4f7f\u7528Samba\u7684\u670d\u52a1\u5668\u7ba1\u7406\u5458\uff0c360\u65b9\u9762\u4e5f\u63d0\u51fa\u4e86\u5b89\u5168\u66f4\u65b0\u5efa\u8bae\u3002<\/p>\n

\u6982\u8ff0<\/strong><\/div>\n

2017\u5e745\u670824\u65e5Samba\u53d1\u5e03\u4e864.6.4\u7248\u672c\uff0c\u4e2d\u95f4\u4fee\u590d\u4e86\u4e00\u4e2a\u4e25\u91cd\u7684\u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\uff0c\u6f0f\u6d1e\u7f16\u53f7CVE-2017-7494\uff0c\u6f0f\u6d1e\u5f71\u54cd\u4e86Samba 3.5.0 \u4e4b\u540e\u52304.6.4\/4.5.10\/4.4.14\u4e2d\u95f4\u7684\u6240\u6709\u7248\u672c\u3002360\u7f51\u7edc\u5b89\u5168\u4e2d\u5fc3 \u548c 360\u4fe1\u606f\u5b89\u5168\u90e8\u7684Gear Team\u7b2c\u4e00\u65f6\u95f4\u5bf9\u8be5\u6f0f\u6d1e\u8fdb\u884c\u4e86\u5206\u6790\uff0c\u786e\u8ba4\u5c5e\u4e8e\u4e25\u91cd\u6f0f\u6d1e\uff0c\u53ef\u4ee5\u9020\u6210\u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u3002<\/p>\n

\u6280\u672f\u5206\u6790<\/strong><\/div>\n

\u5982\u5b98\u65b9\u6240\u63cf\u8ff0\uff0c\u8be5\u6f0f\u6d1e\u53ea\u9700\u8981\u901a\u8fc7\u4e00\u4e2a\u53ef\u5199\u5165\u7684Samba\u7528\u6237\u6743\u9650\u5c31\u53ef\u4ee5\u63d0\u6743\u5230samba\u6240\u5728\u670d\u52a1\u5668\u7684root\u6743\u9650\uff08samba\u9ed8\u8ba4\u662froot\u7528\u6237\u6267\u884c\u7684\uff09\u3002<\/p>\n

\u4ecePatch\u6765\u770b\u7684\u8bdd\uff0cis_known_pipename\u51fd\u6570\u7684pipename\u4e2d\u5b58\u5728\u8def\u5f84\u7b26\u53f7\u4f1a\u6709\u95ee\u9898\uff1a<\/p>\n

\"\"<\/p>\n

\u518d\u5ef6\u4f38\u4e0bsmb_probe_module\u51fd\u6570\u4e2d\u5c31\u4f1a\u5f62\u6210\u516c\u544a\u91cc\u8bf4\u7684\u52a0\u8f7d\u653b\u51fb\u8005\u4e0a\u4f20\u7684dll\u6765\u4efb\u610f\u6267\u884c\u4ee3\u7801\u4e86\uff1a<\/p>\n

\"\"<\/p>\n

\u5177\u4f53\u653b\u51fb\u8fc7\u7a0b\uff1a<\/p>\n

    \n
  1. \u6784\u9020\u4e00\u4e2a\u6709\u2019\/\u2019 \u7b26\u53f7\u7684\u7ba1\u9053\u540d\u6216\u8def\u5f84\u540d\uff0c\u5982 \u201c\/home\/toor\/cyg07.so\u201d<\/li>\n
  2. \u901a\u8fc7smb\u7684\u534f\u8bae\u4e3b\u52a8\u8ba9\u670d\u52a1\u5668smb\u8fd4\u56de\u8be5FID<\/li>\n
  3. \u540e\u7eed\u76f4\u63a5\u8bf7\u6c42\u8fd9\u4e2aFID\u5c31\u8fdb\u5165\u4e0a\u9762\u6240\u8bf4\u7684\u6076\u610f\u6d41\u7a0b<\/li>\n<\/ol>\n

    \u5177\u4f53\u653b\u51fb\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n

    1.\u5c1d\u8bd5\u52a0\u8f7d\u3000\u201c\/home\/toor\/cyg07.so\u201d \u6076\u610fso<\/p>\n

    \"\"<\/p>\n

    2.\u5176\u4e2dso \u4ee3\u7801\u5982\u4e0b(\u52a0\u8f7d\u65f6\u4f1a\u8c03\u7528\u3000samba_init_module \u5bfc\u51fa\u51fd\u6570)<\/p>\n

    \"\"<\/p>\n

    3.\u6700\u540e\u6211\u4eec\u53ef\u4ee5\u5728\/tmp\/360sec\u4e2d\u770b\u5230\u5b9e\u9645\u7684\u6267\u884c\u6743\u9650(\u5e26root\u6743\u9650)<\/p>\n

    \"\"<\/p>\n

    \u89e3\u51b3\u65b9\u6848<\/strong><\/div>\n

    360\u7f51\u7edc\u5b89\u5168\u54cd\u5e94\u4e2d\u5fc3\u548c360\u4fe1\u606f\u5b89\u5168\u90e8\u5efa\u8bae\u4f7f\u7528\u53d7\u5f71\u54cd\u7248\u672c\u7684\u7528\u6237\u7acb\u5373\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u6765\u8fdb\u884c\u5b89\u5168\u66f4\u65b0\u64cd\u4f5c\uff0c<\/p>\n

      \n
    1. \u4f7f\u7528\u6e90\u7801\u5b89\u88c5\u7684Samba\u7528\u6237\uff0c\u8bf7\u5c3d\u5feb\u4e0b\u8f7d\u6700\u65b0\u7684Samba\u7248\u672c\u624b\u52a8\u66f4\u65b0\uff1b<\/li>\n
    2. \u4f7f\u7528\u4e8c\u8fdb\u5236\u5206\u53d1\u5305\uff08RPM\u7b49\u65b9\u5f0f\uff09\u7684\u7528\u6237\u7acb\u5373\u8fdb\u884cyum\uff0capt-get update\u7b49\u5b89\u5168\u66f4\u65b0\u64cd\u4f5c\uff1b<\/li>\n<\/ol>\n

      \u7f13\u89e3\u7b56\u7565\uff1a\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u5728smb.conf\u7684[global]\u8282\u70b9\u4e0b\u589e\u52a0\u3000nt pipe support = no \u9009\u9879\uff0c\u7136\u540e\u91cd\u65b0\u542f\u52a8samba\u670d\u52a1\uff0c \u4ee5\u6b64\u8fbe\u5230\u7f13\u89e3\u8be5\u6f0f\u6d1e\u7684\u6548\u679c\u3002<\/p>\n

      \u6f0f\u6d1e\u6765\u6e90\uff1aCVE-2017-7494.html:<\/strong><\/span><\/div>\n
      ====================================================================\r\n== Subject: \u00a0 \u00a0 Remote code execution from a writable share.\r\n==\r\n== CVE ID#: \u00a0 \u00a0 CVE-2017-7494\r\n==\r\n== Versions: \u00a0 \u00a0All versions of Samba from 3.5.0 onwards.\r\n==\r\n== Summary: \u00a0 \u00a0 Malicious clients can upload and cause the smbd server\r\n== \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0to execute a shared library from a writable share.\r\n==\r\n====================================================================\r\n\r\n===========\r\nDescription\r\n===========\r\n\r\nAll versions of Samba from 3.5.0 onwards are vulnerable to a remote\r\ncode execution vulnerability, allowing a malicious client to upload a\r\nshared library to a writable share, and then cause the server to load\r\nand execute it.\r\n\r\n==================\r\nPatch Availability\r\n==================\r\n\r\nA patch addressing this defect has been posted to\r\n\r\n \u00a0http:\/\/www.samba.org\/samba\/security\/\r\n\r\nAdditionally, Samba 4.6.4, 4.5.10 and 4.4.14 have been issued as\r\nsecurity releases to correct the defect. Patches against older Samba\r\nversions are available at http:\/\/samba.org\/samba\/patches\/. Samba\r\nvendors and administrators running affected versions are advised to\r\nupgrade or apply the patch as soon as possible.\r\n\r\n==========\r\nWorkaround\r\n==========\r\n\r\nAdd the parameter:\r\n\r\nnt pipe support = no\r\n\r\nto the [global] section of your smb.conf and restart smbd. This\r\nprevents clients from accessing any named pipe endpoints. Note this\r\ncan disable some expected functionality for Windows clients.\r\n\r\n=======\r\nCredits\r\n=======\r\n\r\nThis problem was found by steelo <knownsteelo@gmail.com>. Volker\r\nLendecke of SerNet and the Samba Team provided the fix.<\/pre>\n
      \n

      \u539f\u6587\u6765\u81ea\uff1ahttp:\/\/www.yunweipai.com\/archives\/18633.html<\/a><\/p>\n

      \u672c\u6587\u5730\u5740\uff1ahttp:\/\/lrxjmw.cn\/360-linux-samba.html<\/a>\u7f16\u8f91\u5458\uff1a\u90ed\u5efa\u9e4f\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

      \u8086\u8650\u5168\u7403Windows\u8bbe\u5907\u7684\u201c\u6c38\u6052\u4e4b\u84dd\u201d\u52d2\u7d22\u75c5\u6bd2\u653b\u51fb\u4f59\u6ce2\u672a\u5e73\uff0c\u4e00\u4e2aLinux\u7248\u7684\u201c\u6c38\u6052\u4e4b\u84dd\u201d\u53c8\u51fa\u73b0\u4e86\u3002<\/p>\n","protected":false},"author":323,"featured_media":94643,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[21],"tags":[],"class_list":["post-69552","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\/69552","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\/323"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=69552"}],"version-history":[{"count":5,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/69552\/revisions"}],"predecessor-version":[{"id":95082,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/69552\/revisions\/95082"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/94643"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=69552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=69552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=69552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}