CTF Writeups
WebsiteDiscordSocials..
  • CryptoCat's CTF writeups
  • 2025
    • Tsuku
      • Web
        • len_len
        • Flash
        • YAMLwaf
    • CTF@CIT
      • Web
        • Breaking Authentication
        • Commit & Order: Version Control Unit
        • How I Parsed your JSON
        • Mr. Chatbot
        • Keeping Up with the Credentials
  • 2024
    • CryptoCat
      • Summar-AI-ze
    • Intigriti
      • Warmup
        • BabyFlow
        • In Plain Sight
        • IrrORversible
        • Layers
        • Rigged Slot Machine 1
      • Game
        • Bug Squash 1
        • Bug Squash 2
      • Rev
        • Secure Bank
      • Web
        • Biocorp
        • Cat Club
        • Pizza Paradise
        • SafeNotes 2.0
      • Misc
        • Quick Recovery
        • Triage Bot 2
      • Pwn
        • Floormat Sale
        • Retro2Win
        • Rigged Slot Machine 2
        • UAP
      • Crypto
        • Schrodinger's Pad
      • Mobile
        • Cold Storage
      • OSINT
        • No Comment
        • Trackdown
        • Trackdown 2
      • Forensics
        • CTF Mind Tricks
        • Hoarded Flag
        • Password Management
    • CSAW
      • Web
        • Playing on the Backcourts
        • Log Me In
        • Lost Pyramid
        • BucketWars
    • CyberSpace
      • Web
        • Feature Unlocked
    • UIU
      • Web
        • Fare Evasion
        • Log Action
    • Wani
      • Web
        • Bad Worker
        • PoW
        • One Day One Letter
    • Akasec
      • Web
    • HTB Cyber Apocalypse
      • Web
        • Flag Command
        • TimeKORP
        • KORP Terminal
        • Labyrinth Linguist
        • Locktalk
        • SerialFlow
        • Testimonial
  • 2023
    • Intigriti
      • Gamepwn
        • Dark Secrets
      • Misc
        • Triage Bot
      • OSINT
        • Photographs
      • Pwn
        • Floormat Store
      • Web
        • Bug Report Repo
        • My Music
    • Imaginary
      • Web
        • Blank
        • IDORiot
        • Inspection
        • Login
        • Perfect Picture
        • Roks
    • Google
      • Pwn
        • Write-Flag-Where
    • Cyber Apocalypse
      • AI
        • Last Hope
        • Mysterious Learning
      • Crypto
        • Perfect Synchronization
      • Pwn
        • Getting Started
        • Labyrinth
        • Pandora's Box
        • Void
      • Rev
        • Cave System
        • Hunting License
        • Needle in a Haystack
        • Shattered Tablet
        • She Sells Sea Shells
    • Sekai
      • Rev
        • Azusawa's Gacha World
    • Amateurs
      • Web
        • Sanity
        • Waiting an Eternity
    • NahamCon
      • Web
        • Hidden Figures
        • Marmalade 5
        • Obligatory
        • Star Wars
        • Stickers
    • Angstrom
      • Pwn
        • Leek
  • 2022
    • Imaginary (iCTF)
      • Crypto
        • ASE
      • Pwn
        • Links 1
        • Links 2
        • Links 3
        • Open Doors
    • SEETF
      • Pwn
        • 4mats
        • Easy Overflow
      • Rev
        • BabyReeee
      • Web
        • Super-Secure-Requests-Forwarder
    • HTB Cyber Apocalypse
      • Pwn
        • Hellbound
    • Angstrom
      • Pwn
        • Really Obnoxious Problem
        • Wah
        • Whats My Name
        • Where Am I
      • Web
        • Crumbs
        • Xtra Salty Sardines
    • NahamCon
      • Pwn
        • Baby Steps
      • Web
        • Flaskmetal Alchemist
        • Hacker Ts
        • Two for One
    • Pico
      • Forensics
        • Side Channel
      • Pwn
        • Buffer Overflow 1
        • Buffer Overflow 2
        • Buffer Overflow 3
        • Flag Leak
        • Function Overwrite
        • ROPfu
        • RPS
        • Stack Cache
        • Wine
        • X-Sixty-What
      • Rev
        • Wizardlike
      • Web
        • Noted
    • Space Heroes
      • Pwn
        • Vader
      • Web
        • Flag in Space
    • Intigriti
      • Pwn
        • Bird
        • Cake
        • Easy Register
        • Search Engine
    • Dice
      • Pwn
        • Interview Opportunity
  • 2021
    • Pico
      • Pwn
        • Unsubscriptions Are Free
    • Crusaders of Rust (COR)
      • Crypto
        • Fibinary
      • Pwn
        • Chainblock
    • HTB Cyber Santa
      • Crypto
        • Meet Me Halfway
        • Xmas Spirit
      • Pwn
        • Minimelfistic
        • Mr. Snowy
        • Naughty List
        • Sleigh
      • Rev
        • Infiltration
        • Intercept
    • K3rn3l
      • Crypto
        • Badseed
        • Twizzty Buzzinezz
    • HTB x Synack RedTeamFive
      • Misc
        • Context
        • Hotel
      • Pwn
        • Air Supplies
        • Injection Shot
        • Library
        • Recruitment
      • Rev
        • Knock Knock
        • Split
    • KillerQueen
      • Pwn
        • A Kind of Magic
        • Tweety Birb
        • Zoom2Win
    • HacktivityCon
      • Pwn
        • Retcheck
        • The Library
        • Yabo
      • Web
        • Availability
    • CSAW
      • Pwn
        • Alien Math
        • Password Checker
      • Rev
        • Checker
    • HackyHolidays
      • Crypto
        • Cute Invoice
        • Mineslazer
      • Forensics
        • Injection Traffic
        • Power Snacks
      • Pwn
        • Deleted Flag
        • Engine Control
      • Web
        • Skylark
    • HTB Cyber Apocalypse
      • Crypto
        • Phasestream
      • Misc
        • Alien Camp
        • Build Yourself In
      • Pwn
        • Controller
        • System Drop
      • Web
        • Blitzprop
        • E-Tree
        • Wild Goose Hunt
    • Angstrom
      • Pwn
        • Sanity Checks
        • Secure Login
        • Sticky Stacks
        • Tranquil
      • Rev
        • Free Flags
        • Jailbreak
      • Web
        • Jar
