> For the complete documentation index, see [llms.txt](https://notes.dollarboysushil.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.dollarboysushil.com/web-application-pentest/bugforge/business-logic-flaw/cafe-club.md).

# Cafe Club

Level: Easy\
Points: 10\
Type: Daily Challenge

Lab Interface

<figure><img src="https://559802299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8C3FiojCIEtxH7nox2Do%2Fuploads%2F0kefwego6c5de8fxJbov%2Fimage.png?alt=media&amp;token=7e34fbe0-0b5e-4701-855c-ea4df85cc983" alt=""><figcaption></figcaption></figure>

There exist Gift Cards feature.

<figure><img src="https://559802299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8C3FiojCIEtxH7nox2Do%2Fuploads%2F5TJFfmSqm1o2ICbxueoq%2Fimage.png?alt=media&amp;token=5c106775-7795-4c5b-b75f-51f75072f142" alt=""><figcaption></figcaption></figure>

We can purchase gift card and redeem it.

<figure><img src="https://559802299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8C3FiojCIEtxH7nox2Do%2Fuploads%2FAWHOoh4nCMSycbTt3MyK%2Fimage.png?alt=media&amp;token=f7cfa9c9-6bed-46d7-8fd5-385fbebc2225" alt=""><figcaption></figcaption></figure>

<figure><img src="https://559802299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8C3FiojCIEtxH7nox2Do%2Fuploads%2Fmf98RREmNT4HKoeJGHB1%2Fimage.png?alt=media&amp;token=285c2a1d-ce83-47aa-b715-189c7a3be3b3" alt=""><figcaption></figcaption></figure>

Key thing to notice here. Every time we purchase and redeem gift card, The code is predictable

`CAFE-0903-AXXX`&#x20;

<figure><img src="https://559802299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8C3FiojCIEtxH7nox2Do%2Fuploads%2FYfn6I8NY9oNYth6UFb0a%2Fimage.png?alt=media&amp;token=147417b2-8586-4fd2-bbe8-d7fbdac7ce4e" alt=""><figcaption></figcaption></figure>

Only the last 3 characters are different, and they looks like capital alphabetical characters.\
With this in mind, we can try to bruteforce and redeem gift cards of other.

<figure><img src="https://559802299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8C3FiojCIEtxH7nox2Do%2Fuploads%2FlyX3MCeW3QZlC6doUWPD%2Fimage.png?alt=media&amp;token=718baac7-83db-43c3-896a-e1a4e72af3f3" alt=""><figcaption></figcaption></figure>

And we have some 200 OK Response

<figure><img src="https://559802299-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8C3FiojCIEtxH7nox2Do%2Fuploads%2Fc8Rt1OGuX7I3qA8bb8kF%2Fimage.png?alt=media&amp;token=fd80fa43-f746-4461-88c0-ab682c6c8d01" alt=""><figcaption></figcaption></figure>
