---
description: APPRENTICE
---

# Accessing private GraphQL posts

### Task

The blog page for this lab contains a hidden blog post that has a secret password. To solve the lab, find the hidden blog post and enter the password. In this task, I will be using Burpsuite and the [InQL tool on CLI](https://blog.doyensec.com/2020/03/26/graphql-scanner.html).

#### Burpsuite Steps

First the user should launch the lab open and set up their proxy to intercept requests from the target.&#x20;

Once the academy site is live, you can immediately view/intercept the first request. I will look something like this:

![](https://850580359-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSqAgfe92W3tM8LBhIHHu%2Fuploads%2Feiha2pNuqg8J9MZApNKw%2Fimage.png?alt=media\&token=3461857e-633a-4036-88dc-2e917b81c247)

There are a few interesting things to point out and the first is the /graphql/v1 URL and the second is the ID parameters in the response. If you view the entire response you can clearly see that "ID":3 is missing. This is a great indication that the missing blog is under the parameter number 3.

To attempt accessing this blog, you can grab the entire url [https://\<burp-id>.web-security-academy.net/graphql/v1](https://0a2800e5033aec8680dbe921006300a2.web-security-academy.net/graphql/v1) and paste it into the InQL Scanner.

The InQL Scanner should be downloaded from the Burpsuite store, You will also need to download jython.

![](https://850580359-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSqAgfe92W3tM8LBhIHHu%2Fuploads%2F2lDBIV0MWN8u8oQfXIar%2Fimage.png?alt=media\&token=d68e6590-da4f-41fa-b13f-500af2d8c2bf)

Once you have you /graphql/v1 url, you should paste it into the InQL scanner like so

![](https://850580359-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSqAgfe92W3tM8LBhIHHu%2Fuploads%2FpPhIjlS6Ak9htP4EqOtO%2Fimage.png?alt=media\&token=976b5632-fd18-402a-ad93-d054fb2161d0)

The extension will take a second or two to load in the information, but once done correctly you will see something like this

![](https://850580359-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSqAgfe92W3tM8LBhIHHu%2Fuploads%2FWwiOdhycwHbtMWVhIC2R%2Fimage.png?alt=media\&token=8718f3e0-11f1-453c-9d64-e60ed361a673)

Here the the parameter postPassword makes an appearance, which has not done so before in the other parameter id's.

After intercepting any blog post from the main blog page, you can clearly see where the edit and change can be made for the parameter id's.

![](https://850580359-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSqAgfe92W3tM8LBhIHHu%2Fuploads%2Fb44ocOJx7kTFJ5VbaWsY%2Fimage.png?alt=media\&token=85ce7e38-8640-4cd6-8d89-330a7f43f102)

Changing the id parameter to 3 and any other query field to postPassword allows users to view and submit the flag for this challenge.

![](https://850580359-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSqAgfe92W3tM8LBhIHHu%2Fuploads%2FBcd1OsOpEd67T4CZ6lkv%2Fimage.png?alt=media\&token=aa5446b2-e289-4c34-b878-b286baa2d9d2)

#### CLI Steps

For This method you will need to download the InQL tool with `pip install inql`

Once the tool is downloaded, you can use python3 and the directory of the InQL tool against the target URL. It is useful to note that you should create an output directory with the -o flag.

![](https://850580359-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSqAgfe92W3tM8LBhIHHu%2Fuploads%2FYBH9988tyAWWJzrmFu82%2Fimage.png?alt=media\&token=76dde8d3-cdfd-45c7-bde1-ef430e95331f)

Next, you can travel to the created directory and within the 'query' directory you will find the results of the hidden field within the JSON formatted file.

![](https://850580359-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSqAgfe92W3tM8LBhIHHu%2Fuploads%2FDcfJcplnsVMAQyhJTcfk%2Fimage.png?alt=media\&token=77ac0b14-21c6-4660-b91b-61d4159442a4)

Using this information, you can make a modification inside the Firefox browser to retrieve the flag information.

![](https://850580359-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSqAgfe92W3tM8LBhIHHu%2Fuploads%2FHN6xODYrhHErdLmZjDoJ%2Fimage.png?alt=media\&token=6dcc457f-9624-491c-82a2-54ac1dfc5868)

![](https://850580359-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSqAgfe92W3tM8LBhIHHu%2Fuploads%2FOjrT5eIXmRga4GncQ54y%2Fimage.png?alt=media\&token=25c478f7-7006-432d-9ab7-78193ab388ee)