Powered by GitBook
On this page
  • Description
  • Solution
  1. 2024
  2. CSAW
  3. Web

BucketWars

Writeup for BucketWars (Web) - CSAW CTF (2024) 💜

Description

let's keep our storage simple -- and remember we don't make mistakes in these parts.

Solution

Visit website and find five different versions at /versions.html.

https://bucketwars.ctf.csaw.io/index_v1.html
https://bucketwars.ctf.csaw.io/index_v2.html
https://bucketwars.ctf.csaw.io/index_v3.html
https://bucketwars.ctf.csaw.io/index_v4.html
https://bucketwars.ctf.csaw.io/index.html

Error when trying to access an invalid file, e.g. https://bucketwars.ctf.csaw.io/dgdfgdfgfdg.html

404 Not Found

    Code: NoSuchKey
    Message: The specified key does not exist.
    Key: dgdfgdfgfdg.html
    RequestId: J5QS9TW2YM0210EH
    HostId: 8Yt6lsFV9VR0evraLVRz7D0sEwIN4AzW6eQnjEBMAdOGMu80sI/PiVRqAYrfmLEb+E+8DuJihAo=

An Error Occurred While Attempting to Retrieve a Custom Error Document

    Code: NoSuchKey
    Message: The specified key does not exist.
    Key: https://s3.us-east-2.amazonaws.com/bucketwars.ctf.csaw.io/404.jpg

Can try to list the s3 bucket contents, but no permissions.

aws s3 ls s3://bucketwars.ctf.csaw.io/ --no-sign-request

An error occurred (AccessDenied) when calling the ListObjectsV2 operation: Access Denied

