SUCTF 2018——Anonymous(php匿名函数 \x00lambda_)

 题目地址:http://45.76.173.177:23334/

 1 <?php
 2     $MY = create_function("","die(`cat flag.php`);");
 3     $hash = bin2hex(openssl_random_pseudo_bytes(32));
 4     eval("function SUCTF_$hash(){"
 5         ."global \$MY;"
 6         ."\$MY();"
 7         ."}");
 8     if(isset($_GET['func_name'])){
 9         $_GET["func_name"]();
10         die();
11     }
12     show_source(__FILE__);

 

create_function的匿名函数也是有名字的,名字是\x00lambda_%d,其中%d代表他是当前进程中的第几个匿名函数,所以直接拿burp爆破即可

posted @ 2018-10-19 20:53  淚笑  阅读(1305)  评论(0编辑  收藏  举报