{"id":3632,"date":"2021-11-07T22:12:04","date_gmt":"2021-11-07T14:12:04","guid":{"rendered":"https:\/\/blog.coderfan.org\/?p=3632"},"modified":"2023-11-06T13:58:06","modified_gmt":"2023-11-06T05:58:06","slug":"some-basic-analysis-of-selinux-in-android-system","status":"publish","type":"post","link":"https:\/\/blog.coderfan.org\/en\/some-basic-analysis-of-selinux-in-android-system.html","title":{"rendered":"Android\u7cfb\u7edf\u4e2dSELinux\u7b80\u5355\u95ee\u9898\u89e3\u6790"},"content":{"rendered":"<div class='booster-block booster-read-block'>\n                <div class=\"twp-read-time\">\n                \t<i class=\"booster-icon twp-clock\"><\/i> <span>Read Time:<\/span>2 Minute, 8 Second                <\/div>\n\n            <\/div>\n<p class=\"has-text-align-justify\">\u672c\u6765\u5df2\u7ecf\u505a\u597d\u7684\u4e00\u4e2a\u9879\u76ee\u6700\u8fd1\u53c8\u8981\u79fb\u690d\u5230\u65b0\u7684\u5e73\u53f0\u4e0a\u53bb\uff0c\u82b1\u4e86\u4e00\u6bb5\u65f6\u95f4\u79fb\u690d\u5b8c\u6210\u540e\u53d1\u73b0\u5f88\u591a\u529f\u80fd\u4e0d\u6b63\u5e38\uff0c\u4ece\u62a5\u9519\u65e5\u5fd7\u6765\u770b\u5927\u591a\u90fd\u662f\u6743\u9650\u95ee\u9898\uff0c\u4f46\u672c\u8eab\u6211\u4eec\u7684\u5e94\u7528\u5177\u6709root\u6743\u9650\uff0c\u662f\u4e0d\u5e94\u8be5\u5b58\u5728\u8fd9\u4e48\u591a\u7684\u6743\u9650\u95ee\u9898\u7684\u3002\u7a81\u7136\u60f3\u8d77\u6765\u5f88\u4e45\u4e4b\u524d\u9047\u5230\u7684\u4e00\u4e2aSELinux\u95ee\u9898\uff0c\u4e8e\u662f\u7075\u673a\u4e00\u52a8\uff1a\u4e5f\u8bb8\u662f\u7cfb\u7edf\u5f00\u542f\u4e86SELinux\u5bfc\u81f4\u7684\u3002\u4e3a\u4e86\u786e\u8ba4\u8fd9\u4e00\u70b9\uff0c\u6211\u5f53\u5373\u4f7f\u7528adb\u8f93\u5165getenforce\uff0c\u5f53\u770b\u5230enforcing\u65f6\u7acb\u9a6c\u5174\u594b\u4e86\u8d77\u6765\uff0c\u4e5f\u8bb8\u95ee\u9898\u5c31\u51fa\u5728SELinux\u4e0a\u3002<\/p>\n\n\n\n<p class=\"has-text-align-justify\">\u4e3a\u4e86\u9a8c\u8bc1\u8fd9\u4e00\u70b9\uff0c\u6211\u8fc7\u6ee4\u4e86\u65e5\u5fd7\u4e2d\u7684avc\u62a5\u9519\uff0c\u53d1\u73b0\u5176\u4e2d\u6709\u5f88\u591a\u662f\u5c5e\u4e8e\u6211\u4eec\u8fdb\u7a0b\u7684\u62a5\u9519\uff0c\u5bf9\u5e94\u5230\u7a0b\u5e8f\u7684\u51fa\u9519\u65f6\u95f4\u70b9\uff0c\u4e5f\u662f\u80fd\u4e00\u4e00\u5339\u914d\u4e0a\u7684\uff0c\u4e8e\u662f\u5f00\u59cb\u81ea\u5df1\u60f3\u7740\u4fee\u590d\u8fd9\u4e9b\u62a5\u9519\uff0c\u987a\u4fbf\u6574\u7406\u4e86\u4e00\u4e0b\u6709\u5173\u4e8eSELinux\u7684\u77e5\u8bc6\uff0c\u8bb0\u5f55\u5728\u8fd9\u91cc\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Background<\/h4>\n\n\n\n<p class=\"has-text-align-justify\">\u4e0d\u77e5\u9053\u5927\u5bb6\u6709\u6ca1\u6709\u60f3\u8fc7\uff0c\u4e3a\u4ec0\u4e48\u8981\u6709SELinux\uff08Security-Enhanced Linux\uff09\u8fd9\u4e2a\u4e1c\u897f\u5b58\u5728\u3002\u6211\u4eec\u77e5\u9053Android\u7cfb\u7edf\u662f\u4ee5Linux\u4f5c\u4e3a\u5185\u6838\uff0c\u800cLinux\u662f\u5e26\u6709\u6743\u9650\u7ba1\u7406\u7684\u3002\u4e0d\u8fc7Linux\u6700\u521d\u7684\u6743\u9650\u7ba1\u7406\u4e4b\u58eb\u57fa\u4e8e\u7528\u6237\u3001\u7528\u6237\u7ec4\u7684\uff0c\u90a3\u5c31\u610f\u5473\u7740\u5982\u679c\u4f60\u662froot\u7528\u6237\uff0c\u6216\u8005\u4f60\u4f4d\u4e8eroot\u7528\u6237\u7ec4\uff0c\u90a3\u5c31\u610f\u5473\u7740\u4f60\u6240\u62e5\u6709\u7684\u6743\u9650\u975e\u5e38\u5927\u3002\u8fd9\u53ef\u80fd\u4f1a\u7ed9\u7cfb\u7edf\u5e26\u6765\u5f88\u5927\u7684\u9ebb\u70e6\uff0c\u6bd4\u5982\u7ecf\u5178\u7684rm -rf\u6839\u76ee\u5f55\u7b49\uff0c\u53ea\u9700\u8981\u4e00\u4e2a\u5c0f\u547d\u4ee4\u5c31\u53ef\u4ee5\u4f7f\u4f60\u7684\u6574\u4e2a\u7cfb\u7edf\u5d29\u6e83\u3002\u4e3a\u4e86\u52a0\u5f3a\u6743\u9650\u7ba1\u63a7\uff0c\u7531\u7f8e\u56fd\u56fd\u5bb6\u5b89\u5168\u5c40\uff08NSA\uff09\u53d1\u8d77\uff0c\u4f17\u591a\u673a\u6784\u53c2\u4e0e\u7684\u4e00\u5957\u5b89\u5168\u6027\u5ba1\u67e5\u673a\u5236\u5c31\u6b64\u8bde\u751f\u4e86\uff0c\u4e5f\u5c31\u662fSELinux\u3002<\/p>\n\n\n\n<p class=\"has-text-align-justify\">SELinux\u5c06\u6743\u9650\u7ba1\u63a7\u7531\u4f20\u7edf\u7684\u57fa\u4e8e\u7528\u6237\u3001\u7528\u6237\u7ec4\u7684\u7ba1\u7406\u7ec6\u5316\u5230\u4ee5\u8fdb\u7a0b\u4e3a\u6700\u5c0f\u5355\u4f4d\u3002\u6bcf\u4e00\u4e2a\u8fdb\u7a0b\u90fd\u62e5\u6709\u4e00\u4e2a\u72ec\u7acb\u7684\u57df\uff0c\u5c06\u81ea\u5df1\u7684\u8fdb\u7a0b\u8d44\u6e90\u5206\u4e3a\u82e5\u5e72\u4e2a\u72ec\u7acb\u7684\u7ba1\u7406\u5bf9\u8c61\uff0c\u5e76\u4f7f\u7528\u5b89\u5168\u6807\u7b7e\u6765\u6807\u8bb0\u8fd9\u4e9b\u7ba1\u7406\u5bf9\u8c61\u3002\u5f53\u8be5\u8fdb\u7a0b\u8981\u8bbf\u95ee\u5916\u90e8\u57df\uff08\u4e5f\u5c31\u662f\u5176\u4ed6\u8fdb\u7a0b\uff09\u7684\u65f6\u5019\uff0c\u9700\u8981\u7f16\u5199\u54cd\u5e94\u7684\u89c4\u5219\u6765\u8bbf\u95ee\u5176\u4ed6\u8fdb\u7a0b\u7684\u7ba1\u7406\u5bf9\u8c61\u3002\u540c\u7406\uff0c\u5982\u679c\u5916\u90e8\u8fdb\u7a0b\u8981\u8bbf\u95ee\u8be5\u8fdb\u7a0b\u7684\u65f6\u5019\uff0c\u4e5f\u9700\u8981\u7f16\u5199\u5bf9\u5e94\u89c4\u5219\u6765\u5b9e\u73b0\u6743\u9650\u7ba1\u7406\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u57fa\u7840\u6982\u5ff5<\/h4>\n\n\n\n<p>\u5728\u6211\u4eec\u8bb2\u89e3\u5982\u679c\u5b9e\u73b0SELinux\u4e4b\u524d\uff0c\u6709\u4e00\u4e9b\u57fa\u672c\u7684\u6982\u5ff5\u9700\u8981\u7ed9\u5927\u5bb6\u7b80\u5355\u4ecb\u7ecd\u4e00\u4e0b\uff0c\u4e3b\u8981\u5305\u62ec<strong>\u57df\u3001\u6807\u7b7e\u548c\u89c4\u5219\u3002<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\"><strong>\u57df\uff1a<\/strong>\u5728Google\u5b98\u65b9\u6587\u6863\u4e2d\uff0c\u57df\uff08Domain<strong>\uff09<\/strong>\u662f\u4e00\u4e2a\u8fdb\u7a0b\u6216\u8005\u4e00\u7ec4\u8fdb\u7a0b\u7684\u6807\u7b7e\uff0c\u4e5f\u79f0\u4e3a\u57df\u7c7b\u578b\u3002\u5b89\u5353\u7cfb\u7edf\u4e2d\u6709\u4e00\u4e9b\u516c\u5171\u7684\u3001\u7ea6\u5b9a\u597d\u7684\u57df\uff0c\u8fd9\u90e8\u5206\u5927\u591a\u90fd\u662f\u5b89\u5353\u7cfb\u7edf\u672c\u8eab\u81ea\u5e26\u7684SELinux\u8bbe\u5b9a\u3002\u800c\u5b9e\u9645\u4e0a\uff0c\u6211\u4eec\u662f\u53ef\u4ee5\u4e3a\u81ea\u5df1\u7684\u8fdb\u7a0b\u8bbe\u5b9a\u5355\u72ec\u7684\u57df\u7684\uff0c\u5728\u540e\u7f00.te\u6587\u4ef6\u4e2d\u4f7f\u7528\u5982\u4e0b\u8bed\u6cd5\u81ea\u5b9a\u4e49\u6211\u4eec\u81ea\u5df1\u7684\u57df\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>type process, domain, coredomain;<\/code><\/pre>\n\n\n\n<p class=\"has-text-align-justify\">\u5728\u8be5\u8bed\u6cd5\u5b9a\u4e49\u4e2d\uff0cprocess\u4e3a\u8fdb\u7a0b\/\u6587\u4ef6\u540d\u79f0\uff0c\u540e\u9762\u7684\u5199\u6cd5\u76f8\u5bf9\u6765\u8bf4\u662f\u56fa\u5b9a\u7684\u3002\u901a\u8fc7\u8be5\u5b9a\u4e49\u5373\u53ef\u4e3a\u6211\u4eec\u7684\u8fdb\u7a0b\u81ea\u5b9a\u4e49\u4e00\u4e2a\u5c5e\u4e8e\u81ea\u5df1\u7684\u57df\u3002<\/p>\n\n\n\n<p class=\"has-text-align-justify\"><strong>\u6807\u7b7e<\/strong>\uff1a\u5728SELlinux\u4e2d\u4f9d\u9760\u6807\u7b7e\u6765\u5339\u914d\u64cd\u4f5c\u57df\u653f\u7b56\uff0c\u8fd9\u53e5\u8bdd\u53ef\u80fd\u4e0d\u592a\u597d\u7406\u89e3\u3002\u5b9e\u9645\u4e0a\uff0c\u4f60\u5927\u53ef\u4ee5\u5c06\u5176\u7406\u89e3\u4e3a\u5bf9\u67d0\u4e2a\u8fdb\u7a0b\u6240\u5c5e\u8d44\u6e90\u7684\u6743\u9650\u5b9a\u4e49\uff0c\u7528\u4e8e\u51b3\u5b9a\u5141\u8bb8\u7684\u4e8b\u9879\u3002\u5957\u63a5\u5b57\u3001\u6587\u4ef6\u548c\u8fdb\u7a0b\u5728SELinux\u4e2d\u90fd\u6709\u6807\u7b7e\u3002SELinux\u5728\u5de5\u4f5c\u65f6\u4f1a\u5148\u53c2\u8003\u6807\u7b7e\u4e2d\u7684\u5b9a\u4e49\uff0c\u518d\u4f9d\u636e\u653f\u7b56\u6765\u505a\u5177\u4f53\u51b3\u5b9a\u3002<\/p>\n\n\n\n<p>\u6807\u7b7e\u7684\u5f62\u5f0f\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>user\uff1arole\uff1atype\uff1amls_level<\/code><\/pre>\n\n\n\n<p class=\"has-text-align-justify\">\u5176\u4e2duser\u8868\u793a\u7528\u6237\uff0c\u5728\u5b89\u5353\u7cfb\u7edf\u4e2d\u7edf\u4e00\u8868\u793a\u4e3au\uff0crole\u8868\u793a\u89d2\u8272,\u4e00\u4e2auser\u53ef\u4ee5\u5c5e\u4e8e\u591a\u4e2a\u89d2\u8272\uff0c\u4e0d\u540c\u7684role\u5177\u6709\u4e0d\u540c\u7684\u6743\u9650\uff1btype\u662f\u8bbf\u95ee\u51b3\u5b9a\u7684\u4e3b\u8981\u7ec4\u6210\u90e8\u5206\uff0c\u8868\u660e\u8be5\u5bf9\u8c61\u6240\u5c5e\u7684domain\uff1bmls_level\u662f\u7cfb\u7edf\u4e2d\u8fdb\u7a0b\u6216\u8005\u6587\u4ef6\u7684\u6743\u9650\u5206\u7ea7\u4e0d\u540c\u7ea7\u522b\u7684\u8d44\u6e90\u9700\u8981\u5bf9\u5e94\u7ea7\u522b\u7684\u8fdb\u7a0b\u624d\u80fd\u8bbf\u95ee\u3002\u901a\u5e38\u6211\u4eec\u5bf9\u6807\u7b7e\u7684\u5b9a\u4e49\u4f4d\u4e8efile_contexts\u6587\u4ef6\u5185\u3002<\/p>\n\n\n\n<p class=\"has-text-align-justify\">\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7ps -Z\u547d\u4ee4\u67e5\u770b\u8fdb\u7a0b\u7684\u5b89\u5168\u6807\u7b7e\uff0c\u4f7f\u7528ls -Z\u547d\u4ee4\u67e5\u770b\u6587\u4ef6\u7684\u5b89\u5168\u6807\u7b7e\u3002<\/p>\n\n\n\n<p><strong>\u653f\u7b56<\/strong>\uff1a\u653f\u7b56\u662f\u6307\u5bf9\u57df\u4f9d\u636e\u67d0\u4e2a\u6807\u7b7e\u6765\u5bf9\u67d0\u7c7b\u8d44\u6e90\u505a\u8bbf\u95ee\u65f6\u6240\u5f62\u6210\u7684\u89c4\u5219\u3002\u653f\u7b56\u7684\u5f62\u5f0f\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rule domain type\uff1aclass permission<\/code><\/pre>\n\n\n\n<p class=\"has-text-align-justify\">\u5176\u4e2drule\u662f\u6307\u653f\u7b56\u7684\u52a8\u4f5c\uff0crule\u7684\u884c\u4e3a\u5305\u62ecallow\uff08\u5141\u8bb8\uff09\uff0cauditallow\uff08\u6743\u9650\u68c0\u6d4b\u6210\u529f\u6216\u5931\u8d25\u90fd\u8bb0\u5f55\uff09\u3001dontaudit\uff08\u5373\u4f7f\u6743\u9650\u5931\u8d25\u4e5f\u4e0d\u8bb0\u5f55\uff09\u3001neverallow\uff08\u663e\u5f0f\u58f0\u660e\u4e0d\u88ab\u5141\u8bb8\u7684\u884c\u4e3a\uff09.<\/p>\n\n\n\n<p class=\"has-text-align-justify\">domain\u662f\u4e00\u4e2a\u8fdb\u7a0b\u6216\u8005\u4e00\u7ec4\u8fdb\u7a0b\u7684\u6807\u7b7e\uff0c\u4e5f\u79f0\u4e3a\u57df\u7c7b\u578b\uff0cdomain\u662f\u53ef\u4ee5\u81ea\u884c\u5b9a\u4e49\u7684\u3002<\/p>\n\n\n\n<p class=\"has-text-align-justify\">type\u662f\u4e00\u4e2a\u5bf9\u8c61\u6216\u8005\u4e00\u7ec4\u5bf9\u8c61\u7684\u6807\u7b7e\uff0cclass\u662ftype\u4e2d\u7684\u4e00\u4e2a\u5b50\u9879\uff0c\u800cperimission\u8868\u660e\u89c4\u5b9a\u7684\u64cd\u4f5c\u7c7b\u578b\uff0c\u5982\u8bfb\u53d6\u3001\u5199\u5165\u7b49\u7b49\u3002<\/p>\n\n\n\n<p class=\"has-text-align-justify\">\u5728Android 8.0\u53ca\u4e4b\u4e0a\u7684\u7248\u672c\uff0cSELinux\u653f\u7b56\u62c6\u5206\u4e3a\u5e73\u53f0\u7ec4\u4ef6\u548c\u4f9b\u5e94\u5546\u7ec4\u4ef6\uff0c\u5141\u8bb8\u5e73\u53f0\u7ec4\u4ef6\uff08system.img\uff09\u4e0e\u4f9b\u5e94\u5546\u7ec4\u4ef6\uff08vendor.img and boot.img\uff09\u5404\u81ea\u72ec\u7acb\u66f4\u65b0\uff0c\u6700\u5927\u7a0b\u5ea6\u4fdd\u8bc1\u5176\u7075\u6d3b\u6027\u3002\u5176\u4e2d\u5e73\u53f0\u653f\u7b56\u8fdb\u4e00\u6b65\u7ec6\u5206\u4e3a\u5e73\u53f0\u516c\u5171\u90e8\u5206\u4e0e\u5e73\u53f0\u4e13\u7528\u90e8\u5206\uff0c\u5e73\u53f0\u516c\u5171\u90e8\u5206\u7684\u653f\u7b56\u4f4d\u4e8esystem\/sepolicy\/public\u76ee\u5f55\uff0c\u800c\u4e13\u7528\u90e8\u5206\u5219\u4f4d\u4e8esystem\/sepolicy\/private\u76ee\u5f55\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u5e38\u7528\u8bca\u65ad<\/h4>\n\n\n\n<p class=\"has-text-align-justify\">\u5176\u5b9e\u5bf9\u4e8e\u5927\u591a\u6570\u5b89\u5353\u5f00\u53d1\u8005\u800c\u8a00\uff0c\u4e0d\u7528\u7279\u610f\u53bb\u4e86\u89e3SELinux\u7684\u6df1\u5c42\u6b21\u77e5\u8bc6\uff0c\u4e00\u6765\u662f\u6211\u4eec\u5b9e\u9645\u751f\u4ea7\u73af\u5883\u4e2d\u5927\u591a\u6ca1\u6709\u5f00\u542fSELinux\uff0c\u4e8c\u6765\u4e00\u822c\u6211\u4eec\u53ea\u9700\u8981\u4e86\u89e3sepolicy\u7684\u7f16\u5199\u89c4\u5219\uff0c\u51fa\u73b0avc\u6743\u9650\u62a5\u9519\u65f6\u77e5\u9053\u5982\u4f55\u6dfb\u52a0\u76f8\u5e94\u89c4\u5219\u5373\u53ef\uff0c\u56e0\u6b64\u5c31\u6211\u4eec\u65e5\u5e38\u5f00\u53d1\u4e2d\u9047\u5230\u7684SELinux\u7684\u76f8\u5173\u8bca\u65ad\u601d\u8def\u505a\u4e00\u4e2a\u8bb0\u5f55\u3002<\/p>\n\n\n\n<p>1.\u5982\u4f55\u67e5\u770b\u7cfb\u7edf\u662f\u5426\u5f00\u542fSELinux<\/p>\n\n\n\n<p class=\"has-text-align-justify\">\u4f7f\u7528getenforce\u547d\u4ee4\u8fdb\u884c\u67e5\u770b\uff0c\u5f53\u6211\u4eec\u4f7f\u7528getenforce\u547d\u4ee4\u65f6\uff0c\u4e00\u822c\u4f1a\u5f97\u5230\u4e09\u79cd\u56de\u9988\u3002<\/p>\n\n\n\n<p class=\"has-text-align-justify\">enforcing\uff1a\u5f3a\u5236\u6a21\u5f0f\uff0c\u6240\u6709\u89c4\u5219\u90fd\u4f1a\u88ab\u6267\u884c<\/p>\n\n\n\n<p class=\"has-text-align-justify\">permissive\uff1a\u5bbd\u5bb9\u6a21\u5f0f\uff0c\u6240\u6709\u89c4\u5219\u4e0d\u4f1a\u8d77\u5b9e\u9645\u4f5c\u7528\uff0c\u53ea\u4f1a\u6253\u5370\u9519\u8bef\u4fe1\u606f<\/p>\n\n\n\n<p class=\"has-text-align-justify\">disabled\uff1a\u5173\u95ed\u6a21\u5f0f\uff0cSELinux\u7684\u6240\u6709\u89c4\u5219\u90fd\u4e0d\u4f1a\u751f\u6548\u3002<\/p>\n\n\n\n<p class=\"has-text-align-justify\">\u53ea\u6709\u5f53\u6211\u4eec\u5f97\u5230\u7684\u53cd\u9988\u4e3aenforcing\u65f6\uff0c\u624d\u8868\u793aSELinux\u771f\u6b63\u5f00\u542f\u3002\u4e00\u822c\u800c\u8a00\uff0c\u5f53\u6211\u4eec\u5904\u4e8e\u8c03\u8bd5\u9636\u6bb5\u65f6\u4f1a\u5c06SElinux\u8bbe\u4e3a\u5bbd\u5bb9\u6a21\u5f0f\uff0c\u5728\u5c06\u6240\u6709\u7684avc\u62a5\u9519\u89e3\u51b3\u540e\u5e94\u7528\u5230\u751f\u4ea7\u5e94\u7528\u9636\u6bb5\uff0c\u6b64\u65f6\u53ef\u5c06SElinux\u8bbe\u4e3aenforcing\u6a21\u5f0f\u3002<\/p>\n\n\n\n<p>2.\u5982\u4f55\u4fee\u6539\u7cfb\u7edfSElinux\u72b6\u6001<\/p>\n\n\n\n<p class=\"has-text-align-justify\">\u4e0egetenfoce\u76f8\u5bf9\u5e94\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7setenforce\u547d\u4ee4\u6765\u8bbe\u5b9aSELinux\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u4f7f\u7528setenforce\u547d\u4ee4\u53ea\u80fd\u5c06SELinux\u8bbe\u4e3aenforcing\u6216\u8005permissive\uff0c\u5982\u679c\u8981\u5c06SELinux\u8bbe\u4e3adisabled\uff0c\u5219\u9700\u8981\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u5e76\u91cd\u542f\u3002<\/p>\n\n\n\n<p class=\"has-text-align-justify\">\u8bbe\u4e3a\u5bbd\u5bb9\u6a21\u5f0f\uff1asetenforce permissive \u6216\u8005 setenforce 0<\/p>\n\n\n\n<p class=\"has-text-align-justify\">\u8bbe\u4e3a\u5f3a\u5236\u6a21\u5f0f\uff1asetenforce enforcing \u6216\u8005 setenforce 1<\/p>\n\n\n\n<p class=\"has-text-align-justify\">setenforce\u53ea\u80fd\u591f\u4e34\u65f6\u5730\u5c06\u7cfb\u7edf\u7684SELinux\u72b6\u6001\u8bbe\u5b9a\u4e3aenforcing\u6216\u8005permissive\uff0c\u5728\u7cfb\u7edf\u91cd\u542f\u540e\u4e34\u65f6\u8bbe\u5b9a\u7684\u5185\u5bb9\u5c06\u4e0d\u518d\u751f\u6548\u3002\u5982\u679c\u60f3\u8981\u5c06SELinux\u72b6\u6001\u8bbe\u5b9a\u4e3adisabled\u6216\u8005\u4e00\u76f4\u4fdd\u6301\u8bbe\u5b9a\u72b6\u6001\uff0c\u5219\u9700\u8981\u901a\u8fc7\u4fee\u6539\/etc\/sysconfig\/selinux\u6587\u4ef6\u6765\u5b9e\u73b0\u3002\u6216\u8005\u901a\u8fc7\u4fee\u6539init\u8fdb\u7a0b\u6765\u5b9e\u73b0\uff0c\u6b64\u5904\u6211\u4eec\u8d34\u51fa\u901a\u8fc7\u4fee\u6539init\u542f\u52a8\u6765\u5b9e\u73b0\u5bf9SELinux\u5b9e\u65bd\u7981\u7528\u7684\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/\u6e90\u7801\u6587\u4ef6\u4f4d\u4e8esystem\/core\/init\/selinux.cpp\nbool IsEnforcing() {\n    \/\/Modified by FranzKafka\n    return false;\n    \/\/if (ALLOW_PERMISSIVE_SELINUX) {\n    \/\/    return StatusFromProperty() == SELINUX_ENFORCING;\n    \/\/}\n    \/\/return true;\n}<\/code><\/pre>\n\n\n\n<p class=\"has-text-align-justify\">\u5728init\u542f\u52a8\u65f6\uff0c\u4f1a\u901a\u8fc7IsEnforcing\u63a5\u53e3\u83b7\u53d6SELinux\u7684\u72b6\u6001\uff0c\u8fd9\u91cc\u76f4\u63a5\u5728\u5165\u53e3\u5904\u8fd4\u56defalse\u4ece\u800c\u7981\u7528SELinux\u3002<\/p>\n\n\n\n<p>3.\u83b7\u53d6avc\u62a5\u9519\u4fe1\u606f\u53ca\u65e5\u5fd7\u89e3\u8bfb<\/p>\n\n\n\n<p>\u5982\u679c\u6211\u4eec\u60f3\u8981\u89e3\u51b3SELinux\u7684\u95ee\u9898\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6293\u53d6\u7cfb\u7edf\u4e2d\u7684avc\u62a5\u9519\u4fe1\u606f\uff0c\u5176\u662fSELinux\u653f\u7b56\u6267\u884c\u65f6\u7684\u5177\u4f53\u72b6\u6001\u4f53\u73b0\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>adb shell \u201ccat \/proc\/kmsg |grep avc\u201d &gt; avc_log.txt<\/code><\/pre>\n\n\n\n<p class=\"has-text-align-justify\">\u90a3\u4e48\uff0c\u5728\u6293\u53d6\u4e86avc\u62a5\u9519\u4fe1\u606f\u540e\uff0c\u6211\u4eec\u5982\u4f55\u89e3\u8bfb\u5462\u3002\u5176\u5b9e\u89c4\u5219\u76f8\u5f53\u7b80\u5355\uff0c\u4ee5\u4e0b\u6211\u4eec\u5c06\u4e3e\u4f8b\u8bf4\u660e\uff1a<\/p>\n\n\n\n<p class=\"has-text-align-justify\"><strong><span style=\"color: var(--theme-palette-color-2, #F74D67);\" class=\"ugb-highlight\">avc: denied { write } for pid=4965 comm=&#8221;evsserver&#8221; name=&#8221;usernotify&#8221; dev=&#8221;mmcblk0p50&#8243; ino=131255 scontext=u:r:evsserver:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir permissive=0<\/span><\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\">\u8fd9\u4e00\u6bb5\u62a5\u9519\u4fe1\u606f\u8868\u660eevsserver\u57df\uff08\u8fdb\u7a0b\uff09\u5728\u5bf9\u6302\u8f7d\u8282\u70b9\u4e3a<strong>mmcblk0p50<\/strong>\u7684\u540d\u4e3a<strong>usernotify<\/strong>\u7684\u6587\u4ef6\u5939\u7684\u5199\u5165\u63a7\u5236\u4e2d\u5931\u8d25\u3002\u5982\u679c\u6211\u4eec\u8981\u4fee\u6b63\u8be5\u62a5\u9519\uff0c\u53ef\u4ee5\u6309\u7167\u4e00\u5b9a\u7684\u89c4\u5219\u6765\u4fee\u6539\uff0c\u6bd4\u5982\u5f53\u524d\u62a5\u9519\uff0c\u6211\u4eec\u5bf9\u5e94\u7684\u5e94\u6dfb\u52a0\u7684\u89c4\u5219\u4e3a;<\/p>\n\n\n\n<p><strong>#============= evsserver ==============<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\"><strong>denied { <span style=\"color: var(--theme-palette-color-2, #F74D67);\" class=\"ugb-highlight\">write<\/span><span style=\"color: var(--theme-palette-color-5, #DFDFE2);\" class=\"ugb-highlight\"> <\/span>} for pid=5943 comm=&#8221;<span style=\"color: var(--theme-palette-color-1, #FB7258);\" class=\"ugb-highlight\">evsserver<\/span>&#8221; name=&#8221;property_service&#8221; dev=&#8221;tmpfs&#8221; ino=2726 scontext=u:r:evsserver:s0 tcontext=u:object_r:<span style=\"color: var(--stk-global-color-90542, #2d897a);\" class=\"ugb-highlight\">property_socket<\/span>:s0 tclass=<span style=\"color: #4966f3;\" class=\"ugb-highlight\">sock_file<\/span> permissive=0<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\"><strong><em>allow <span style=\"color: var(--theme-palette-color-1, #FB7258);\" class=\"ugb-highlight\">evsserver<\/span> <span style=\"color: var(--stk-global-color-90542, #2d897a);\" class=\"ugb-highlight\">property_socket<\/span>: <strong><span style=\"color: #4966f3;\" class=\"ugb-highlight\">sock_file<\/span><\/strong>  <span style=\"color: var(--theme-palette-color-2, #F74D67);\" class=\"ugb-highlight\">write<\/span>;<\/em><\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\">\u76f8\u4fe1\u53ea\u8981\u7a0d\u5fae\u89c2\u5bdf\u5c31\u80fd\u53d1\u73b0\uff0c\u4fee\u6b63\u8be5avc\u62a5\u9519\u7684\u89c4\u5219\u5b8c\u5168\u53ef\u4ee5\u6839\u636e\u8be5\u62a5\u9519\u4fe1\u606f\u6765\u8fdb\u884c\u6dfb\u52a0\uff0c\u5177\u4f53\u8be5\u5982\u4f55\u6839\u636eavc\u62a5\u9519\u6765\u6dfb\u52a0\u89c4\u5219\u5728\u6b64\u4e0d\u505a\u7ec6\u8ff0\uff0c\u4e0a\u8ff0\u7684\u4f8b\u5b50\u8db3\u591f\u5e2e\u52a9\u4f60\u89e3\u51b3\u5927\u90e8\u5206\u7684SELinux\u62a5\u9519\u95ee\u9898\u3002<\/p>\n\n\n\n<p class=\"has-text-align-justify\">\u5b9e\u9645\u4e0a\uff0c\u6211\u4eec\u8fd8\u6709\u66f4\u65b9\u4fbf\u5feb\u6377\u7684\u529e\u6cd5\u6765\u5f97\u5230\u9488\u5bf9\u67d0\u4e2a\u57df\u6216\u8005\u67d0\u4e2a\u8fdb\u7a0b\u7684SELinux\u89c4\u5219\uff0c\u5373\u4f7f\u7528audit2allow\u547d\u4ee4\uff0caudit2allow\u9ed8\u8ba4\u4f1a\u5728AOSP\u6e90\u7801\u4e2d\uff0c\u5176\u8def\u5f84\u4e3a\uff1a<\/p>\n\n\n\n<pre class=\"io-enlighter-pre\"><code class=\"gl\" data-enlighter-language=\"generic\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"\" data-enlighter-highlight=\"\">${ANDROID_HOME}\/external\/selinux\/prebuilts\/bin\/audit2allow<\/code><\/pre>\n\n\n\n<p class=\"has-text-align-justify\">\u6211\u4eec\u6253\u5f00\u8be5\u6587\u4ef6\uff0c\u53ef\u4ee5\u53d1\u73b0\u5176\u5b9e\u9645\u662f\u4e00\u4e2ashell\u811a\u672c\uff0c\u5e76\u5728\u5185\u90e8\u901a\u8fc7\u8c03\u7528python\u6765\u5b9e\u73b0\u5bf9SELinux\u62a5\u9519\u4fe1\u606f\u7684\u89e3\u6790\u4e0e\u76f8\u5e94\u89c4\u5219\u7684\u751f\u6210\uff1b\u5728\u5177\u4f53\u4f7f\u7528\u65f6\uff0c\u6211\u4eec\u9700\u8981\u5f97\u5230avc\u62a5\u9519\u7684\u65e5\u5fd7\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u6293\u53d6:<\/p>\n\n\n\n<pre class=\"io-enlighter-pre\"><code class=\"gl\" data-enlighter-language=\"generic\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"\" data-enlighter-highlight=\"\">adb root &amp;&amp; adb remount\n#\u65b9\u5f0f\u4e00\nadb shell \"cat \/proc\/kmsg |grep avc\" > avc_log.txt\n\n#\u65b9\u5f0f\u4e8c\nadb shell \ndmesg | grep avc > \/data\/avc_log.txt\nadb pull \/data\/avc_log.txt<\/code><\/pre>\n\n\n\n<p class=\"has-text-align-justify\">\u4e4b\u540e\u4f7f\u7528<em>audit2allow -i avc_log.txt\u00a0 -p policy file<\/em>\u547d\u4ee4\u5373\u53ef\u81ea\u52a8\u751f\u6210\uff0c\u82e5\u6211\u4eec\u7684\u73af\u5883\u4e2d\u6ca1\u6709audit2allow\u5de5\u5177\uff0c\u901a\u8fc7<em>apt install policycoreutils-python-utils<\/em>\u8fdb\u884c\u5b89\u88c5\uff0c\u540c\u65f6\u9700\u8981\u6ce8\u610f\uff0cpolicy file\u5b58\u5728\u4e8e\/sys\/fs\/selinux\u4e2d\uff0c\u9700\u8981\u4ece\u6211\u4eec\u7f16\u8bd1\u597d\u7684\u7cfb\u7edf\u4e2d\u5355\u72ec\u53d6\u51fa\u4f7f\u7528\u3002\u5982\u679c\u6211\u4eec\u5728\u4f7f\u7528audit2allow\u8fc7\u7a0b\u4e2d\u63d0\u793aPython\u76f8\u5173\u62a5\u9519\uff0c\u4e00\u822c\u662f\u7531\u4e8ePython\u7248\u672c\u95ee\u9898\uff0c\u8fd9\u91cc\u9700\u8981\u6ce8\u610faudit2allow\u4f9d\u8d56\u4e8epython2\u800c\u975epython3\uff0c\u5982\u679c\u5b58\u5728\u95ee\u9898\u6211\u4eec\u9700\u8981\u81ea\u884c\u89e3\u51b3\u3002<\/p>\n\n\n\n<p class=\"has-text-align-justify\">\u4ee5\u4e0a\u5c31\u662f\u8fd9\u7bc7\u535a\u5ba2\u4e2d\u6240\u6d89\u53ca\u5230\u7684\u5168\u90e8\u5185\u5bb9\u4e86\uff0c\u5f53\u7136\u8fd8\u6709\u5f88\u591a\u77e5\u8bc6\u6ca1\u6709\u6d89\u53ca\u5230\uff0c\u5173\u4e8eAndroid\u4e2d\u7684SELinux\u5927\u5bb6\u4e5f\u53ef\u4ee5\u5230Android\u7684<a href=\"https:\/\/source.android.com\/security\/selinux?hl=zh-cn\" class=\"ek-link\">\u5b98\u65b9\u5f00\u53d1\u7f51\u7ad9<\/a>\u67e5\u770b\u66f4\u591a\u5177\u4f53\u4fe1\u606f\u3002\u7531\u4e8e\u672c\u4eba\u6c34\u5e73\u6709\u9650\uff0c\u6587\u4e2d\u96be\u514d\u5b58\u5728\u9519\u8bef\uff0c\u5982\u6709\u95ee\u9898\u6b22\u8fce\u5404\u4f4d\u6307\u51fa\uff01<\/p>\n        <div class=\"booster-block booster-reactions-block\">\n            <div class=\"twp-reactions-icons\">\n                \n                <div class=\"twp-reacts-wrap\">\n                    <a react-data=\"be-react-1\" post-id=\"3632\" class=\"be-face-icons un-reacted\" href=\"javascript:void(0)\">\n                        <img decoding=\"async\" src=\"https:\/\/blog.coderfan.org\/wp-content\/plugins\/booster-extension\/\/assets\/icon\/happy.svg\" alt=\"Happy\">\n                    <\/a>\n                    <div class=\"twp-reaction-title\">\n                        Happy                    <\/div>\n                    <div class=\"twp-count-percent\">\n                                                    <span style=\"display: none;\" class=\"twp-react-count\">2<\/span>\n                        \n                                                <span class=\"twp-react-percent\"><span>100<\/span> %<\/span>\n                                            <\/div>\n                <\/div>\n\n                <div class=\"twp-reacts-wrap\">\n                    <a react-data=\"be-react-2\" post-id=\"3632\" class=\"be-face-icons un-reacted\" href=\"javascript:void(0)\">\n                        <img decoding=\"async\" src=\"https:\/\/blog.coderfan.org\/wp-content\/plugins\/booster-extension\/\/assets\/icon\/sad.svg\" alt=\"Sad\">\n                    <\/a>\n                    <div class=\"twp-reaction-title\">\n                        Sad                    <\/div>\n                    <div class=\"twp-count-percent\">\n                                                    <span style=\"display: none;\" class=\"twp-react-count\">0<\/span>\n                                                                        <span class=\"twp-react-percent\"><span>0<\/span> %<\/span>\n                                            <\/div>\n                <\/div>\n\n                <div class=\"twp-reacts-wrap\">\n                    <a react-data=\"be-react-3\" post-id=\"3632\" class=\"be-face-icons un-reacted\" href=\"javascript:void(0)\">\n                        <img decoding=\"async\" src=\"https:\/\/blog.coderfan.org\/wp-content\/plugins\/booster-extension\/\/assets\/icon\/excited.svg\" alt=\"Excited\">\n                    <\/a>\n                    <div class=\"twp-reaction-title\">\n                        Excited                    <\/div>\n                    <div class=\"twp-count-percent\">\n                                                    <span style=\"display: none;\" class=\"twp-react-count\">0<\/span>\n                                                                        <span class=\"twp-react-percent\"><span>0<\/span> %<\/span>\n                                            <\/div>\n                <\/div>\n\n                <div class=\"twp-reacts-wrap\">\n                    <a react-data=\"be-react-6\" post-id=\"3632\" class=\"be-face-icons un-reacted\" href=\"javascript:void(0)\">\n                        <img decoding=\"async\" src=\"https:\/\/blog.coderfan.org\/wp-content\/plugins\/booster-extension\/\/assets\/icon\/sleepy.svg\" alt=\"Sleepy\">\n                    <\/a>\n                    <div class=\"twp-reaction-title\">\n                        Sleepy                    <\/div>\n                    <div class=\"twp-count-percent\">\n                                                    <span style=\"display: none;\" class=\"twp-react-count\">0<\/span>\n                        \n                                                <span class=\"twp-react-percent\"><span>0<\/span> %<\/span>\n                                            <\/div>\n                <\/div>\n\n                <div class=\"twp-reacts-wrap\">\n                    <a react-data=\"be-react-4\" post-id=\"3632\" class=\"be-face-icons un-reacted\" href=\"javascript:void(0)\">\n                        <img decoding=\"async\" src=\"https:\/\/blog.coderfan.org\/wp-content\/plugins\/booster-extension\/\/assets\/icon\/angry.svg\" alt=\"Angry\">\n                    <\/a>\n                    <div class=\"twp-reaction-title\">Angry<\/div>\n                    <div class=\"twp-count-percent\">\n                                                    <span style=\"display: none;\" class=\"twp-react-count\">0<\/span>\n                                                                        <span class=\"twp-react-percent\"><span>0<\/span> %<\/span>\n                        \n                    <\/div>\n                <\/div>\n\n                <div class=\"twp-reacts-wrap\">\n                    <a react-data=\"be-react-5\" post-id=\"3632\" class=\"be-face-icons un-reacted\" href=\"javascript:void(0)\">\n                        <img decoding=\"async\" src=\"https:\/\/blog.coderfan.org\/wp-content\/plugins\/booster-extension\/\/assets\/icon\/surprise.svg\" alt=\"Surprise\">\n                    <\/a>\n                    <div class=\"twp-reaction-title\">Surprise<\/div>\n                    <div class=\"twp-count-percent\">\n                                                    <span style=\"display: none;\" class=\"twp-react-count\">0<\/span>\n                                                                        <span class=\"twp-react-percent\"><span>0<\/span> %<\/span>\n                                            <\/div>\n                <\/div>\n\n            <\/div>\n        <\/div>","protected":false},"excerpt":{"rendered":"<p>\u5173\u4e8eAndroid\u7cfb\u7edf\u4e2dSELinux\u7684\u4e00\u4e9b\u77e5\u8bc6\u5206\u4eab<\/p>","protected":false},"author":1,"featured_media":3647,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":1,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[18],"tags":[46,47],"class_list":["post-3632","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-operating-system","tag-android","tag-selinux"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[]}},"aioseo_notices":[],"featured_image_urls":{"full":["https:\/\/blog.coderfan.org\/wp-content\/uploads\/2021\/11\/SElinx.jpg",1000,667,false],"thumbnail":["https:\/\/blog.coderfan.org\/wp-content\/uploads\/2021\/11\/SElinx-150x150.jpg",150,150,true],"medium":["https:\/\/blog.coderfan.org\/wp-content\/uploads\/2021\/11\/SElinx-300x200.jpg",300,200,true],"medium_large":["https:\/\/blog.coderfan.org\/wp-content\/uploads\/2021\/11\/SElinx-768x512.jpg",768,512,true],"large":["https:\/\/blog.coderfan.org\/wp-content\/uploads\/2021\/11\/SElinx.jpg",1000,667,false],"1536x1536":["https:\/\/blog.coderfan.org\/wp-content\/uploads\/2021\/11\/SElinx.jpg",1000,667,false],"2048x2048":["https:\/\/blog.coderfan.org\/wp-content\/uploads\/2021\/11\/SElinx.jpg",1000,667,false],"trp-custom-language-flag":["https:\/\/blog.coderfan.org\/wp-content\/uploads\/2021\/11\/SElinx-18x12.jpg",18,12,true]},"post_excerpt_stackable":"<p>\u5173\u4e8eAndroid\u7cfb\u7edf\u4e2dSELinux\u7684\u4e00\u4e9b\u77e5\u8bc6\u5206\u4eab<\/p>\n","category_list":"<a href=\"https:\/\/blog.coderfan.org\/en\/category\/operating-system\" rel=\"category tag\">\u64cd\u4f5c\u7cfb\u7edf<\/a>","author_info":{"name":"FranzKafka95","url":"https:\/\/blog.coderfan.org\/en\/author\/yushenglonely95"},"comments_num":"0 comments","featured_image_urls_v2":{"full":["https:\/\/blog.coderfan.org\/wp-content\/uploads\/2021\/11\/SElinx.jpg",1000,667,false],"thumbnail":["https:\/\/blog.coderfan.org\/wp-content\/uploads\/2021\/11\/SElinx-150x150.jpg",150,150,true],"medium":["https:\/\/blog.coderfan.org\/wp-content\/uploads\/2021\/11\/SElinx-300x200.jpg",300,200,true],"medium_large":["https:\/\/blog.coderfan.org\/wp-content\/uploads\/2021\/11\/SElinx-768x512.jpg",768,512,true],"large":["https:\/\/blog.coderfan.org\/wp-content\/uploads\/2021\/11\/SElinx.jpg",1000,667,false],"1536x1536":["https:\/\/blog.coderfan.org\/wp-content\/uploads\/2021\/11\/SElinx.jpg",1000,667,false],"2048x2048":["https:\/\/blog.coderfan.org\/wp-content\/uploads\/2021\/11\/SElinx.jpg",1000,667,false],"trp-custom-language-flag":["https:\/\/blog.coderfan.org\/wp-content\/uploads\/2021\/11\/SElinx-18x12.jpg",18,12,true]},"post_excerpt_stackable_v2":"<p>\u5173\u4e8eAndroid\u7cfb\u7edf\u4e2dSELinux\u7684\u4e00\u4e9b\u77e5\u8bc6\u5206\u4eab<\/p>\n","category_list_v2":"<a href=\"https:\/\/blog.coderfan.org\/en\/category\/operating-system\" rel=\"category tag\">\u64cd\u4f5c\u7cfb\u7edf<\/a>","author_info_v2":{"name":"FranzKafka95","url":"https:\/\/blog.coderfan.org\/en\/author\/yushenglonely95"},"comments_num_v2":"0 comments","_links":{"self":[{"href":"https:\/\/blog.coderfan.org\/en\/wp-json\/wp\/v2\/posts\/3632","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.coderfan.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coderfan.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coderfan.org\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coderfan.org\/en\/wp-json\/wp\/v2\/comments?post=3632"}],"version-history":[{"count":11,"href":"https:\/\/blog.coderfan.org\/en\/wp-json\/wp\/v2\/posts\/3632\/revisions"}],"predecessor-version":[{"id":5027,"href":"https:\/\/blog.coderfan.org\/en\/wp-json\/wp\/v2\/posts\/3632\/revisions\/5027"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.coderfan.org\/en\/wp-json\/wp\/v2\/media\/3647"}],"wp:attachment":[{"href":"https:\/\/blog.coderfan.org\/en\/wp-json\/wp\/v2\/media?parent=3632"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coderfan.org\/en\/wp-json\/wp\/v2\/categories?post=3632"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coderfan.org\/en\/wp-json\/wp\/v2\/tags?post=3632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}