The most recent version (v5) has a hint:

Looking deeper into the stolen bucket only reveals past versions of our own selves one might muse

aws s3api list-object-versions --bucket bucketwars.ctf.csaw.io --no-sign-request > output.txt

There's 300 lines of JSON but here's a snippet.

{
	"ETag": "\"07bb73d00569d07588c0b5661438d9d8\"",
	"Size": 1118,
	"StorageClass": "STANDARD",
	"Key": "index_v1.html",
	"VersionId": "xueLuUGnF1kS6dcOaspeUUZN0N4Cdlsq",
	"IsLatest": true,
	"LastModified": "2024-08-05T01:59:50+00:00"
},
{
	"ETag": "\"d3f2f46b2f1814b636cb1c7991a1a328\"",
	"Size": 1290,
	"StorageClass": "STANDARD",
	"Key": "index_v1.html",
	"VersionId": "ToA1N09DluJkPVFATO6IwOTZzhDkva09",
	"IsLatest": false,
	"LastModified": "2024-08-05T00:26:48+00:00"
},
{
	"ETag": "\"5c3665517b3e538158ab09b15a647dbb\"",
	"Size": 1456,
	"StorageClass": "STANDARD",
	"Key": "index_v1.html",
	"VersionId": "zCVAK4kjygiOnWWGGi1BZOR87Ef09Z0L",
	"IsLatest": false,
	"LastModified": "2024-08-05T00:20:20+00:00"
},
{
	"ETag": "\"9a5824c100e6975c203e2ae517c9ec0d\"",
	"Size": 1555,
	"StorageClass": "STANDARD",
	"Key": "index_v1.html",
	"VersionId": "CFNz2JPIIJfRlNfnVx8a45jgh0J90KxS",
	"IsLatest": false,
	"LastModified": "2024-08-05T00:20:08+00:00"
},
{
	"ETag": "\"130f7fdffa9c3a0e24853b651dfe07ac\"",
	"Size": 1571,
	"StorageClass": "STANDARD",
	"Key": "index_v1.html",
	"VersionId": "t6G6A20JCaF5nzz6KuJR6Pj1zePOLAdB",
	"IsLatest": false,
	"LastModified": "2024-08-05T00:19:57+00:00"
}

We have five different versions of the index_v1.html file, but all the other four versions only have a single entry.

It's also worth noting that v1 was the only page with no image, only the string: YIKES. Presumably, we need to recover the old versions of index_v1.html 🤔

We already have the latest, so we try the other 4. The first two had nothing but version 4, which is interesting.

aws s3api get-object --bucket bucketwars.ctf.csaw.io --key index_v1.html --version-id CFNz2JPIIJfRlNfnVx8a45jgh0J90KxS index_v1_version4.html --no-sign-request
{
    "AcceptRanges": "bytes",
    "LastModified": "2024-08-05T00:20:08+00:00",
    "ContentLength": 1555,
    "ETag": "\"9a5824c100e6975c203e2ae517c9ec0d\"",
    "VersionId": "CFNz2JPIIJfRlNfnVx8a45jgh0J90KxS",
    "ContentType": "text/html",
    "ServerSideEncryption": "AES256",
    "Metadata": {}
}

It contains a password in the HTML: versions_leaks_buckets_oh_my.

<!-- Note to self: be sure to delete this password: versions_leaks_buckets_oh_my -->

Version 5 contains a new URL.

<img src="https://asdfaweofijaklfdjkldfsjfas.s3.us-east-2.amazonaws.com/sand-pit-1345726_640.jpg" />

The last bit took me too long because I didn't expect stego in a web challenge 😆 Pair those two pieces of information with steghide, and you get the flag.

steghide extract -sf sand-pit-1345726_640.jpg -p versions_leaks_buckets_oh_my
wrote extracted data to "flag.txt".

Flag: csawctf{cl0d_Bu4K3tz_AR3_F4Ir_g$m3}

PreviousLost PyramidNextCyberSpace

Last updated 4 months ago