Easy Digital Forensics & IR +200 XP

FiPloit

A PHP web application handles file operations and uploads with insufficient security controls. Through careful analysis of file inclusion mechanisms and upload restrictions, skilled attackers can transform seemingly harmless functionality into powerful attack vectors. 🎯 Time to demonstrate file exploitation techniques!

30% solve it 460 hackers played 2 flags Updated Oct 12, 2026 First blood bloman
Local File InclusionFile Upload BypassPHP SecurityDirectory TraversalWeb Shell ExploitationPrivilege Escalation
Start Your Challenge
  1. 1Create a free account, then click "Start Lab"You'll get your own private machine with an IP address
  2. 2Explore the targetOpen the IP in your browser and look for vulnerabilities
  3. 3Find and submit flagsFlags are secret text strings hidden in the system - paste them below to score
  • ~1-2 min setup
  • Private instance
  • 30 min per session. Restart it for free, as often as you like.

Local File Inclusion (LFI) and insecure file upload vulnerabilities are among the most common and dangerous flaws found in PHP web applications. LFI allows attackers to read arbitrary files from the server by manipulating file path parameters, while insecure file upload mechanisms can be exploited to place malicious code on the server. When combined, these vulnerabilities create a devastating attack chain that progresses from information disclosure to remote code execution and complete system compromise.

Understanding Local File Inclusion

Local File Inclusion occurs when a PHP application uses user-controllable input in file inclusion functions like include(), require(), or file_get_contents() without proper validation. A vulnerable URL pattern like page.php?file=about.html can be exploited by changing the parameter to page.php?file=../../../../etc/passwd, using directory traversal sequences to navigate the file system and read sensitive files. Common targets include /etc/passwd for user enumeration, /etc/shadow for password hashes, application configuration files containing database credentials, and log files that can be poisoned for code execution.

Advanced LFI techniques include PHP filter wrappers like php://filter/convert.base64-encode/resource= for reading PHP source code, null byte injection in older PHP versions to bypass extension appending, and log poisoning where malicious PHP code is injected into server logs and then included through the LFI vulnerability to achieve code execution.

Insecure File Upload Exploitation

File upload vulnerabilities arise when applications fail to properly validate uploaded files. Common bypass techniques include changing the Content-Type header to an allowed MIME type, using double extensions like shell.php.jpg, exploiting null bytes in filenames, and uploading files with alternative PHP extensions like .phtml, .php5, or .pht. Once a web shell is successfully uploaded, the attacker can execute commands, enumerate the server, and pivot to other systems.

Defending Against File-Based Attacks

Prevention requires input validation using allowlists for file inclusion parameters, storing uploads outside the web root, renaming uploaded files to random names, validating file content rather than just extensions, and implementing proper file permissions. Web Application Firewalls can detect common LFI patterns but should not be the sole defense.

What You Will Learn

  • Understand Local File Inclusion vulnerabilities and directory traversal techniques
  • Learn to bypass file upload restrictions using extension and content-type manipulation
  • Master web shell deployment and remote code execution on PHP servers
  • Practice privilege escalation from web application access to system-level control
  • Develop comprehensive PHP web application security assessment skills

Prerequisites

Basic understanding of PHP and web applications Familiarity with Linux file system structure Knowledge of HTTP requests and web server basics