Skip to content

CyberCTF/php-lfi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Local File Inclusion (LFI) Vulnerability

Learn to identify and exploit Local File Inclusion vulnerabilities in PHP web applications to access sensitive configuration files and extract critical information.

Description

This lab demonstrates a vulnerable independent cinema platform called Cinematika. The application contains a page routing system that is vulnerable to Local File Inclusion (LFI) through improper input sanitization, allowing attackers to read arbitrary files from the server filesystem.

Objectives

  • Identify a Local File Inclusion vulnerability
  • Exploit directory traversal to access system files
  • Extract sensitive configuration data from PHP source files
  • Understand the impact of insecure file inclusion

Difficulty

Intermediate

Estimated Time

30-45 minutes

Prerequisites

  • Basic understanding of web application security
  • Knowledge of directory traversal techniques
  • Familiarity with PHP file inclusion
  • Understanding of HTTP requests and responses

Project Structure

├── deploy/          # Docker configuration and application files
│   ├── index.php    # Main application entry point (vulnerable)
│   ├── config.php   # Configuration file containing sensitive data
│   └── templates/   # HTML templates
├── test/            # Automated vulnerability tests
├── docs/            # Documentation
├── README.md        # This file
└── .gitignore

Quick Start

Prerequisites

Docker and Docker Compose installed locally.

Installation

  1. Clone the repository
  2. Navigate to the project directory
  3. Run the application:
    cd deploy
    docker-compose up --build -d
  4. Visit http://localhost:3206 and start testing the page parameter

Issue Tracker

Report issues at: https://github.com/ctf-labs/php-lfi/issues

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published