Walkthrough 1900
Walkthrough 1900
URL https://attackdefense.com/challengedetails?cid=1900
Important Note: This document illustrates all the important steps required to complete this lab.
This is by no means a comprehensive step-by-step solution for this exercise. This is only
provided as a reference to various commands needed to complete this exercise and for your
further research on this topic. Also, note that the IP addresses and domain names might be
different in your lab.
Command: ifconfig
The IP address of the host machine is 192.183.205.2. Therefore, the target machine has IP
address 192.183.205.3
Step 3: Interacting with the web application.Open the following URL in firefox:
URL: http://192.183.205.3
bWAPP is hosted on the target machine.
Login into the webapp using the following credentials (indicated above the login fields):
Username: bee
Password: bug
After successful login:
Step 4: Select “PHP Code Injection” from the “Choose your Bug” dropdown menu:
Step 5: Click on the text “message” (in bold) to echo back a test message:
Notice the URL. There is a message parameter in the URL containing the text that is echoed
back to the page.
Step 6: Insert "hello" message in the message parameter and check the response.
Step 7: Perform PHP Code Injection and execute phpinfo function to retrieve information about
the web server.
Modified URL:
http://192.183.205.3/phpi.php?message=hello;system(%27cat%20/etc/passwd%27)
The content of /etc/passwd file is dumped on the web page.
References:
1. OWASP A1 Injection
(https://owasp.org/www-project-top-ten/OWASP_Top_Ten_2017/Top_10-2017_A1-Inject
ion)
2. OWASP Top 10 (https://owasp.org/www-project-top-ten/)
3. bWAPP (http://www.itsecgames.com/)