Post

Webverselabs Challenge Breach GraphQL

Webverselabs Challenge Breach GraphQL

Scenario :

Breach is an internal collaboration tool where teams share notes and documents. The developers implemented access controls, but the architecture has layers — and not all of them agree on who can see what.

Solution :

image

We start by navigating the app just like a normal user, check the different endpoints , see if we find anything interesting, from there we check Burp’s History to see what requests were made to the server .

/Profile :

image

This returns information about our profile, we see that we have an ID , we will keep this in mind.

/Teams :

image

This lists Team members we see that danial is the Administrator , we will note this info as well .

/About !

Finally the About page is just a static page that returns information about the company :

image

Nothing really useful .

Let’s check Burp’s History :

image

We see that we have a GraphQL endpoint , which means the app uses graphql :

I already have a detailed section on my mehtodology on how we can attack GraphQL :

1
https://elmehdilaassiri.github.io/posts/web-app-pentesting-methodology/#graphql-

Now first thing to test whenever we have GraphQL is the introspection query , as this will return valuable information about the entire structure of the backend, and we can use that with a tool like Voyager to be able to view the entire structure as a graph.

First we identify the engine being used :

1
2
3
+ We can use graphw00f , it will send multiple queries to identify the engine used : 
https://github.com/dolevf/graphw00f
python3 main.py -d -f -t https://6d887ea1-4327-breach-2308d.challenges.webverselabs-pro.com/about

Once again the engine used is Apollo :

image

It also gives us a link to check for misconfigurations on Apollo :

image

We see that by default Introspection is enabled on this engine , we can try and use Burp to send the introspection request :

image

If we send the introspection request :

image

We get the response which we can paste into Voyager to be able to get the entire structure of the backend in a graph.

image

We see that we have the flag query which we can try , we already have the fields we need to retrieve :

image

If we try that , we get an error. Looking back at the Graph from Voyager :

image

We can see that the Flag Query requires a parameter which is debug , which takes a Boolean .

Now if we add this to our Request :

image

We get our flag .

That was all for this challenge, see you in the next one :)

This post is licensed under CC BY 4.0 by the author.