1. Objective Find the password for natas level 16. URL: http://natas15.natas.labs.overthewire.org 2. Introduction After opening the webpage, we see a search form. The website allows us to search for users and responds with either "This user doesn't exist" or "This user exists" depending on whether the user was found or not. user natas16 3. Exploration Clicking on the View source code link we are able to view the logic of the server side code. The following code snippets shows that the provided username is searched for in the database and the corresponding result is returned $query = "SELECT * from users where username=\"".$_REQUEST["username"]."\""; if(mysqli_num_rows($res) > 0) { echo "This user exists."; } else { echo "This user doesn't exist."; } Ju...
1. Objective Find the password for natas level 15. URL: http://natas14.natas.labs.overthewire.org 2. Introduction After opening the webpage, we see a login form. We need to get the correct credentials or somehow bypass the login page in order to proceed to the next level. 3. Exploration Clicking on the View sourcecode link we are able to view the logic of the server side code. The following code snippet is used to query the database to check if the username and password are valid $query = "SELECT * from users where username=\"".$_REQUEST["username"]."\" and password=\"".$_REQUEST["password"]."\""; However, we immediately notice that the input is not being sanitized and is being used directly in the query via string concatenation. These shows us that there is potential for sq injection SQL injection is a cyber attack that exploits vulne...