This repository is a Dockerized php application containing a LFI (Local File Inclusion) vulnerability which can lead to RCE (Remote Code Execution).
The ideas behind the challenge are:
- Bypass path traversal sanitization
- Execute OS command through LFI vulnerability.
Using docker hub (Quickest):
- To access the challenges, you need docker installed.
- Run this command to pull and run the image from docker hub:
sudo docker run -d -p 9005:80 moeinfatehi/lfi-to-rce-scenario
- Access the challenges with this URL: http://localhost:9005
Help:
-d: detached mode (You can use terminal after running command
-p: specifies port (you can change 9005 to whatever you want. If you don't have a web server on your host, set it to 80)
Using docker-compose:
- To access the challenges, you need docker and docker-compose installed.
- Clone the repository
git clone https://github.com/moeinfatehi/lfi-to-rce-scenario.git
- Open the main directory of the project (where docker-compose.yml file exists) and run:
docker-compose up
- Access the challenges with this URL: http://localhost:9005
This project is for Educational purpose ONLY. The usual disclaimer applies, especially the fact that I'm not liable for any damages caused by direct or indirect use of the information or functionality provided by these programs. The author or any Internet provider bears NO responsibility for content or misuse of these programs or any derivatives thereof. By using these project you accept the fact that any damage (dataloss, system crash, system compromise, etc.) caused by the use of this program is not my responsibility.
If you have any further questions, please don't hesitate to contact me via my twitter account.