# Gallery

> Humans are dumb and horrible, but cats are terribly CUTE!! - said an AI.
>
> Access Info : http://cddc2023-gallery.s3-website-ap-southeast-1.amazonaws.com/

The challenge was presented as a **web application vulnerability exercise**, aimed at testing our skills in identifying and exploiting security weaknesses commonly found in web applications. We were provided with a [link](http://cddc2023-gallery.s3-website-ap-southeast-1.amazonaws.com/) to access the target website and tasked with finding and retrieving a hidden flag.

<figure><img src="https://1326575018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWOW1TQuFBNIp3aDtWk3v%2Fuploads%2FrdgTEGfUcRCZIRSYWAA7%2Fgallery_homepage.png?alt=media&#x26;token=a75c9f06-dff1-4a06-a0ba-209ee4a6124b" alt=""><figcaption><p>Homepage</p></figcaption></figure>

The homepage does not seem of interest and so we clicked the button "Go to next page". It redirected us to another page with the link `/third.html`

<figure><img src="https://1326575018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWOW1TQuFBNIp3aDtWk3v%2Fuploads%2FwqTabumEkEFFqmWPIv4t%2Fgallery_third_page.png?alt=media&#x26;token=ffb11db6-1e2f-49c2-8405-ce4c37325aff" alt=""><figcaption><p>third.html</p></figcaption></figure>

After seeing that URL path, we intuitively thought there would be a `/second.html`, and so we tried accessing it but the page redirects us back to `/third.html`.&#x20;

We then decided to employ the 'curl' command-line tool. [Curl](https://curl.se/) is a powerful utility that allows sending HTTP requests and retrieving the corresponding responses. In this case, we used it to retrieve the contents of the hidden webpage.

```bash
curl http://cddc2023-gallery.s3-website-ap-southeast-1.amazonaws.com/second.html
```

Et voila! We managed to retrieve the flag!

<figure><img src="https://1326575018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWOW1TQuFBNIp3aDtWk3v%2Fuploads%2FB1bDMOQhjJTmjPki93RK%2Fgallery_flag.png?alt=media&#x26;token=bc333a7c-1264-4763-b8f4-1a56b125200d" alt=""><figcaption><p>Flag!!</p></figcaption></figure>



<figure><img src="https://1326575018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWOW1TQuFBNIp3aDtWk3v%2Fuploads%2FiPusa17yeLtrQlnwy9Fe%2F1%20lpiM9diFeA8ycWINyt3-PA.jpg?alt=media&#x26;token=b10411a3-3824-48bf-8bdb-32d74c3b5337" alt=""><figcaption></figcaption></figure>
