{"id":2000,"date":"2014-01-01T00:32:52","date_gmt":"2013-12-31T16:32:52","guid":{"rendered":"http:\/\/www.huzs.top\/?p=2000"},"modified":"2014-01-01T00:32:52","modified_gmt":"2013-12-31T16:32:52","slug":"%e4%b8%80%e4%ba%9b%e9%9c%80%e8%a6%81%e7%a6%81%e7%94%a8%e7%9a%84php%e5%8d%b1%e9%99%a9%e5%87%bd%e6%95%b0disable_functions","status":"publish","type":"post","link":"https:\/\/www.huzs.top\/?p=2000","title":{"rendered":"\u4e00\u4e9b\u9700\u8981\u7981\u7528\u7684PHP\u5371\u9669\u51fd\u6570(disable_functions)"},"content":{"rendered":"<p>phpinfo()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u8f93\u51fa PHP \u73af\u5883\u4fe1\u606f\u4ee5\u53ca\u76f8\u5173\u7684\u6a21\u5757\u3001WEB \u73af\u5883\u7b49\u4fe1\u606f\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u4e2d<\/p>\n<p>passthru()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u5141\u8bb8\u6267\u884c\u4e00\u4e2a\u5916\u90e8\u7a0b\u5e8f\u5e76\u56de\u663e\u8f93\u51fa\uff0c\u7c7b\u4f3c\u4e8e exec()\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<p>exec()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u5141\u8bb8\u6267\u884c\u4e00\u4e2a\u5916\u90e8\u7a0b\u5e8f\uff08\u5982 UNIX Shell \u6216 CMD \u547d\u4ee4\u7b49\uff09\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<p>system()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u5141\u8bb8\u6267\u884c\u4e00\u4e2a\u5916\u90e8\u7a0b\u5e8f\u5e76\u56de\u663e\u8f93\u51fa\uff0c\u7c7b\u4f3c\u4e8e passthru()\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<p>chroot()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u53ef\u6539\u53d8\u5f53\u524d PHP \u8fdb\u7a0b\u7684\u5de5\u4f5c\u6839\u76ee\u5f55\uff0c\u4ec5\u5f53\u7cfb\u7edf\u652f\u6301 CLI \u6a21\u5f0f<br \/>PHP \u65f6\u624d\u80fd\u5de5\u4f5c\uff0c\u4e14\u8be5\u51fd\u6570\u4e0d\u9002\u7528\u4e8e Windows \u7cfb\u7edf\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<p>scandir()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u5217\u51fa\u6307\u5b9a\u8def\u5f84\u4e2d\u7684\u6587\u4ef6\u548c\u76ee\u5f55\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u4e2d<!--more--><\/p>\n<p>chgrp()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u6539\u53d8\u6587\u4ef6\u6216\u76ee\u5f55\u6240\u5c5e\u7684\u7528\u6237\u7ec4\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<p>chown()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u6539\u53d8\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u6240\u6709\u8005\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<p>shell_exec()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u901a\u8fc7 Shell \u6267\u884c\u547d\u4ee4\uff0c\u5e76\u5c06\u6267\u884c\u7ed3\u679c\u4f5c\u4e3a\u5b57\u7b26\u4e32\u8fd4\u56de\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<p>proc_open()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u6267\u884c\u4e00\u4e2a\u547d\u4ee4\u5e76\u6253\u5f00\u6587\u4ef6\u6307\u9488\u7528\u4e8e\u8bfb\u53d6\u4ee5\u53ca\u5199\u5165\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<p>proc_get_status()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u83b7\u53d6\u4f7f\u7528 proc_open() \u6240\u6253\u5f00\u8fdb\u7a0b\u7684\u4fe1\u606f\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<p>error_log()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u5c06\u9519\u8bef\u4fe1\u606f\u53d1\u9001\u5230\u6307\u5b9a\u4f4d\u7f6e\uff08\u6587\u4ef6\uff09\u3002<br \/>\u5b89\u5168\u5907\u6ce8\uff1a\u5728\u67d0\u4e9b\u7248\u672c\u7684 PHP \u4e2d\uff0c\u53ef\u4f7f\u7528 error_log() \u7ed5\u8fc7 PHP safe mode\uff0c<br \/>\u6267\u884c\u4efb\u610f\u547d\u4ee4\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u4f4e<\/p>\n<p>ini_alter()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u662f ini_set() \u51fd\u6570\u7684\u4e00\u4e2a\u522b\u540d\u51fd\u6570\uff0c\u529f\u80fd\u4e0e ini_set() \u76f8\u540c\u3002<br \/>\u5177\u4f53\u53c2\u89c1 ini_set()\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<p>ini_set()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u53ef\u7528\u4e8e\u4fee\u6539\u3001\u8bbe\u7f6e PHP \u73af\u5883\u914d\u7f6e\u53c2\u6570\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<p>ini_restore()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u53ef\u7528\u4e8e\u6062\u590d PHP \u73af\u5883\u914d\u7f6e\u53c2\u6570\u5230\u5176\u521d\u59cb\u503c\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<p>dl()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u5728 PHP \u8fdb\u884c\u8fd0\u884c\u8fc7\u7a0b\u5f53\u4e2d\uff08\u800c\u975e\u542f\u52a8\u65f6\uff09\u52a0\u8f7d\u4e00\u4e2a PHP \u5916\u90e8\u6a21\u5757\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<p>pfsockopen()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u5efa\u7acb\u4e00\u4e2a Internet \u6216 UNIX \u57df\u7684 socket \u6301\u4e45\u8fde\u63a5\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<p>syslog()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u53ef\u8c03\u7528 UNIX \u7cfb\u7edf\u7684\u7cfb\u7edf\u5c42 syslog() \u51fd\u6570\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u4e2d<\/p>\n<p>readlink()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u8fd4\u56de\u7b26\u53f7\u8fde\u63a5\u6307\u5411\u7684\u76ee\u6807\u6587\u4ef6\u5185\u5bb9\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u4e2d<\/p>\n<p>symlink()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u5728 UNIX \u7cfb\u7edf\u4e2d\u5efa\u7acb\u4e00\u4e2a\u7b26\u53f7\u94fe\u63a5\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<p>popen()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u53ef\u901a\u8fc7 popen() \u7684\u53c2\u6570\u4f20\u9012\u4e00\u6761\u547d\u4ee4\uff0c\u5e76\u5bf9 popen() \u6240\u6253\u5f00\u7684\u6587\u4ef6\u8fdb\u884c\u6267\u884c\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<p>stream_socket_server()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u5efa\u7acb\u4e00\u4e2a Internet \u6216 UNIX \u670d\u52a1\u5668\u8fde\u63a5\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u4e2d<\/p>\n<p>putenv()<br \/>\u529f\u80fd\u63cf\u8ff0\uff1a\u7528\u4e8e\u5728 PHP \u8fd0\u884c\u65f6\u6539\u53d8\u7cfb\u7edf\u5b57\u7b26\u96c6\u73af\u5883\u3002\u5728\u4f4e\u4e8e 5.2.6 \u7248\u672c\u7684 PHP \u4e2d\uff0c\u53ef\u5229\u7528\u8be5\u51fd\u6570<br \/>\u4fee\u6539\u7cfb\u7edf\u5b57\u7b26\u96c6\u73af\u5883\u540e\uff0c\u5229\u7528 sendmail \u6307\u4ee4\u53d1\u9001\u7279\u6b8a\u53c2\u6570\u6267\u884c\u7cfb\u7edf SHELL \u547d\u4ee4\u3002<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<p>\u7981\u7528\u65b9\u6cd5\u5982\u4e0b\uff1a<br \/>\u6253\u5f00\/etc\/php.ini\u6587\u4ef6\uff0c<br \/>\u67e5\u627e\u5230 disable_functions \uff0c\u6dfb\u52a0\u9700\u7981\u7528\u7684\u51fd\u6570\u540d\uff0c\u5982\u4e0b\uff1a<br \/>\u5371\u9669\u7b49\u7ea7\uff1a\u9ad8<\/p>\n<pre>eval,passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,symlink,popepassthru,fsocket,fsockopen<\/pre>\n<p>\u5371\u9669\u7b49\u7ea7\uff1a\u4e2d<\/p>\n<pre>phpinfo,stream_socket_server,readlink,syslog,scandir<\/pre>\n<p>\u5371\u9669\u7b49\u7ea7\uff1a\u4f4e<\/p>\n<pre>error_log<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>phpinfo()\u529f\u80fd\u63cf\u8ff0\uff1a\u8f93\u51fa PHP \u73af\u5883\u4fe1\u606f\u4ee5\u53ca\u76f8\u5173\u7684\u6a21\u5757\u3001WEB \u73af\u5883\u7b49\u4fe1\u606f\u3002\u5371\u9669\u7b49\u7ea7\uff1a\u4e2d passt [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-2000","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/posts\/2000","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.huzs.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2000"}],"version-history":[{"count":1,"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/posts\/2000\/revisions"}],"predecessor-version":[{"id":2001,"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/posts\/2000\/revisions\/2001"}],"wp:attachment":[{"href":"https:\/\/www.huzs.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.huzs.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.huzs.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}