In this video, we cover Lab #3 in the Command Injection module of the Web Security Academy. This lab contains a blind OS command injection vulnerability in the feedback function. The application executes a shell command containing the user-supplied details. The output from the command is not returned in the response. However, you can use output redirection to capture the output from the command. There is a writable folder at: /var/www/images/.
The application serves the images for the product catalog from this location. You can redirect the output from the injected command to a file in this folder, and then use the image loading URL to retrieve the contents of the file. To solve the lab, we execute the whoami command and retrieve the output.
▬ 🌟 Video Sponsor 🌟 ▬▬▬▬▬▬▬▬▬▬
Purchase the Hacking Fundamentals Bundle: https://hackersacademy.com/courses/ha... (affiliate link)
▬ ✨ Support Me ✨ ▬▬▬▬▬▬▬▬▬▬
Buy my course: https://bit.ly/30LWAtE
▬ 📖 Contents of this video 📖 ▬▬▬▬▬▬▬▬▬▬
00:00 - Introduction
00:13 - Hackers Academy sponsorship (https://hackersacademy.com/courses/ha...)
02:05 - Navigation to the exercise
02:37 - Understand the exercise and make notes about what is required to solve it
04:32 - Exploit the lab manually
09:49 - Script the exploit in Python
27:09 - Summary
27:41 - Thank You
▬ 🔗 Links 🔗 ▬▬▬▬▬▬▬▬▬▬
Python script: https://github.com/rkhal101/Web-Secur...
Notes.txt document: https://github.com/rkhal101/Web-Secur...
Web Security Academy Exercise Link: https://portswigger.net/web-security/...
Rana's Twitter account: / rana__khalil