Testing for code injection
Code injection is a vulnerability that involves injecting code into the application that is then interpreted or executed by the application. This vulnerability allows an attacker to get information from the backend of the application all the way up to fully compromising the application.
In this recipe, we will walk you through the Remote code execution via web shell upload PortSwigger lab to create and upload a new file via the web application feature that includes the code injection payload.
Getting ready
This lab requires a PortSwigger Academy account and ZAP to intercept requests and responses from the server to your browser.
How to do it...
In this lab, you will be exposed to a vulnerable image upload feature that does not validate the files uploaded by users before putting them on the server’s storage.
You will exploit this flaw by uploading a simple PHP web shell and utilizing it to exfiltrate the contents of the /
home/carlos...