Post

Challenge 8:Inquisitio et Expugnatio

This is a detailed writeup created for challenges associated with the Certified Web AppSecurity Expert (CWAE) certification.

Challenge 8:Inquisitio et Expugnatio

Challenge/Task

  1. Inquisitio et Expugnatio

Proof-of-Concept (POC):

I try to find if there is any possible SQL injection in the system. Saw this post method that contains few parameters.

POC-otb

I copy all the request to the file and named it as “sql.req”. I fire up the SQLmap and let the tools running to test the parameters. Unfortunately, all the parameters are secure.

POC-otb

Then I try to visit any possible endpoints that are exist in the system, I noticed that it redirects me to the /home page. Upon checking the request below, there is a cookie “redir=eyJsb2NhdGlvbiI6ICIvaG9tZSJ9”. I suspect that redir meaning redirection which may refer to the redirection to the /home page. The value is encoded with Base64

POC-otb

I try to decode the Base64. Yup it is showing me the /home page where it used to redirect any user to the home page.

POC-otb

I try to insert (‘1’) at the /home value to see what the server response to the single quote is. Fortunately, it returns 500 Server error. Usually, single quote is used to test SQL syntax error. Seems that I need to test the SQL injection payload here.

POC-otb POC-otb

I try to use 1 or 1=1 payload and encoded it to base64 again and put in the redir param value.

POC-otb

The server response me with 500 showing a server error. But surprisingly, it shows me all the DB inside the system because the payload we are using just now is a true statement.

POC-otb POC-otb

This post is licensed under CC BY 4.0 by the author.