Leaky site

the challenge description tell us to find the source code of main_page so this is a hint that the flag is there

let's visit the website https://thecybercoopctf-leaky-site.chals.io

we have in the url a query parameter that fetches resources and when we visit the website it fetches the resource main_page

so its obvious that this website may be vulnerable to LFI Local File Inclusion

to get the source code we are going to use a PHP Wrapper php://filter and this feature gets the content of the fetched encoded in base64

Payload :

https://thecybercoopctf-leaky-site.chals.io/index.php?resource=php://filter/convert.base64-encode/resource=main_page

decoding this base64 string we get the main_page source code and there is our flag

Flag :

flag{0h_n0_php_y0ur_l3aking_4ll_0ver}

Last updated

Was this helpful?