{"id":4191,"date":"2020-01-07T00:35:03","date_gmt":"2020-01-06T16:35:03","guid":{"rendered":"http:\/\/www.menglanglang.cn\/?p=4191"},"modified":"2020-01-17T08:26:58","modified_gmt":"2020-01-17T00:26:58","slug":"%e4%b8%80%e6%96%87%e5%bd%bb%e5%ba%95%e6%98%8e%e7%99%bdlinux%e4%b8%ad%e7%9a%84selinux%e5%88%b0%e5%ba%95%e6%98%af%e4%bb%80%e4%b9%88","status":"publish","type":"post","link":"http:\/\/www.menglanglang.cn\/?p=4191","title":{"rendered":"\u4e00\u6587\u5f7b\u5e95\u660e\u767dlinux\u4e2d\u7684selinux\u5230\u5e95\u662f\u4ec0\u4e48"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/imgconvert.csdnimg.cn\/aHR0cDovL3AzLnBzdGF0cC5jb20vbGFyZ2UvNTk0YzAwMDFjZTI1ZDkzNDAyNTc?x-oss-process=image\/format,png\" alt=\"\u4e00\u6587\u5f7b\u5e95\u660e\u767dlinux\u4e2d\u7684selinux\u5230\u5e95\u662f\u4ec0\u4e48\"\/><\/figure>\n\n\n\n<p><strong>\u4e00\u3001\u524d\u8a00<\/strong><\/p>\n\n\n\n<p>\u5b89\u5168\u589e\u5f3a\u578b Linux\uff08Security-Enhanced Linux\uff09\u7b80\u79f0 SELinux\uff0c\u5b83\u662f\u4e00\u4e2a Linux \u5185\u6838\u6a21\u5757\uff0c\u4e5f\u662f Linux \u7684\u4e00\u4e2a\u5b89\u5168\u5b50\u7cfb\u7edf\u3002<\/p>\n\n\n\n<p>SELinux \u4e3b\u8981\u7531\u7f8e\u56fd\u56fd\u5bb6\u5b89\u5168\u5c40\u5f00\u53d1\u30022.6 \u53ca\u4ee5\u4e0a\u7248\u672c\u7684 Linux \u5185\u6838\u90fd\u5df2\u7ecf\u96c6\u6210\u4e86 SELinux \u6a21\u5757\u3002<\/p>\n\n\n\n<p>SELinux \u7684\u7ed3\u6784\u53ca\u914d\u7f6e\u975e\u5e38\u590d\u6742\uff0c\u800c\u4e14\u6709\u5927\u91cf\u6982\u5ff5\u6027\u7684\u4e1c\u897f\uff0c\u8981\u5b66\u7cbe\u96be\u5ea6\u8f83\u5927\u3002\u5f88\u591a Linux \u7cfb\u7edf\u7ba1\u7406\u5458\u5acc\u9ebb\u70e6\u90fd\u628a SELinux \u5173\u95ed\u4e86\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u53ef\u4ee5\u719f\u7ec3\u638c\u63e1 SELinux \u5e76\u6b63\u786e\u8fd0\u7528\uff0c\u6211\u89c9\u5f97\u6574\u4e2a\u7cfb\u7edf\u57fa\u672c\u4e0a\u53ef\u4ee5\u5230\u8fbe\"\u575a\u4e0d\u53ef\u6467\"\u7684\u5730\u6b65\u4e86\uff08\u8bf7\u6c38\u8fdc\u8bb0\u4f4f<strong>\u6ca1\u6709\u7edd\u5bf9\u7684\u5b89\u5168<\/strong>\uff09\u3002<\/p>\n\n\n\n<p>\u638c\u63e1 SELinux \u7684\u57fa\u672c\u6982\u5ff5\u4ee5\u53ca\u7b80\u5355\u7684\u914d\u7f6e\u65b9\u6cd5\u662f\u6bcf\u4e2a Linux \u7cfb\u7edf\u7ba1\u7406\u5458\u7684\u5fc5\u4fee\u8bfe\u3002<\/p>\n\n\n\n<p>\u672c\u6587\u5747\u5728&nbsp;<strong>CentOS 7.4.1708<\/strong>&nbsp;\u7cfb\u7edf\u4e2d\u64cd\u4f5c\u3002<\/p>\n\n\n\n<p>\u672c\u6587\u7eaf\u5c5e\u4e2a\u4eba\u5b66\u4e60\u7ecf\u9a8c\u5206\u4eab\u4ea4\u6d41\uff0c\u51fa\u9519\u518d\u6240\u96be\u514d\uff0c\u4ec5\u4f9b\u53c2\u8003\uff01\u5982\u679c\u53d1\u73b0\u9519\u8bef\u7684\u5730\u65b9\uff0c\u53ef\u4ee5\u7684\u8bdd\u9ebb\u70e6\u6307\u70b9\u4e0b\uff0c\u7279\u522b\u611f\u8c22\uff01<\/p>\n\n\n\n<p><strong>\u4e8c\u3001SELinux \u7684\u4f5c\u7528\u53ca\u6743\u9650\u7ba1\u7406\u673a\u5236<\/strong><\/p>\n\n\n\n<p><strong>2.1 SELinux \u7684\u4f5c\u7528<\/strong><\/p>\n\n\n\n<p>SELinux \u4e3b\u8981\u4f5c\u7528\u5c31\u662f<strong>\u6700\u5927\u9650\u5ea6\u5730\u51cf\u5c0f\u7cfb\u7edf\u4e2d\u670d\u52a1\u8fdb\u7a0b\u53ef\u8bbf\u95ee\u7684\u8d44\u6e90<\/strong>\uff08\u6700\u5c0f\u6743\u9650\u539f\u5219\uff09\u3002<\/p>\n\n\n\n<p>\u8bbe\u60f3\u4e00\u4e0b\uff0c\u5982\u679c\u4e00\u4e2a\u4ee5 root \u8eab\u4efd\u8fd0\u884c\u7684\u7f51\u7edc\u670d\u52a1\u5b58\u5728 0day \u6f0f\u6d1e\uff0c\u9ed1\u5ba2\u5c31\u53ef\u4ee5\u5229\u7528\u8fd9\u4e2a\u6f0f\u6d1e\uff0c<strong>\u4ee5 root \u7684\u8eab\u4efd\u5728\u60a8\u7684\u670d\u52a1\u5668\u4e0a\u4e3a\u6240\u6b32\u4e3a\u4e86<\/strong>\u3002\u662f\u4e0d\u662f\u5f88\u53ef\u6015\uff1f<\/p>\n\n\n\n<p>SELinux \u5c31\u662f\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u7684\u3002<\/p>\n\n\n\n<p><strong>2.2 DAC<\/strong><\/p>\n\n\n\n<p>\u5728\u6ca1\u6709\u4f7f\u7528 SELinux \u7684\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u51b3\u5b9a\u4e00\u4e2a\u8d44\u6e90\u662f\u5426\u80fd\u88ab\u8bbf\u95ee\u7684\u56e0\u7d20\u662f\uff1a<strong>\u67d0\u4e2a\u8d44\u6e90\u662f\u5426\u62e5\u6709\u5bf9\u5e94\u7528\u6237\u7684\u6743\u9650\uff08\u8bfb\u3001\u5199\u3001\u6267\u884c\uff09<\/strong>\u3002<\/p>\n\n\n\n<p>\u53ea\u8981\u8bbf\u95ee\u8fd9\u4e2a\u8d44\u6e90\u7684\u8fdb\u7a0b\u7b26\u5408\u4ee5\u4e0a\u7684\u6761\u4ef6\u5c31\u53ef\u4ee5\u88ab\u8bbf\u95ee\u3002<\/p>\n\n\n\n<p>\u800c\u6700\u81f4\u547d\u95ee\u9898\u662f\uff0c<strong>root \u7528\u6237\u4e0d\u53d7\u4efb\u4f55\u7ba1\u5236<\/strong>\uff0c\u7cfb\u7edf\u4e0a\u4efb\u4f55\u8d44\u6e90\u90fd\u53ef\u4ee5\u65e0\u9650\u5236\u5730\u8bbf\u95ee\u3002<\/p>\n\n\n\n<p>\u8fd9\u79cd\u6743\u9650\u7ba1\u7406\u673a\u5236\u7684\u4e3b\u4f53\u662f<strong>\u7528\u6237<\/strong>\uff0c\u4e5f\u79f0\u4e3a<strong>\u81ea\u4e3b\u8bbf\u95ee\u63a7\u5236\uff08DAC\uff09<\/strong>\u3002<\/p>\n\n\n\n<p><strong>2.3 MAC<\/strong><\/p>\n\n\n\n<p>\u5728\u4f7f\u7528\u4e86 SELinux \u7684\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u51b3\u5b9a\u4e00\u4e2a\u8d44\u6e90\u662f\u5426\u80fd\u88ab\u8bbf\u95ee\u7684\u56e0\u7d20\u9664\u4e86\u4e0a\u8ff0\u56e0\u7d20\u4e4b\u5916\uff0c\u8fd8\u9700\u8981\u5224\u65ad<strong>\u6bcf\u4e00\u7c7b\u8fdb\u7a0b\u662f\u5426\u62e5\u6709\u5bf9\u67d0\u4e00\u7c7b\u8d44\u6e90\u7684\u8bbf\u95ee\u6743\u9650<\/strong>\u3002<\/p>\n\n\n\n<p>\u8fd9\u6837\u4e00\u6765\uff0c\u5373\u4f7f\u8fdb\u7a0b\u662f\u4ee5 root \u8eab\u4efd\u8fd0\u884c\u7684\uff0c\u4e5f\u9700\u8981\u5224\u65ad\u8fd9\u4e2a\u8fdb\u7a0b\u7684\u7c7b\u578b\u4ee5\u53ca\u5141\u8bb8\u8bbf\u95ee\u7684\u8d44\u6e90\u7c7b\u578b\u624d\u80fd\u51b3\u5b9a\u662f\u5426\u5141\u8bb8\u8bbf\u95ee\u67d0\u4e2a\u8d44\u6e90\u3002\u8fdb\u7a0b\u7684\u6d3b\u52a8\u7a7a\u95f4\u4e5f\u53ef\u4ee5\u88ab\u538b\u7f29\u5230\u6700\u5c0f\u3002<\/p>\n\n\n\n<p>\u5373\u4f7f\u662f\u4ee5 root \u8eab\u4efd\u8fd0\u884c\u7684\u670d\u52a1\u8fdb\u7a0b\uff0c\u4e00\u822c\u4e5f\u53ea\u80fd\u8bbf\u95ee\u5230\u5b83\u6240\u9700\u8981\u7684\u8d44\u6e90\u3002\u5373\u4f7f\u7a0b\u5e8f\u51fa\u4e86\u6f0f\u6d1e\uff0c\u5f71\u54cd\u8303\u56f4\u4e5f\u53ea\u6709\u5728\u5176\u5141\u8bb8\u8bbf\u95ee\u7684\u8d44\u6e90\u8303\u56f4\u5185\u3002\u5b89\u5168\u6027\u5927\u5927\u589e\u52a0\u3002<\/p>\n\n\n\n<p>\u8fd9\u79cd\u6743\u9650\u7ba1\u7406\u673a\u5236\u7684\u4e3b\u4f53\u662f<strong>\u8fdb\u7a0b<\/strong>\uff0c\u4e5f\u79f0\u4e3a<strong>\u5f3a\u5236\u8bbf\u95ee\u63a7\u5236\uff08MAC\uff09<\/strong>\u3002<\/p>\n\n\n\n<p>\u800c MAC \u53c8\u7ec6\u5206\u4e3a\u4e86\u4e24\u79cd\u65b9\u5f0f\uff0c\u4e00\u79cd\u53eb<strong>\u7c7b\u522b\u5b89\u5168\uff08MCS\uff09\u6a21\u5f0f<\/strong>\uff0c\u53e6\u4e00\u79cd\u53eb<strong>\u591a\u7ea7\u5b89\u5168\uff08MLS\uff09\u6a21\u5f0f<\/strong>\u3002<\/p>\n\n\n\n<p>\u4e0b\u6587\u4e2d\u7684\u64cd\u4f5c\u5747\u4e3a&nbsp;<strong>MCS<\/strong>&nbsp;\u6a21\u5f0f\u3002<\/p>\n\n\n\n<p><strong>2.4 DAC \u548c MAC \u7684\u5bf9\u6bd4<\/strong><\/p>\n\n\n\n<p>\u8fd9\u91cc\u5f15\u7528\u4e00\u5f20\u56fe\u7247\u6765\u8bf4\u660e\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/imgconvert.csdnimg.cn\/aHR0cDovL3AzLnBzdGF0cC5jb20vbGFyZ2UvNWIzZjAwMDFiMDllYzg1NGU3NWE?x-oss-process=image\/format,png\" alt=\"\u4e00\u6587\u5f7b\u5e95\u660e\u767dlinux\u4e2d\u7684selinux\u5230\u5e95\u662f\u4ec0\u4e48\"\/><\/figure>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u5728 DAC \u6a21\u5f0f\u4e0b\uff0c\u53ea\u8981\u76f8\u5e94\u76ee\u5f55\u6709\u76f8\u5e94\u7528\u6237\u7684\u6743\u9650\uff0c\u5c31\u53ef\u4ee5\u88ab\u8bbf\u95ee\u3002\u800c\u5728 MAC \u6a21\u5f0f\u4e0b\uff0c\u8fd8\u8981\u53d7\u8fdb\u7a0b\u5141\u8bb8\u8bbf\u95ee\u76ee\u5f55\u8303\u56f4\u7684\u9650\u5236\u3002<\/p>\n\n\n\n<p><strong>\u4e09\u3001SELinux \u57fa\u672c\u6982\u5ff5<\/strong><\/p>\n\n\n\n<p><strong>3.1 \u4e3b\u4f53\uff08Subject\uff09<\/strong><\/p>\n\n\n\n<p>\u53ef\u4ee5\u5b8c\u5168\u7b49\u540c\u4e8e<strong>\u8fdb\u7a0b<\/strong>\u3002<\/p>\n\n\n\n<p>\u6ce8\uff1a\u4e3a\u4e86\u65b9\u4fbf\u7406\u89e3\uff0c\u5982\u65e0\u7279\u522b\u8bf4\u660e\uff0c\u4ee5\u4e0b\u5747\u628a<strong>\u8fdb\u7a0b<\/strong>\u89c6\u4e3a\u4e3b\u4f53\u3002<\/p>\n\n\n\n<p><strong>3.2 \u5bf9\u8c61\uff08Object\uff09<\/strong><\/p>\n\n\n\n<p>\u88ab\u4e3b\u4f53\u8bbf\u95ee\u7684<strong>\u8d44\u6e90<\/strong>\u3002\u53ef\u4ee5\u662f\u6587\u4ef6\u3001\u76ee\u5f55\u3001\u7aef\u53e3\u3001\u8bbe\u5907\u7b49\u3002<\/p>\n\n\n\n<p>\u6ce8\uff1a\u4e3a\u4e86\u65b9\u4fbf\u7406\u89e3\uff0c\u5982\u65e0\u7279\u522b\u8bf4\u660e\uff0c\u4ee5\u4e0b\u5747\u628a<strong>\u6587\u4ef6\u6216\u8005\u76ee\u5f55<\/strong>\u89c6\u4e3a\u5bf9\u8c61\u3002<\/p>\n\n\n\n<p><strong>3.3 \u653f\u7b56\u548c\u89c4\u5219\uff08Policy &amp; Rule\uff09<\/strong><\/p>\n\n\n\n<p>\u7cfb\u7edf\u4e2d\u901a\u5e38\u6709\u5927\u91cf\u7684\u6587\u4ef6\u548c\u8fdb\u7a0b\uff0c\u4e3a\u4e86\u8282\u7701\u65f6\u95f4\u548c\u5f00\u9500\uff0c\u901a\u5e38\u6211\u4eec\u53ea\u662f<strong>\u9009\u62e9\u6027<\/strong>\u5730\u5bf9\u67d0\u4e9b\u8fdb\u7a0b\u8fdb\u884c\u7ba1\u5236\u3002<\/p>\n\n\n\n<p>\u800c\u54ea\u4e9b\u8fdb\u7a0b\u9700\u8981\u7ba1\u5236\u3001\u8981\u600e\u4e48\u7ba1\u5236\u662f\u7531\u653f\u7b56\u51b3\u5b9a\u7684\u3002<\/p>\n\n\n\n<p>\u4e00\u5957\u653f\u7b56\u91cc\u9762\u6709\u591a\u4e2a\u89c4\u5219\u3002\u90e8\u5206\u89c4\u5219\u53ef\u4ee5\u6309\u7167\u9700\u6c42\u542f\u7528\u6216\u7981\u7528\uff08\u4ee5\u4e0b\u628a\u8be5\u7c7b\u578b\u7684\u89c4\u5219\u79f0\u4e3a<strong>\u5e03\u5c14\u578b<\/strong>\u89c4\u5219\uff09\u3002<\/p>\n\n\n\n<p>\u89c4\u5219\u662f<strong>\u6a21\u5757\u5316\u3001\u53ef\u6269\u5c55<\/strong>\u7684\u3002\u5728\u5b89\u88c5\u65b0\u7684\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u5e94\u7528\u7a0b\u5e8f\u53ef\u901a\u8fc7\u6dfb\u52a0\u65b0\u7684\u6a21\u5757\u6765\u6dfb\u52a0\u89c4\u5219\u3002\u7528\u6237\u4e5f\u53ef\u4ee5\u624b\u52a8\u5730\u589e\u51cf\u89c4\u5219\u3002<\/p>\n\n\n\n<p>\u5728 CentOS 7 \u7cfb\u7edf\u4e2d\uff0c\u6709\u4e09\u5957\u653f\u7b56\uff0c\u5206\u522b\u662f\uff1a<\/p>\n\n\n\n<p>1. targeted\uff1a\u5bf9\u5927\u90e8\u5206\u7f51\u7edc\u670d\u52a1\u8fdb\u7a0b\u8fdb\u884c\u7ba1\u5236\u3002\u8fd9\u662f\u7cfb\u7edf<strong>\u9ed8\u8ba4\u4f7f\u7528<\/strong>\u7684\u653f\u7b56\uff08\u4e0b\u6587\u5747\u4f7f\u7528\u6b64\u653f\u7b56\uff09\u3002<\/p>\n\n\n\n<p>2. minimum\uff1a\u4ee5 targeted \u4e3a\u57fa\u7840\uff0c\u4ec5\u5bf9\u9009\u5b9a\u7684\u7f51\u7edc\u670d\u52a1\u8fdb\u7a0b\u8fdb\u884c\u7ba1\u5236\u3002\u4e00\u822c\u4e0d\u7528\u3002<\/p>\n\n\n\n<p>3. mls\uff1a\u591a\u7ea7\u5b89\u5168\u4fdd\u62a4\u3002\u5bf9\u6240\u6709\u7684\u8fdb\u7a0b\u8fdb\u884c\u7ba1\u5236\u3002\u8fd9\u662f\u6700\u4e25\u683c\u7684\u653f\u7b56\uff0c\u914d\u7f6e\u96be\u5ea6\u975e\u5e38\u5927\u3002\u4e00\u822c\u4e0d\u7528\uff0c\u9664\u975e\u5bf9\u5b89\u5168\u6027\u6709\u6781\u9ad8\u7684\u8981\u6c42\u3002<\/p>\n\n\n\n<p>\u653f\u7b56\u53ef\u4ee5\u5728 \/etc\/selinux\/config \u4e2d\u8bbe\u5b9a\u3002<\/p>\n\n\n\n<p><strong>3.4 \u5b89\u5168\u4e0a\u4e0b\u6587\uff08Security Context\uff09<\/strong><\/p>\n\n\n\n<p>\u5b89\u5168\u4e0a\u4e0b\u6587\u662f SELinux \u7684<strong>\u6838\u5fc3<\/strong>\u3002<\/p>\n\n\n\n<p>\u5b89\u5168\u4e0a\u4e0b\u6587\u6211\u81ea\u5df1\u628a\u5b83\u5206\u4e3a\u300c\u8fdb\u7a0b\u5b89\u5168\u4e0a\u4e0b\u6587\u300d\u548c\u300c\u6587\u4ef6\u5b89\u5168\u4e0a\u4e0b\u6587\u300d\u3002<\/p>\n\n\n\n<p><strong>\u4e00\u4e2a<\/strong>\u300c\u8fdb\u7a0b\u5b89\u5168\u4e0a\u4e0b\u6587\u300d\u4e00\u822c\u5bf9\u5e94<strong>\u591a\u4e2a<\/strong>\u300c\u6587\u4ef6\u5b89\u5168\u4e0a\u4e0b\u6587\u300d\u3002<\/p>\n\n\n\n<p><strong>\u53ea\u6709\u4e24\u8005\u7684\u5b89\u5168\u4e0a\u4e0b\u6587\u5bf9\u5e94\u4e0a\u4e86\uff0c\u8fdb\u7a0b\u624d\u80fd\u8bbf\u95ee\u6587\u4ef6\u3002<\/strong>\u5b83\u4eec\u7684\u5bf9\u5e94\u5173\u7cfb\u7531\u653f\u7b56\u4e2d\u7684\u89c4\u5219\u51b3\u5b9a\u3002<\/p>\n\n\n\n<p>\u6587\u4ef6\u5b89\u5168\u4e0a\u4e0b\u6587\u7531<strong>\u6587\u4ef6\u521b\u5efa\u7684\u4f4d\u7f6e\u548c\u521b\u5efa\u6587\u4ef6\u7684\u8fdb\u7a0b\u6240\u51b3\u5b9a<\/strong>\u3002\u800c\u4e14\u7cfb\u7edf\u6709\u4e00\u5957\u9ed8\u8ba4\u503c\uff0c\u7528\u6237\u4e5f\u53ef\u4ee5\u5bf9\u9ed8\u8ba4\u503c\u8fdb\u884c\u8bbe\u5b9a\u3002<\/p>\n\n\n\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5355\u7eaf\u7684<strong>\u79fb\u52a8\u6587\u4ef6<\/strong>\u64cd\u4f5c\u5e76<strong>\u4e0d\u4f1a<\/strong>\u6539\u53d8\u6587\u4ef6\u7684\u5b89\u5168\u4e0a\u4e0b\u6587\u3002<\/p>\n\n\n\n<p><strong>\u5b89\u5168\u4e0a\u4e0b\u6587\u7684\u7ed3\u6784\u53ca\u542b\u4e49<\/strong><\/p>\n\n\n\n<p>\u5b89\u5168\u4e0a\u4e0b\u6587\u6709\u56db\u4e2a\u5b57\u6bb5\uff0c\u5206\u522b\u7528\u5192\u53f7\u9694\u5f00\u3002\u5f62\u5982\uff1asystem_u:object_r:admin_home_t:s0\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/imgconvert.csdnimg.cn\/aHR0cDovL3AxLnBzdGF0cC5jb20vbGFyZ2UvNWI0MTAwMDE0YTdiZDdjZjM2NjI?x-oss-process=image\/format,png\" alt=\"\u4e00\u6587\u5f7b\u5e95\u660e\u767dlinux\u4e2d\u7684selinux\u5230\u5e95\u662f\u4ec0\u4e48\"\/><\/figure>\n\n\n\n<p><strong>3.5 SELinux \u7684\u5de5\u4f5c\u6a21\u5f0f<\/strong><\/p>\n\n\n\n<p>SELinux \u6709\u4e09\u79cd\u5de5\u4f5c\u6a21\u5f0f\uff0c\u5206\u522b\u662f\uff1a<\/p>\n\n\n\n<p>1. enforcing\uff1a\u5f3a\u5236\u6a21\u5f0f\u3002\u8fdd\u53cd SELinux \u89c4\u5219\u7684\u884c\u4e3a\u5c06\u88ab<strong>\u963b\u6b62<\/strong>\u5e76<strong>\u8bb0\u5f55\u5230\u65e5\u5fd7\u4e2d<\/strong>\u3002<\/p>\n\n\n\n<p>2. permissive\uff1a\u5bbd\u5bb9\u6a21\u5f0f\u3002\u8fdd\u53cd SELinux \u89c4\u5219\u7684\u884c\u4e3a\u53ea\u4f1a<strong>\u8bb0\u5f55\u5230\u65e5\u5fd7\u4e2d<\/strong>\u3002\u4e00\u822c\u4e3a\u8c03\u8bd5\u7528\u3002<\/p>\n\n\n\n<p>3. disabled\uff1a\u5173\u95ed SELinux\u3002<\/p>\n\n\n\n<p>SELinux \u5de5\u4f5c\u6a21\u5f0f\u53ef\u4ee5\u5728 \/etc\/selinux\/config \u4e2d\u8bbe\u5b9a\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60f3\u4ece disabled \u5207\u6362\u5230 enforcing \u6216\u8005 permissive \u7684\u8bdd\uff0c\u9700\u8981<strong>\u91cd\u542f\u7cfb\u7edf<\/strong>\u3002\u53cd\u8fc7\u6765\u4e5f\u4e00\u6837\u3002<\/p>\n\n\n\n<p>enforcing \u548c permissive \u6a21\u5f0f\u53ef\u4ee5\u901a\u8fc7 setenforce 1|0 \u547d\u4ee4\u5feb\u901f\u5207\u6362\u3002<\/p>\n\n\n\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5982\u679c\u7cfb\u7edf\u5df2\u7ecf\u5728\u5173\u95ed SELinux \u7684\u72b6\u6001\u4e0b\u8fd0\u884c\u4e86\u4e00\u6bb5\u65f6\u95f4\uff0c\u5728\u6253\u5f00 SELinux \u4e4b\u540e\u7684\u7b2c\u4e00\u6b21\u91cd\u542f\u901f\u5ea6\u53ef\u80fd\u4f1a\u6bd4\u8f83\u6162\u3002\u56e0\u4e3a\u7cfb\u7edf\u5fc5\u987b\u4e3a\u78c1\u76d8\u4e2d\u7684\u6587\u4ef6<strong>\u521b\u5efa\u5b89\u5168\u4e0a\u4e0b\u6587<\/strong>\uff08\u6211\u8868\u793a\u6211\u91cd\u542f\u4e86\u5927\u7ea6 10 \u5206\u949f\uff0c\u8fd8\u4ee5\u4e3a\u662f\u6b7b\u673a\u4e86\u2026\u2026\uff09\u3002<\/p>\n\n\n\n<p>SELinux \u65e5\u5fd7\u7684\u8bb0\u5f55\u9700\u8981\u501f\u52a9 auditd.service \u8fd9\u4e2a\u670d\u52a1\uff0c\u8bf7<strong>\u4e0d\u8981\u7981\u7528<\/strong>\u5b83\u3002<\/p>\n\n\n\n<p><strong>3.6 SELinux \u5de5\u4f5c\u6d41\u7a0b<\/strong><\/p>\n\n\n\n<p>\u8fd9\u91cc\u5f15\u7528\u4e00\u5f20\u56fe\u7247\uff0c\u4e0d\u5fc5\u8fc7\u591a\u89e3\u91ca\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/imgconvert.csdnimg.cn\/aHR0cDovL3AxLnBzdGF0cC5jb20vbGFyZ2UvNWI0MTAwMDE0YTdjNTE1MDk3ODY?x-oss-process=image\/format,png\" alt=\"\u4e00\u6587\u5f7b\u5e95\u660e\u767dlinux\u4e2d\u7684selinux\u5230\u5e95\u662f\u4ec0\u4e48\"\/><\/figure>\n\n\n\n<p>\u6ce8\uff1a\u4e0a\u9762\u7684<strong>\u5b89\u5168\u6587\u672c<\/strong>\u6307\u7684\u5c31\u662f<strong>\u5b89\u5168\u4e0a\u4e0b\u6587<\/strong>\u3002<\/p>\n\n\n\n<p><strong>\u56db\u3001SELinux \u57fa\u672c\u64cd\u4f5c<\/strong><\/p>\n\n\n\n<p><strong>4.1 \u67e5\u8be2\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u5b89\u5168\u4e0a\u4e0b\u6587<\/strong><\/p>\n\n\n\n<p><strong>\u547d\u4ee4\u57fa\u672c\u7528\u6cd5<\/strong><\/p>\n\n\n\n<p>ls -Z &lt;\u6587\u4ef6\u6216\u76ee\u5f55&gt;<\/p>\n\n\n\n<p><strong>\u7528\u6cd5\u4e3e\u4f8b<\/strong><\/p>\n\n\n\n<p>\u67e5\u8be2 \/etc\/hosts \u7684\u5b89\u5168\u4e0a\u4e0b\u6587\u3002<\/p>\n\n\n\n<p>ls -Z \/etc\/hosts<\/p>\n\n\n\n<p><strong>\u6267\u884c\u7ed3\u679c<\/strong><\/p>\n\n\n\n<p>-rw-r--r--. root root system_u:object_r:net_conf_t:s0 \/etc\/hosts<\/p>\n\n\n\n<p><strong>4.2 \u67e5\u8be2\u8fdb\u7a0b\u7684\u5b89\u5168\u4e0a\u4e0b\u6587<\/strong><\/p>\n\n\n\n<p><strong>\u547d\u4ee4\u57fa\u672c\u7528\u6cd5<\/strong><\/p>\n\n\n\n<p>ps auxZ | grep -v grep | grep &lt;\u8fdb\u7a0b\u540d&gt;<\/p>\n\n\n\n<p><strong>\u7528\u6cd5\u4e3e\u4f8b<\/strong><\/p>\n\n\n\n<p>\u67e5\u8be2 Nginx \u76f8\u5173\u8fdb\u7a0b\u7684\u5b89\u5168\u4e0a\u4e0b\u6587\u3002<\/p>\n\n\n\n<p>ps auxZ | grep -v grep | grep nginx<\/p>\n\n\n\n<p><strong>\u6267\u884c\u7ed3\u679c<\/strong><\/p>\n\n\n\n<p>system_u:system_r:httpd_t:s0 root 7997 0.0 0.0 122784 2156 ? Ss 14:31 0:00 nginx: master process \/usr\/sbin\/nginx<\/p>\n\n\n\n<p>system_u:system_r:httpd_t:s0 nginx 7998 0.0 0.0 125332 7560 ? S 14:31 0:00 nginx: worker process<\/p>\n\n\n\n<p><strong>4.3 \u624b\u52a8\u4fee\u6539\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u5b89\u5168\u4e0a\u4e0b\u6587<\/strong><\/p>\n\n\n\n<p><strong>\u547d\u4ee4\u57fa\u672c\u7528\u6cd5<\/strong><\/p>\n\n\n\n<p>chcon &lt;\u9009\u9879&gt; &lt;\u6587\u4ef6\u6216\u76ee\u5f55 1&gt; [&lt;\u6587\u4ef6\u6216\u76ee\u5f55 2&gt;...]<\/p>\n\n\n\n<p><strong>\u9009\u9879\u529f\u80fd<\/strong>-u &lt;\u503c&gt;\u4fee\u6539\u5b89\u5168\u4e0a\u4e0b\u6587\u7684\u7528\u6237\u5b57\u6bb5-r &lt;\u503c&gt;\u4fee\u6539\u5b89\u5168\u4e0a\u4e0b\u6587\u7684\u89d2\u8272\u5b57\u6bb5-t &lt;\u503c&gt;\u4fee\u6539\u5b89\u5168\u4e0a\u4e0b\u6587\u7684\u7c7b\u578b\u5b57\u6bb5-l &lt;\u503c&gt;\u4fee\u6539\u5b89\u5168\u4e0a\u4e0b\u6587\u7684\u7ea7\u522b\u5b57\u6bb5--reference &lt;\u6587\u4ef6\u6216\u76ee\u5f55&gt;\u4fee\u6539\u4e0e\u6307\u5b9a\u6587\u4ef6\u6216\u76ee\u5f55\u76f8\u4e00\u81f4\u7684\u5b89\u5168\u4e0a\u4e0b\u6587-R\u9012\u5f52\u64cd\u4f5c-h\u4fee\u6539\u8f6f\u94fe\u63a5\u7684\u5b89\u5168\u4e0a\u4e0b\u6587\uff08\u4e0d\u52a0\u6b64\u9009\u9879\u5219\u4fee\u6539\u8f6f\u94fe\u63a5\u5bf9\u5e94\u6587\u4ef6\uff09<\/p>\n\n\n\n<p><strong>\u7528\u6cd5\u4e3e\u4f8b<\/strong><\/p>\n\n\n\n<p>\u4fee\u6539 test \u7684\u5b89\u5168\u4e0a\u4e0b\u6587\u4e3a aaa_u:bbb_r:ccc_t:s0\u3002<\/p>\n\n\n\n<p>chcon -u aaa_u -r bbb_r -t ccc_t test<\/p>\n\n\n\n<p><strong>4.4 \u628a\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u5b89\u5168\u4e0a\u4e0b\u6587\u6062\u590d\u5230\u9ed8\u8ba4\u503c<\/strong><\/p>\n\n\n\n<p><strong>\u547d\u4ee4\u57fa\u672c\u7528\u6cd5<\/strong><\/p>\n\n\n\n<p>restorecon [\u9009\u9879] &lt;\u6587\u4ef6\u6216\u76ee\u5f55 1&gt; [&lt;\u6587\u4ef6\u6216\u76ee\u5f55 2&gt;...]<\/p>\n\n\n\n<p><strong>\u9009\u9879\u529f\u80fd<\/strong>-v\u6253\u5370\u64cd\u4f5c\u8fc7\u7a0b-R\u9012\u5f52\u64cd\u4f5c<\/p>\n\n\n\n<p><strong>\u7528\u6cd5\u4e3e\u4f8b<\/strong><\/p>\n\n\n\n<p>\u6dfb\u52a0\u4e00\u4e9b\u7f51\u9875\u6587\u4ef6\u5230 Nginx \u670d\u52a1\u5668\u7684\u76ee\u5f55\u4e4b\u540e\uff0c\u4e3a\u8fd9\u4e9b\u65b0\u6587\u4ef6\u8bbe\u7f6e\u6b63\u786e\u7684\u5b89\u5168\u4e0a\u4e0b\u6587\u3002<\/p>\n\n\n\n<p>restorecon -R \/usr\/share\/nginx\/html\/<\/p>\n\n\n\n<p><strong>4.5 \u67e5\u8be2\u7cfb\u7edf\u4e2d\u7684\u5e03\u5c14\u578b\u89c4\u5219\u53ca\u5176\u72b6\u6001<\/strong><\/p>\n\n\n\n<p><strong>\u547d\u4ee4\u57fa\u672c\u7528\u6cd5<\/strong><\/p>\n\n\n\n<p>getsebool -a<\/p>\n\n\n\n<p>\u7531\u4e8e\u8be5\u547d\u4ee4\u8981\u4e48<strong>\u67e5\u8be2\u6240\u6709\u89c4\u5219<\/strong>\uff0c\u8981\u4e48<strong>\u53ea\u67e5\u8be2\u4e00\u4e2a\u89c4\u5219<\/strong>\uff0c\u6240\u4ee5\u4e00\u822c\u90fd\u662f\u5148\u67e5\u8be2\u6240\u6709\u89c4\u5219\u7136\u540e\u7528 grep \u7b5b\u9009\u3002<\/p>\n\n\n\n<p><strong>\u7528\u6cd5\u4e3e\u4f8b<\/strong><\/p>\n\n\n\n<p>\u67e5\u8be2\u4e0e httpd \u6709\u5173\u7684\u5e03\u5c14\u578b\u89c4\u5219\u3002<\/p>\n\n\n\n<p>getsebool -a | grep httpd<\/p>\n\n\n\n<p><strong>\u6267\u884c\u7ed3\u679c<\/strong><\/p>\n\n\n\n<p>httpd_anon_write --&gt; off<\/p>\n\n\n\n<p>httpd_builtin_scripting --&gt; on<\/p>\n\n\n\n<p>httpd_can_check_spam --&gt; off<\/p>\n\n\n\n<p>httpd_can_connect_ftp --&gt; off<\/p>\n\n\n\n<p>#\u4ee5\u4e0b\u7701\u7565<\/p>\n\n\n\n<p><strong>4.6 \u5f00\u5173\u4e00\u4e2a\u5e03\u5c14\u578b\u89c4\u5219<\/strong><\/p>\n\n\n\n<p><strong>\u547d\u4ee4\u57fa\u672c\u7528\u6cd5<\/strong><\/p>\n\n\n\n<p>setsebool [\u9009\u9879] &lt;\u89c4\u5219\u540d\u79f0&gt; &lt;on|off&gt;<\/p>\n\n\n\n<p><strong>\u9009\u9879\u529f\u80fd<\/strong>-P\u91cd\u542f\u4f9d\u7136\u751f\u6548<\/p>\n\n\n\n<p><strong>\u7528\u6cd5\u4e3e\u4f8b<\/strong><\/p>\n\n\n\n<p>\u5f00\u542f httpd_anon_write \u89c4\u5219\u3002<\/p>\n\n\n\n<p>setsebool -P httpd_anon_write on<\/p>\n\n\n\n<p><strong>4.7 \u6dfb\u52a0\u76ee\u5f55\u7684\u9ed8\u8ba4\u5b89\u5168\u4e0a\u4e0b\u6587<\/strong><\/p>\n\n\n\n<p><strong>\u547d\u4ee4\u57fa\u672c\u7528\u6cd5<\/strong><\/p>\n\n\n\n<p>semanage fcontext -a -t &lt;\u6587\u4ef6\u5b89\u5168\u4e0a\u4e0b\u6587\u4e2d\u7684\u7c7b\u578b\u5b57\u6bb5&gt; \"&lt;\u76ee\u5f55\uff08\u540e\u9762\u4e0d\u52a0\u659c\u6760\uff09&gt;(\/.*)?\"<\/p>\n\n\n\n<p>\u6ce8\uff1a\u76ee\u5f55\u6216\u6587\u4ef6\u7684\u9ed8\u8ba4\u5b89\u5168\u4e0a\u4e0b\u6587\u53ef\u4ee5\u901a\u8fc7 semanage fcontext -l \u547d\u4ee4\u914d\u5408 grep\u8fc7\u6ee4\u67e5\u770b\u3002<\/p>\n\n\n\n<p><strong>\u7528\u6cd5\u4e3e\u4f8b<\/strong><\/p>\n\n\n\n<p>\u4e3a Nginx \u65b0\u589e\u4e00\u4e2a\u7f51\u7ad9\u76ee\u5f55 \/usr\/share\/nginx\/html2 \u4e4b\u540e\uff0c\u9700\u8981\u4e3a\u5176\u8bbe\u7f6e\u4e0e\u539f\u76ee\u5f55\u76f8\u540c\u7684\u9ed8\u8ba4\u5b89\u5168\u4e0a\u4e0b\u6587\u3002<\/p>\n\n\n\n<p>semanage fcontext -a -t httpd_sys_content_t \"\/usr\/share\/nginx\/html2(\/.*)?\"<\/p>\n\n\n\n<p><strong>4.8 \u6dfb\u52a0\u67d0\u7c7b\u8fdb\u7a0b\u5141\u8bb8\u8bbf\u95ee\u7684\u7aef\u53e3<\/strong><\/p>\n\n\n\n<p><strong>\u547d\u4ee4\u57fa\u672c\u7528\u6cd5<\/strong><\/p>\n\n\n\n<p>semanage port -a -t &lt;\u670d\u52a1\u7c7b\u578b&gt; -p &lt;\u534f\u8bae&gt; &lt;\u7aef\u53e3\u53f7&gt;<\/p>\n\n\n\n<p>\u6ce8\uff1a\u5404\u79cd\u670d\u52a1\u7c7b\u578b\u6240\u5141\u8bb8\u7684\u7aef\u53e3\u53f7\u53ef\u4ee5\u901a\u8fc7 semanage port -l \u547d\u4ee4\u914d\u5408 grep \u8fc7\u6ee4\u67e5\u770b\u3002<\/p>\n\n\n\n<p><strong>\u7528\u6cd5\u4e3e\u4f8b<\/strong><\/p>\n\n\n\n<p>\u4e3a Nginx \u9700\u8981\u4f7f\u7528 10080 \u7684\u7aef\u53e3\u7528\u4e8e HTTP \u670d\u52a1\u3002<\/p>\n\n\n\n<p>semanage port -a -t http_port_t -p tcp 10080<\/p>\n\n\n\n<p><strong>\u4e94\u3001SELinux \u9519\u8bef\u5206\u6790\u548c\u89e3\u51b3<\/strong><\/p>\n\n\n\n<p><strong>5.1 \u8ba4\u8bc6 SELinux \u65e5\u5fd7<\/strong><\/p>\n\n\n\n<p>\u5f53\u5f00\u542f\u4e86 SELinux \u4e4b\u540e\uff0c\u5f88\u591a\u670d\u52a1\u7684\u4e00\u4e9b\u6b63\u5e38\u884c\u4e3a\u90fd\u4f1a\u88ab\u89c6\u4e3a\u8fdd\u89c4\u884c\u4e3a\uff08\u6807\u9898\u53ca\u4e0b\u6587\u4e2d\u7684\u9519\u8bef\u5747\u6307\u8fdd\u89c4\u884c\u4e3a\uff09\u3002<\/p>\n\n\n\n<p>\u8fd9\u65f6\u5019\u6211\u4eec\u5c31\u9700\u8981\u501f\u52a9 SELinux \u8fdd\u89c4\u65e5\u5fd7\u6765\u5206\u6790\u89e3\u51b3\u3002<\/p>\n\n\n\n<p>SELinux \u8fdd\u89c4\u65e5\u5fd7\u4fdd\u5b58\u5728 \/var\/log\/audit\/audit.log \u4e2d\u3002<\/p>\n\n\n\n<p>\/var\/log\/audit\/audit.log \u7684\u5185\u5bb9\u5927\u6982\u662f\u8fd9\u6837\u7684\u3002<\/p>\n\n\n\n<p>type=LOGIN msg=audit(1507898701.391:515): pid=8523 uid=0 subj=system_u:system_r:crond_t:s0-s0:c0.c1023 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=25 res=1<\/p>\n\n\n\n<p>type=USER_START msg=audit(1507898701.421:516): pid=8523 uid=0 auid=0 ses=25 subj=system_u:system_r:crond_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_loginuid,pam_keyinit,pam_limits,pam_systemd acct=\"root\" exe=\"\/usr\/sbin\/crond\" hostname=? addr=? terminal=cron res=success'<\/p>\n\n\n\n<p>...<\/p>\n\n\n\n<p>\u8be5\u6587\u4ef6\u7684\u5185\u5bb9\u5f88\u591a\uff0c\u800c\u4e14\u6df7\u6709\u5f88\u591a\u4e0e SELinux \u9519\u8bef\u65e0\u5173\u7684\u7cfb\u7edf\u5ba1\u8ba1\u65e5\u5fd7\u3002\u6211\u4eec\u8981\u501f\u52a9 sealert \u8fd9\u4e2a\u5b9e\u7528\u5de5\u5177\u6765\u5e2e\u5fd9\u5206\u6790\uff08\u5982\u679c\u63d0\u793a\u627e\u4e0d\u5230\u547d\u4ee4\u7684\u8bdd\u8bf7\u5b89\u88c5 setroubleshoot \u8f6f\u4ef6\u5305\uff09\u3002<\/p>\n\n\n\n<p><strong>5.2 \u4f7f\u7528<\/strong>&nbsp;<strong>sealert<\/strong>&nbsp;<strong>\u5206\u6790\u9519\u8bef<\/strong><\/p>\n\n\n\n<p><strong>\u547d\u4ee4\u57fa\u672c\u7528\u6cd5<\/strong><\/p>\n\n\n\n<p>sealert -a \/var\/log\/audit\/audit.log<\/p>\n\n\n\n<p>\u6267\u884c\u5b8c\u547d\u4ee4\u4e4b\u540e\uff0c\u7cfb\u7edf\u9700\u8981\u82b1\u4e00\u6bb5\u65f6\u95f4\u53bb\u5206\u6790\u65e5\u5fd7\u4e2d\u7684\u8fdd\u89c4\u884c\u4e3a\u5e76\u7ed9\u51fa\u5206\u6790\u62a5\u544a\u3002\u5206\u6790\u62a5\u544a\u7684\u7ed3\u6784\u8bb2\u89e3\u8bf7\u770b\u4e0b\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/imgconvert.csdnimg.cn\/aHR0cDovL3AxLnBzdGF0cC5jb20vbGFyZ2UvNWIzZjAwMDFiMGEwYWU1NGUwNjA?x-oss-process=image\/format,png\" alt=\"\u4e00\u6587\u5f7b\u5e95\u660e\u767dlinux\u4e2d\u7684selinux\u5230\u5e95\u662f\u4ec0\u4e48\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/imgconvert.csdnimg.cn\/aHR0cDovL3AxLnBzdGF0cC5jb20vbGFyZ2UvNTk0NTAwMDU4NjEzZTkxZGZlNmY?x-oss-process=image\/format,png\" alt=\"\u4e00\u6587\u5f7b\u5e95\u660e\u767dlinux\u4e2d\u7684selinux\u5230\u5e95\u662f\u4ec0\u4e48\"\/><\/figure>\n\n\n\n<p>\u539f\u6587\u94fe\u63a5\uff1a <a href=\"https:\/\/blog.csdn.net\/tzhuwb\/article\/details\/103867005\">https:\/\/blog.csdn.net\/tzhuwb\/article\/details\/<\/a><a href=\"https:\/\/blog.csdn.net\/tzhuwb\/article\/details\/103867005\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"103867005 \uff08\u5728\u65b0\u7a97\u53e3\u6253\u5f00\uff09\">103867005 <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u524d\u8a00 \u5b89\u5168\u589e\u5f3a\u578b Linux\uff08Security-Enhanced Linux\uff09\u7b80\u79f0 SELinux\uff0c\u5b83\u662f\u4e00 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[227],"tags":[602,774,263,87,199],"class_list":["post-4191","post","type-post","status-publish","format-standard","hentry","category-linux","tag-linux","tag-selinux","tag-263","tag-87","tag-199"],"_links":{"self":[{"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=\/wp\/v2\/posts\/4191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4191"}],"version-history":[{"count":2,"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=\/wp\/v2\/posts\/4191\/revisions"}],"predecessor-version":[{"id":4222,"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=\/wp\/v2\/posts\/4191\/revisions\/4222"}],"wp:attachment":[{"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4191"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}