Post

Local File Inclusion

Statement

Get in the admin section.

Analyzation

Click the challenge’s link first click

Nothing much to do. Click on any tab.

click tab

There is a query. So I guess files is for a directory.

Click on any file on the screen

click file

There is a new query. This time I guess f is for a file.

Let’s do some path traversal

travel back two times

So we can only travel back to one directory.

travel back one time

There is it, admin. But is it a file or a directory? Try both of them, I know it is a directory.

admin directory

index.php file! Read it

index.php

Check these lines in that file

1
2
$realm = 'PHP Restricted area';
$users = array('admin' => 'OpbNJ60xYpvAQU8');

That’s our flag.

The flag is

1
OpbNJ60xYpvAQU8
This post is licensed under CC BY 4.0 by the author.