ctf 本地包含 例1

2021-08-29 02:33:33 字數 472 閱讀 6064

<?php  

include "flag.php"; 

$a = @$_request['hello'];//a從get、post獲取hello值。

eval( "var_dump($a);"); //var_dump()列印顯示,eval()閉合這個程式

show_source(__file__); //該段不解析作為乙個字串原樣輸出

現在我們要使flag.php執行並通過show_source(__file__);顯示

針對var_dump()進行操作 首先將他閉合

hello=);

然後我們要執行flag.php 用print_r()列印字串本身 file()讀取檔案內容

ctf本地包括 檔案包含CTF題目

檔案包含 150 2 解題方法 使用php filter協議讀取index檔案。3 原始碼分析 asdf error reporting 0 if get file file get file if strstr file,stristr file,tp stristr file,input str...

CTF練習之檔案包含1

發現如果get請求log引數有對應的值的話,就可以包含flag.txt檔案。發現,如果登入名為admin密碼等於pwh ash就 可以得到 flag pwhash就可以得到flag,pwhash 就可以得 到fla g,pwhash 在index.php原始碼中給出了,只要借出該雜湊就可以了。不過又...

本地包含和遠端包含

本地包含 etc httpd conf httpd.conf etc rc.local 有時可以讀出來apache的路徑 usr local lib php.ini etc hosts.deny 定義禁止訪問本機的主機 etc bashrc bash shell 的系統全域性配置 etc group...