Challenge Web & API Security +50 XP

Corporate Breach 2

Start the machine, hack the system, and find the hidden flags to complete this challenge and earn XP!

76% solve it 33 hackers played 1 flag Updated Oct 06, 2026 First blood 3xpl0it3r
Web SecurityPHPLFIPath ManipulationFile Inclusion
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) vulnerabilities with filter bypasses represent an intermediate-level web security challenge. While many developers are aware of basic LFI attacks using directory traversal sequences, they often implement incomplete protections that can be circumvented by attackers who understand the underlying file inclusion mechanisms. Learning to bypass these filters is essential for effective security testing.

Understanding PHP File Inclusion

PHP's include and require functions dynamically load and execute files at runtime. When the file path is constructed using user input, it creates a file inclusion vulnerability. Many PHP applications automatically append a file extension (like .php) to the included path, which developers mistakenly believe prevents attackers from reading arbitrary files. However, several techniques exist to work around automatic extension appending, depending on the PHP version and server configuration.

Common Filter Bypass Techniques

When developers implement basic protections against LFI, they often block specific patterns like "../" or ".php" in user input. However, these filters can frequently be bypassed through URL encoding (replacing characters with %xx sequences), double encoding, null byte injection (on older PHP versions), using alternative path separators, or exploiting the application's path normalization logic. Understanding the specific filter implementation is key to identifying the appropriate bypass technique.

Impact of LFI on Web Applications

Successful LFI exploitation can expose sensitive files including application source code, configuration files with database credentials, system files like /etc/passwd, web server configuration files like .htaccess and .htpasswd, and log files that may contain additional sensitive information. In some cases, LFI can be escalated to remote code execution through techniques like log poisoning, PHP filter chains, or including uploaded files. The severity of LFI makes it a high-priority finding in any web security assessment.

What You Will Learn

  • How PHP file inclusion mechanisms work internally
  • Filter bypass techniques for Local File Inclusion attacks
  • Path manipulation and encoding tricks for evading security filters
  • Reading sensitive server files through LFI vulnerabilities
  • Why input filtering alone is insufficient for preventing LFI

Prerequisites

Basic understanding of LFI PHP web application concepts URL encoding knowledge