Information disclosure on debug page
In this post we will walk step by step through how to solve Information disclosure on debug page on PortSwigger. This lab’s difficulty is Apprentice and it is the second lab on Information disclosure on Portswigger.
Link to lab: https://portswigger.net/web-security/information-disclosure/exploiting/lab-infoleak-on-debug-page
To start the lab click the ‘Access the Lab’ button.
As we begin the lab we encounter a shop page showcasing several products. It’s worth noting that the products may differ from the screenshot as PortSwigger Labs can vary the content with each lab session. So, don’t worry if your products look different.
Looking for a debug page we have a couple options. We can use file and directory brute forcing to try and discover a debug page. A simple step though would be to analyze the source code of the page to see if a developer left behind sensitive information.
Looking at the source code we find the developers did indeed leave behind a comment with sensitive information.
Navigating to /cgi/phpinfo.php we find a PHP Info page displaying sensitive information regarding the version of PHP on other system information.
Navigating down we come across the SECRET_KEY we are looking for.
Submitting the SECRET_KEY using the Submit Solution button means we have successfully solved the lab!
If you found this helpful, please send me a tweet and tell me what you thought! Feedback is always appreciated!
That completes the lab! Well done! If you found this helpful, please send me a tweet and tell me what you thought! Feedback is always appreciated!
Jarrod