Hacker101 – BugDB v2

Alright let’s get starting with BugDBv2, similar to the first BugDBv1, it is on GraphiQL.

So for this BugDBv2, there is additional ‘Root’ type called ‘mutation’. You can find it under the tab button called ‘Docs’.
explore_mut
Click on ‘MyMutattions’ and it will show you a field structure.
modified_fields

I searched up, what is ‘Mutation’ in GraphiQL, and this it what it tells me Mutation queries modify data in the data store and returns a value. It can be used to insert, update, or delete data. Mutations are defined as a part of the schema.

So the field type under ‘MyMutation’ is a modified data field type. A this point, this is all I know of, but I was a bit clueless so I went to get hint and the first hint given to me was “What has changed since last version?”.

What has changed? In the previous BugDBv1, I was able to query the subfield type called ‘bug’ where its subfield type called ‘text’ was able to give me the flag. So I queried the same thing for this BugDBv2 and I got an error message which is…
error

Since I can’t query the field type “bug”, it means that the flag is in there. I went to query the object type ‘allBugs’ but I found nothing.
admin_bug
I was thinking that why is it only the ‘admin’ bug shown and not ‘victim’ bug. I thought it was the field ‘private’ that prevent ‘victim’ bug to be shown so I went to change it using ‘Mutation’ to modify data in the database.

Taking a look again at the field ‘modfiyBug’
modified_fields
I have to change the field ‘private’ value to ‘false’ for ‘victim’. Note ‘victim’ field ‘id’ is ‘2’
mutation_victim
The rest of the fields, like I told you in the previous post can leave it to the GraphiQL client interfaces where it will list down the suggested field type for us.

And now I input the same query for object type ‘allBugs’.
allBugs
The result return to us have the flag in the subfield type ‘text’ of ‘victim’
flag2

Yayy we finally solve BugDBv2. Thank you for reading it and feel free to leave a comment behind.

Author Derek

Published by bsderek

We are just 2 new authors doing writeup on related Cybersecurity topics to educate ourselves. We encourage you to leave a comment in areas where we can improve in terms of skills/knowledge. If we are incorrect in our writeup , please informed us and send us article to read to better educate ourselves. Feel free to leave a comment behind. Hope you have a nice day!! And don’t forget to hack your life away!!! Peace (00)

Leave a comment

Design a site like this with WordPress.com
Get started