Skip to content

File Inclusion Banner

File Inclusion Logo

File Inclusion

This guide contains the answer and steps necessary to get to them for the File Inclusion room.

Table of contents

Path Traversal

  1. What function causes path traversal vulnerabilities in PHP?

The answer can be found in the text.

Click for answerget_file_contents

Local File Inclusion - LFI

Passwd

  1. Give Lab #1 a try to read /etc/passwd. What would the request URI be?

Passwd 2

Click for answer/lab1.php?file=/etc/passwd

  1. In Lab #2, what is the directory specified in the include function?

Directory

Click for answerincludes

Local File Inclusion - LFI #2

  1. Give Lab #3 a try to read /etc/passwd. What is the request look like?

Passwd 1

Click for answerlab3.php?file=../../../../etc/passwd%00

  1. Which function is causing the directory traversal in Lab #4?

The answer is the same as for the previous task.

Click for answerget_file_contents

  1. Try out Lab #6 and check what is the directory that has to be in the input field?

Folder Passwd

Click for answerTHM-profile

  1. Try out Lab #6 and read /etc/os-release. What is the VERSION_ID value?

Os

Click for answer12.04

Challenge

Challenges 3 Challenges 3 Body Challenges Admin Challenges Admin Cookie

  1. Capture Flag1 at /etc/flag1

Challenges Flag 1

Click for answerF1x3d-iNpu7-f0rrn

  1. Capture Flag2 at /etc/flag2

Challenges Flag 2

Click for answerc00k13_i5_yuMmy1

  1. Capture Flag3 at /etc/flag3

Challenges Flag 3

Click for answerP0st_1s_w0rk1in9

  1. Gain RCE in Lab #Playground /playground.php with RFI to execute the hostname command. What is the output?

Click for answerlfi-vm-thm-f8c5b1a78692