TryHackMe ! Vulnversity
This Automates testing which file extensions a web upload endpoint accepts. It repeatedly renames a base file (revshell) to different PHP-related extensions and sends each file to the target upload endpoint. The script prints whether the server response suggests that a particular extension is allowed or rejected.
- The script builds a target URL using the target machine IP and a fixed port/path.
- It iterates a list of candidate file extensions (PHP variants).
- For each extension it renames the local file to that extension, uploads it with an HTTP POST (multipart/form-data), and checks the server response for the string "Extension not allowed".
- It prints whether each extension appears to be allowed or not.
This script is intended for authorized security testing and learning environments (for example, TryHackMe labs). Do not use this against systems you do not have permission to test. Always follow the rules of engagement and local laws.