hackXpert labs
All labs › Local File Inclusion

📁 Local File Inclusion

Find the parameter that names a file, then walk upwards until the application stops you - and work out why it stopped you.

4 labs and targetsfree, no accountlesson included
How files & paths actually works — taught by The XSS Rat

What it is

Anywhere a filename or a path reaches the filesystem, the question is whether you can steer it. Include a local file, include a remote one, or upload something the server is willing to execute - all three come from the same trust mistake.

How I attack it

  1. Find the parameter that names a file, then walk upwards and see where the app stops you.
  2. If a prefix or suffix is added, work with it: known directories, null bytes on old stacks, encoding tricks against a weak filter.
  3. For uploads, separate the three checks - extension, content type and content - and defeat them one at a time.
  4. Know what you want to read before you start: configs, credentials, source, and on Linux /proc for the quick wins.

Learn it from The XSS Rat

Free reference reading

The set 4

Endpoint 2

Now a prefix is added to whatever you send.

Also here 1

Nothing matches thatClear the filter to see everything again.