9.

命令执行漏洞

<html>
<head>
    <title>ctf.show萌新计划web1</title>
    <meta charset="utf-8">
</head>
<body>
<?php
# 包含数据库连接文件,key flag 也在里面定义
include("config.php");
# 判断get提交的参数id是否存在
if(isset($_GET['flag'])){
        if(isset($_GET['flag'])){
                $f = $_GET['flag'];
                if($key===$f){
                        echo $flag;
                }
        }
}else{
    highlight_file(__FILE__);
}

?>
</body>
</html> 

CTFshow萌新计划-Web(三)

 

使用system或者highlight函数

CTFshow萌新计划-Web(三)

 

10.

过滤了system函数,使用PHP语法多次定义,拼凑payload

CTFshow萌新计划-Web(三)

CTFshow萌新计划-Web(三)

 

11.

过滤了cat

使用单引号或者双引号或者反斜杠绕过cat

system('ca""t config.php')

 

12.

CTFshow萌新计划-Web(三)

如图,又禁用了文件名后缀

CTFshow萌新计划-Web(三)

PHP的base64加解密函数:

CTFshow萌新计划-Web(三)

payload:

CTFshow萌新计划-Web(三)

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-08
  • 2021-11-27
  • 2021-11-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案