Hey guys,
I recently did the Cybersecurity challenge in the UK, and was stumped by one of the questions. The ones I did get turned out to be pretty simple in the end, and I'm sure this will be no exception.
The question asks what is the protected content on the following page:
http://target.uk.securitytreasurehunt.com/admin.php
The source of said page says:
"adam refuses to turn on cookies, added $_GET check just for him"
This leads me to believe the solution is a simple case of passing a value in the URL, as admin is a valid username on the system (confirmed on the log in page) I originally tried appending ?user=admin and then went a little mad and tried appending everything. Even things that don't make sense. ESPECIALLY things that don't make sense.
My mate Google tells me that unprotected $_GETs can be used in XSS attacks, but my tiny mind cannot fathom how I could use XSS to get access to the content. Obviously I tried anyway, here's some code for your amusement:
I'm not quite sure how opening the same page would help, but you can imagine the glimmer of hope as I was thinking to myself that it would never work. Which it unsurprisingly didn't.
Anyway, needless to say I failed the challenge, I'm not going to live the James Bond lifestyle and save the World with a fortuitous kill -9 while earning a six figure salary from GCHQ. Instead though, I hope one of you lovely people will put me out of my misery and tell me how in the name of all that is holy you access the site.
I recently did the Cybersecurity challenge in the UK, and was stumped by one of the questions. The ones I did get turned out to be pretty simple in the end, and I'm sure this will be no exception.
The question asks what is the protected content on the following page:
http://target.uk.securitytreasurehunt.com/admin.php
The source of said page says:
"adam refuses to turn on cookies, added $_GET check just for him"
This leads me to believe the solution is a simple case of passing a value in the URL, as admin is a valid username on the system (confirmed on the log in page) I originally tried appending ?user=admin and then went a little mad and tried appending everything. Even things that don't make sense. ESPECIALLY things that don't make sense.
My mate Google tells me that unprotected $_GETs can be used in XSS attacks, but my tiny mind cannot fathom how I could use XSS to get access to the content. Obviously I tried anyway, here's some code for your amusement:
Code:
<script>
window.location.href = "http://target.uk.securitytreasurehunt.com/admin.php"
I'm not quite sure how opening the same page would help, but you can imagine the glimmer of hope as I was thinking to myself that it would never work. Which it unsurprisingly didn't.
Anyway, needless to say I failed the challenge, I'm not going to live the James Bond lifestyle and save the World with a fortuitous kill -9 while earning a six figure salary from GCHQ. Instead though, I hope one of you lovely people will put me out of my misery and tell me how in the name of all that is holy you access the site.