So I decided to test some basic XSS and got one working:
I couldnโt get anything from this, so I decided to capture the request with Burp and inspect the petition. I noticed that if I sent the petition multiple times, the cookie was always the same for the same user, so now I know that the user cookie is not random:
If I do:
I get that exactly cookie (which is basic md5). I canโt do anything with this also.
So I decided to perform basic SQLi with Burp in the parameter country:
Now I use the generated cookie to load validation.phpagain (I did it with other user btw):
Here we can notice that an exception occurred:
This is a second-order SQLi.
So I can guess that there is a SQL query running behind. I tried a UNION SQLi:
So now we can notice that there are no errors displayed and there seems to be a column named 1. Now I decided to use a python script to execute commands instead of using Burp Repeater:
Iโll enumerate the database with:
Iโm interested in the registration database. So Iโll enumerate it:
It has only a ingle table also called registration:
Now Iโll enumerate it:
Unfortunately, there is no password or whatever. So i decided to try to introduce a webshell using INTO OUTFILE function: