首页 > 其他分享 >[SWPUCTF 2021 新生赛]finalrce(命令执行无回显rce)

[SWPUCTF 2021 新生赛]finalrce(命令执行无回显rce)

时间:2022-10-09 22:47:29浏览次数:74  
标签:无回显 finalrce SWPUCTF tee 命令 rce

<?php
highlight_file(__FILE__);
if(isset($_GET['url']))
{
    $url=$_GET['url'];
    if(preg_match('/bash|nc|wget|ping|ls|cat|more|less|phpinfo|base64|echo|php|python|mv|cp|la|\-|\*|\"|\>|\<|\%|\$/i',$url))
    {
        echo "Sorry,you can't use this.";
    }
    else
    {
        echo "Can you see anything?";
        exec($url);
    }
}

命令执行无回显rce思路:

1.利用dnslog带外

2.写马

3.反弹shell

4.写文件然后访问文件

该题目我们利用第四个,但由于题目中过滤了 > 符号,因此我们利用tee命令

l``s | tee m.txt

 

标签:无回显,finalrce,SWPUCTF,tee,命令,rce
From: https://www.cnblogs.com/meng-han/p/16773971.html

相关文章

  • SWPUCTF2018SimplePHP-md
    title:SWPUCTF2018SimplePHP.mddate:2022-06-2508:06:23tags:登陆进去之后发现上传文件这里我们试着上传一个shell试试发现过滤了应该直接上传shell不可以这......