> For the complete documentation index, see [llms.txt](https://anekant-singhais-organization.gitbook.io/why-so-script-kiddie/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://anekant-singhais-organization.gitbook.io/why-so-script-kiddie/ctfs/htb-challenges/web/passman.md).

# Passman

Pandora discovered the presence of a mole within the ministry. To proceed with caution, she must obtain the master control password for the ministry, which is stored in a password manager.

<figure><img src="https://1258745909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPRj67lRKmIcGcfIbPm4a%2Fuploads%2FSZPdvVOsd8DhEohEpQOy%2Fimage.png?alt=media&amp;token=6c339618-dcef-4f10-81e9-27c0f0aee95b" alt=""><figcaption></figcaption></figure>

we create a user and login:

<figure><img src="https://1258745909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPRj67lRKmIcGcfIbPm4a%2Fuploads%2F1wOE0s6IlmZsWoXjhzu7%2Fimage.png?alt=media&amp;token=0064cb8e-891b-4004-b47d-0b2bff443fc0" alt=""><figcaption></figcaption></figure>

we also create a note:

<figure><img src="https://1258745909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPRj67lRKmIcGcfIbPm4a%2Fuploads%2FKAiUVPFfklVH3FIMD4kc%2Fimage.png?alt=media&amp;token=272428b7-b786-4554-873f-152b70299dee" alt=""><figcaption></figcaption></figure>

we can see that it's running graphql:

<figure><img src="https://1258745909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPRj67lRKmIcGcfIbPm4a%2Fuploads%2FVpPrUPqi8DwfiLR9DR4D%2Fimage.png?alt=media&amp;token=df48ea4a-f0cf-47a7-a787-03c586384986" alt=""><figcaption></figcaption></figure>

look at the query :

<figure><img src="https://1258745909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPRj67lRKmIcGcfIbPm4a%2Fuploads%2FpqajnVeXn2KwE3BOwAbM%2Fimage.png?alt=media&amp;token=9d7133c4-11ab-4125-92d8-fe0ee19cedef" alt=""><figcaption></figcaption></figure>

The query is:

```graphql
mutation ($recType: String!, $recAddr: String!, $recUser: String!, $recPass: String!, $recNote: String!) {
  AddPhrase(
    recType: $recType,
    recAddr: $recAddr,
    recUser: $recUser,
    recPass: $recPass,
    recNote: $recNote
  ) {
    message
  }
}
```

also look at the jwt token :

<figure><img src="https://1258745909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPRj67lRKmIcGcfIbPm4a%2Fuploads%2FH5ulTzUtbDn0K5nrNr6s%2Fimage.png?alt=media&amp;token=09b93cc8-2d73-4473-a6ad-967807fd4bef" alt=""><figcaption></figcaption></figure>

Look at the code for updatePassword :thumbsup:

![](https://1258745909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPRj67lRKmIcGcfIbPm4a%2Fuploads%2FUO0bw2XERAa1KHgoGqml%2Fimage.png?alt=media\&token=8f616672-a5b2-4b2d-9e5f-2a23612d3bbd)&#x20;

we use the login query and make it updatepassword:

<figure><img src="https://1258745909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPRj67lRKmIcGcfIbPm4a%2Fuploads%2FT03WbpqC6dw6dUY2WqYP%2Fimage.png?alt=media&amp;token=6db19993-25ba-4e97-93be-19a6b0780e1e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1258745909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPRj67lRKmIcGcfIbPm4a%2Fuploads%2F1QrLS6WPu9GJpVJYnp6S%2Fimage.png?alt=media&amp;token=b6935a03-c0b2-4f99-9d32-0c4d69e9a0fa" alt=""><figcaption></figcaption></figure>

and we get the password:

<figure><img src="https://1258745909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPRj67lRKmIcGcfIbPm4a%2Fuploads%2Fi2wzwKBKXp1HXVD79vPr%2Fimage.png?alt=media&amp;token=8c83d3cb-5614-4927-8a80-5d735df101a5" alt=""><figcaption></figcaption></figure>
