Hacking GraphQL : Hacker101 CTF BugDB v2
Introduction
This article is in continuation of the first article that you can find here: https://0xsanz.medium.com/hacking-graphql-hacker101-ctf-bugdb-v1-b0d2365814d1
Please read that article first and then follow along.
So go ahead and start the challenge number 2 in GraphQL series from Hacker 101 CTF
Run the Introspection query again and check the schema:
Here we can see that allBugs is bit different then from Level 1. Let’s query allUsers:
So we have username admin and victim.Lets query further using allBugs:
Hmm, we have a private field and lets check if we can modify using the mutation for id 2, which might be our victim:
And yes we modified the private field for id 2. Lets query again using Query 2 which we used above:
And we get our second Flag.
This was a simple example of using Mutation, using which we have exposed some details which were private.Again understanding the schema and formatting the queries is the key here. But if you play around long enough, you will figure it out.
Thanks for reading. Have a nice day.