Takopi Class  /  Recap

Session 05

We opened on the non-technical half, what you walk away with when a hunt ends and there is no bug to show for it. The example is one we already own, the vibe.co file upload from session 01, read this time as an implementation rather than as a finding. The lesson to keep: the implementation is the knowledge, a hunt with no bug still banks it, and when the hunt cannot teach it fast enough you study the same implementation where an answer key exists. Then we did exactly that: S3 as a model, the live packets reread in Burp, and vibe.co's uploader rebuilt on our own AWS and thezodd.com and fired end to end, primitive and account takeover both.

Summary of findings

  1. 01The hunt gives you the implementation, with a bug or without oneTarget: No target. This is a method note.NoteMethod note
  2. 02The upload has three legs with three owners. The bytes never pass the validator.Target: vibe.co developer uploaderInfoDone, read as a build
  3. 03With no bug, study the same build where an answer key existsTarget: No target. This is a method note.NoteMethod note
  4. 04A bucket stores key, bytes and metadata. It validates nothing.Target: S3 and the clones with the same APINoteMethod note
  5. 05The capture shows host-only signing. Neither the content type nor the payload is signed.Target: vibe.co uploader, Burp captureInfoTested live, the SVG did not fire
  6. 06The rebuilt uploader fired: the SVG ran on the CDN origin and run C read the sessionTarget: vibe.thezodd.com and vibecdn.thezodd.comNot ratedDone in the lab
  7. ●The session lessons in one listTarget: No target. This is a method note.NoteMethod note
  • Info Groundwork. No security effect is claimed.
  • Not rated Lab model or lead. It is not proven on the target.
  • Note A method or a lesson. Not a test result.

Scope

Session

Asset vibe.co uploader · cdn.apps.vibe.co Built vibe.thezodd.com · vibecdn.thezodd.com Shape notes, then a build that fired Date 2026-10-10
Live capture
A Burp run of the developer uploader, 14:11 UTC
Hosts read
clear-platform.vibe.co, cdn.apps.vibe.co
Lab hosts
vibe.thezodd.com, vibecdn.thezodd.com
Lab code
projects/vibe-sim/app/app.py

Where each test ran

  • Read only: section 02 reads the vibe.co build
  • Live on the target: section 05 is a Burp run on the vibe.co uploader
  • Lab only: section 06 ran on our own AWS and thezodd.com
  • Method notes, no test: sections 01, 03, 04 and the takeaways
  • Not started: the knobs on the bed, see Open items

Findings

Each card is one result. The number is the section number of the original recap. Long code is in Evidence.

01Notenote

The implementation is the knowledge

Target

No target. This is a method note.

Impact
Implementation → knowledge. In session 03 the supply chain was raw input, study, knowledge, application, reward. The step most people skip is that the target you are already on is raw input too. Reading how vibe.co built its upload is study, and what it leaves you with is knowledge about every app built the same way, not about vibe.
Steps

A hunt produces two things and only one of them is a report. The other is the implementation, how the feature is actually built, which component validates, which one stores, which one serves, and which request the app never sees. You take that away whether or not a bug came out of it. The report is rare, the implementation is every time, and it is what makes the next target faster.

So a hunt that ends with no bug still produced the build. What it lacks is speed, because on a real target the only feedback is the target and that is slow. The loop below has a study leg for that, and the study leg has four doors.

THE LOOP WHEN THE HUNT COMES BACK EMPTY Hunt a feature on a real target A bug the rare branch Report the reward, and it is scarce No bug the usual outcome Study the implementation how the feature is built, not where it broke CTF key when it ends HackTheBox writeups on tap Vulnerable box built to be solved Your own setup you wrote the key Knowledge  ★ the implementation itself, carried into the next hunt the report is rare and the loop still closes, because the implementation is what you keep either way
Two branches out of a hunt, one loop back in. The bug branch pays and is rare. The no-bug branch is the common one, and it only wastes the day if you leave the implementation on the table.
Evidence

The source gives no packets for this card. The loop figure is in Steps.

Status

Note. The source gives no test result here. This card teaches the loop.

02Inforead · The worked case · carried from session 01, bug removed

vibe.co's upload, read as a build

Target

The vibe.co developer uploader. Hosts: clear-platform.vibe.co, the S3 bucket, cdn.apps.vibe.co.

Impact
The build in one sentence. The app authorises on leg 1, storage receives on leg 2, the edge serves on leg 3, and the bytes never pass through the component that validates. That is true of every presigned upload, S3, GCS signed URLs, Azure SAS, and it is what you learned on vibe.co before the SVG fired.
Steps

The developer uploader does not take your bytes. It hands you a presigned URL and gets out of the way, so one upload is split across three components that never see each other's half of the work.

Flow chart 1Which component handles each leg of one upload?
App Storage Edge uploadUrl cdnUrl Authorise the upload Store the bytes Serve the object 1 2 3
  • Start or end
  • Action
  • Step number
  1. leg 1, the appPOST /graphql RequestAssetUpload(contentType) to clear-platform.vibe.co, a declared type and a name, never the bytesdecides whether to authorise, and the object key, here a .png
  2. leg 2, storagePUT the bytes with a Content-Type to the S3 bucket, the bytes and the headers on the PUT, never the app's filterdecides the stored type, written verbatim as object metadata
  3. leg 3, the edgeGET the cdnUrl, CloudFront on cdn.apps.vibe.co, the stored object and its metadatadecides the served type, which is whatever leg 2 stored
LegWho owns itWhat it seesWhat it decides
1 · POST /graphql RequestAssetUpload(contentType)the app, clear-platform.vibe.coa declared type and a name, never the byteswhether to authorise, and the object key, here a .png
2 · PUT the bytes with a Content-Typestorage, the S3 bucketthe bytes and the headers on the PUT, never the app's filterthe stored type, written verbatim as object metadata
3 · GET the cdnUrlthe edge, CloudFront on cdn.apps.vibe.cothe stored object and its metadatathe served type, which is whatever leg 2 stored

Having read it once, these are the questions you ask in the first ten minutes on any uploader, and they are the map step of the subject:

  • Does the app ever touch the bytes, or does it hand out a signed URL and step aside
  • Where is the type decided, on the app's API, on the storage write, or on a read-time override
  • What does the serving layer trust, the stored metadata, the extension, or its own sniffing
  • Which leg does the validator never see, because that is the leg where the filter is decoration
Evidence
The packets, inert and fired, stay in session 01. The rule, test the content type at every hop, is in the subject at C3. Both were learned from the implementation first and the bug second.
Status

Done. The source reads the build and claims no bug.

03Notenote · Hunt → no bug → study · CTF, HackTheBox, a vulnerable box, your own setup

When there is no bug, study

Target

No target. This is a method note.

Impact
The order matters. Hunt first, so the question is real. Study second, in whichever arena answers it fastest. A syllabus-first bed produces knowledge with no target to spend it on, the thing choosing a target warns about.
Steps

The hunt shows you how a feature is built. It does not always show you how that build breaks, because on a real target nobody hands you the answer, the point session 03 made with the three arenas. So the no-bug branch has a next step, and it is not the next target. It is study the same implementation somewhere that has an answer key, then come back.

The four places to study

ArenaWhat it isWhere the answer key isHow fast the loop closes
CTFa timed game with a known answerother people's writeups, the moment it endshours to days, you wait for the clock
HackTheBoxa retired machine with the build you just metwriteups and walkthroughs, on tapas fast as you can read, after you have tried
A vulnerable boxan app or image built to be solvedits own docs and writeups, any time you are stuckan evening
Your own setupthe implementation rebuilt by you, from the question you actually haveyou, you wrote itminutes per question, the fastest of the four
Pick by the question, not by the platform. "How does a presigned upload decide the served type" is answered by a bucket and a signed PUT in an afternoon, and by no CTF. "What does this stack's upload handler look like from outside" is answered faster by a box that ships that stack. The arena is a tool, the implementation is the subject.

The first three were already on the board in session 03. The one this session adds is Setup, the one hunters avoid because it looks like work that is not hunting. It is the test bed chain from the mindset subject, and the rule there applies: built from a question you actually have, never from a syllabus. Why it is the fastest loop:

  • No waiting and no noise, no clock, no writeup to wait for, and you built only the part you have a question about
  • You own the answer key, when the bed does something you did not expect, that is the knowledge, with nobody's interpretation in the way
  • It moves you up Bloom, reading leaves you at Understanding, a bed you ran is Applying, a bed you broke is Analyzing
  • The bed survives, the next upload question runs on the same bucket in a minute
Evidence

The source gives no packets for this card. The table of arenas is in Steps.

Status

Note. The source gives no test result here. This card teaches what to do after a hunt with no bug.

04Notenote · The technical half opens here · bucket, ways in, ways out

S3 in one picture

Target

S3 and the clones that speak the same API: GCS, Azure Blob, Cloudflare R2, Backblaze B2, MinIO.

Impact
What the signature on the way in covers is the whole security model.
Steps

A bucket is a flat namespace of objects, Amazon's S3 first and the same API spoken by GCS, Azure Blob, Cloudflare R2, Backblaze B2 and MinIO. An object is a key, the bytes, and metadata, and Content-Type is metadata, written by whoever did the write and served back by whoever does the read. The bucket validates nothing. The app holds an IAM identity, a key or an STS role with PutObject on a prefix, and the bucket carries a policy for who may read, CORS for which page origins may call it from a browser, and versioning so overwrites keep history. It is reached virtual-hosted, bucket.s3.region.amazonaws.com, or path-style, s3.region.amazonaws.com/bucket/key, and S3 picks the bucket from the Host header, which is why a bucket named after a hostname can sit behind a plain CNAME.

S3 IN ONE PICTURE WAYS IN Through the app app receives the bytes, validates, writes Presigned PUT app signs one key, browser sends the bytes Presigned POST + policy conditions on type and size exist here THE BUCKET S3, or any of its clones GCS, Azure Blob, R2, B2, MinIO object = key + bytes + metadata Content-Type is metadata written verbatim by the PUT creds: IAM key or STS temp bucket policy, CORS, versioning Host header picks the bucket validates nothing, stores what it is handed WAYS OUT Public bucket, website endpoint anyone reads, S3 headers as stored Presigned GET signed read, query can override headers A CDN in front edge caches, serves the stored metadata Two different things  ★  what the app validates, and what the bucket stores and the reader gets the bug class lives between them, in whatever the signature on the way in does not cover
Three ways in, three ways out, one bucket that validates nothing. Pick a way in and a way out and you have described an uploader. vibe.co is presigned PUT in and a CDN out, the most common pair and the one with the widest gap between what is validated and what is stored. What the signature on the way in covers is the whole security model.
Evidence

The source gives no packets for this card. The S3 figure is in Steps.

Status

Note. The source gives no test result here. This card is a model of S3.

05Infotested live · The worked case, live · a fresh run through the developer uploader, 14:11 UTC

The packets, reread in Burp

Target

The vibe.co developer uploader: clear-platform.vibe.co, the S3 bucket, cdn.apps.vibe.co.

Impact
Today's run was the clean one, so the SVG did not fire in this capture. What the capture shows is the precondition, host-only signing. The firing is the session 01 Run B pair, the impact is the session 02 Clerk /v1/client steal from a *.vibe.co origin, and the bed has to reproduce both halves.
Steps

We ran the uploader once more with Burp open. Three requests were expected, Burp holds four: a CORS preflight to the bucket sits between leg 1 and leg 2, and it is part of the implementation, the bucket's CORS policy deciding which origins may upload from a page.

Evidence
PacketWhat the capture saysWhat it means
1 · POST /graphqlRequestAssetUpload is a query, not a mutation. The server picks the key, apps/<uuid4>.png, maps the extension from contentType, and signs with STS temporary credentials, ASIA..., X-Amz-Expires=3600the app never sees bytes, key and extension are server-chosen, the declared type is a hint
1 · responseX-Amz-SignedHeaders=host only, X-Amz-Content-Sha256=UNSIGNED-PAYLOAD, and a x-amz-checksum-crc32 of an empty body that S3 ignoresthe whole bug in one line, neither the content type nor the payload is under the signature
preflight · OPTIONS to S3bucket CORS allows origin https://www.vibe.co, methods POST, PUT, header content-type, exposes ETag, Content-Typea browser PoC from a foreign origin fails preflight, curl and Burp do not care
2 · PUT the bytesContent-Type: image/png, a real PNG this time. Response carries x-amz-version-id and SSE AES256versioning is on, a second PUT to the same signed URL inside the hour overwrites silently
3 · GET cdn.apps.vibe.coCloudFront, X-Cache: Miss, Content-Type straight from the metadata. No Content-Disposition, no nosniff, no CSPthe edge trusts the metadata and adds nothing
Status

Info. The capture shows the precondition, host-only signing. The SVG did not fire in this run.

06Not ratedbuilt · vibe.thezodd.com + vibecdn.thezodd.com · projects/vibe-sim

The bed, built and fired

Target

A lab rebuild of the vibe.co uploader on our own hosts: vibe.thezodd.com and vibecdn.thezodd.com.

Impact
Why run C works with a Lax, HttpOnly cookie. The cookie is host-only on vibe.thezodd.com, but SameSite is judged on the registrable domain, and vibecdn.thezodd.com to vibe.thezodd.com is same-site. A credentials: include fetch from the CDN origin carries the session, the CORS reflection lets the script read the answer, and HttpOnly is irrelevant because nobody read the cookie, they read the response. The _cors regex in app.py is the *.apex allowlist, tighten it to one host and run C goes dark.
Steps

Two beds were worth building, MinIO plus a Flask signer plus Caddy in docker-compose, free and offline with the same presigned-PUT semantics, or real S3 plus a real edge with real signatures, CORS and cache behaviour. A single file faking all three legs was rejected on sight, because a fake signature makes every signing knob theatre. Yasho has an AWS account and the thezodd.com zone, so we took the real one. The edge started as CloudFront, which is what vibe runs, and switched to Cloudflare mid-session on Yasho's call, the zone is already there. That changes leg 3's headers and nothing about the seam.

The signer copies vibe's leg 1 field for field: same RequestAssetUpload query, same contentType to extension map, same apps/<uuid>.png key, and it assumes an IAM role through STS so the presigned URL carries ASIA temporary credentials with SignedHeaders=host and UNSIGNED-PAYLOAD. It carries the session 02 half too, a /v1/client that reflects any *.thezodd.com origin with credentials. The app sits behind its own sign-in, a form and a signed __session cookie, credentials read from a file the unit loads and never from the source, so strangers cannot get a signed URL. The CDN side stays free, that is the victim-facing half.

Where the signature comes from

Step 2 and 3 of the chain below raise the question. The signature is always computed locally. SigV4 is an HMAC over the canonical request with the secret key, AWS has no API that signs a URL for you and KMS cannot do it either, so whoever holds the secret signs, wherever they run. What can come from Amazon is the credential, and that is the only fork:

Credential sourcePrefixNetwork call before signingSeen on
static IAM user key in config or envAKIAnone, eversmall apps, old code
STS AssumeRole by the appASIAone STS call per credential lifetime, cachedour bed, the signer's AKIA key only ever calls STS
role attached to the instance, container or LambdaASIAone call to the metadata service, the SDK does it silentlyvibe, most likely
Cognito or AssumeRoleWithWebIdentityASIAone STS call, can happen in the browserapps where the browser signs its own PUT, no leg 1 at all
S3 Access Grants GetDataAccessASIAone call, prefix-scoped credentialsnewer enterprise setups

And the signature itself, in one line, with the only hidden input being the secret key:

pseudo
Signature = HMAC( key = HMAC-chain(SecretKey, Date, Region, "s3", "aws4_request"),
                  msg = Algorithm + Timestamp + Scope + SHA256(canonical request) )
InputWhere it shows in vibe's URL
Secret access key, the one hidden inputnever, it stays on the app
Timestamp and ExpiresX-Amz-Date=20261010T141109Z, X-Amz-Expires=3600, both signed, so the URL dies after an hour and the date cannot be moved
Scope, date, region, service, aws4_requestX-Amz-Credential=ASIA.../20261010/us-east-1/s3/aws4_request
Canonical request, method, path, every query parameter, the signed headers, the payload hashPUT, /apps/<uuid>.png, the X-Amz-* and checksum params, X-Amz-SignedHeaders=host, X-Amz-Content-Sha256=UNSIGNED-PAYLOAD
What is locked and what is free. The key, the path, the time window and the host are under the signature. Content-Type is not in the signed headers and the payload hash is UNSIGNED-PAYLOAD, so those two are free, and that is the bug.
  • Where the signing code runs is independent of the row: the app server as in vibe's leg 1, a dedicated signer service the app calls so the app never holds the key, or the browser with Cognito credentials, which leaks the credential to the client
  • The format is a separate choice, still local: SigV4 query auth, the presigned URL vibe uses, SigV4 header auth on the through-the-app path, presigned POST as an HMAC over a policy document, and CloudFront signed URLs with RSA for reads through the edge
  • In the chain below, step 3 is a true self-call. Step 2 is where a hop to STS or the metadata service hides, once per credential lifetime, not per upload
THE BED, VIBE.CO REBUILT ON OUR OWN HOSTS Cloudflare DNS and proxy, thezodd.com vibe → proxied wildcard to the hunt server · vibecdn → orange-cloud CNAME to the S3 endpoint, SSL rule Full for that one host HUNT SERVER · VIBE.THEZODD.COM, THE APP AWS + CLOUDFLARE · STORAGE AND EDGE Caddy, mkpoc vibe reverse proxy to 127.0.0.1:8089, TLS from ACME Flask signer, vibe-sim.service user unit, venv, credentials from auth.env, not the source GET /login · form, signed __session cookie, Lax POST /graphql · login required, signs host only GET /v1/client · reflects *.thezodd.com, ACAC true knobs: SIGN_CONTENT_TYPE, SIGN_PAYLOAD, EXPIRES STS AssumeRole vibe-upload-signer, PutObject S3 bucket vibecdn.thezodd.com, us-east-1 named after the hostname versioning on, CORS for vibe GetObject from 22 CF ranges path-style presigned URLs Cloudflare, the edge vibecdn.thezodd.com, orange CNAME to the S3 endpoint Host header names the bucket SSL Full, S3 wildcard cert cf-ray, cf-cache DYNAMIC serves the stored type as is nothing on the hunt server, CloudFront torn down the victim-facing half, no auth presigns a PUT Burp, three runs, three legs each A inert as image/png · B fires as image/svg+xml · C the stealer, same type, fetches /v1/client from the CDN origin with credentials leg 1 leg 2 leg 3
Same three owners, now ours. The app lane is the hunt server, storage is S3, the edge is Cloudflare pulling from a bucket named after the hostname so the Host header alone selects it.
Browser attacker, then victim App server clear-platform.vibe.co S3 bucket presigned PUT target CDN edge cdn.apps.vibe.co Auth plane clerk.vibe.co, /v1/client 1. POST /graphql, contentType 2. STS temporary creds, ASIA pick the key apps/<uuid>.png 3. presign PUT, SignedHeaders=host UNSIGNED-PAYLOAD, expires 3600 4. uploadUrl + cdnUrl, both .png 5. OPTIONS preflight, Origin: https://www.vibe.co 6. CORS ok: www.vibe.co, PUT, content-type 7. PUT the bytes, Content-Type: image/svg+xml 8. store object, type = the header, verbatim versioning on, new version id 9. 200, ETag, x-amz-version-id 10. victim opens cdnUrl 11. pull on cache miss 12. object + metadata 13. 200 image/svg+xml, script runs on the CDN origin 14. fetch /v1/client, credentials: include, Origin: the CDN 15. ACAO: the CDN origin, ACAC: true, session + JWT the signature in 3 covers host only, so 7 picks the type, 8 stores it, 13 serves it, and 15 turns a CDN script into account takeover
The chain in time. Solid arrows are requests, dashed are responses, the bars are who is busy. Steps 1 to 9 are one upload by the attacker, 10 to 13 are one page load by the victim, 14 and 15 are the session 02 steal. On the bed the same five participants are vibe.thezodd.com for the app and the auth plane, the vibecdn.thezodd.com bucket, and Cloudflare for the edge.
Evidence

Fired, end to end

RunLeg 2 Content-TypeLeg 3 from vibecdn.thezodd.comWhat it proves
A, inertimage/pngimage/png, a picturethe clean path, same as vibe's capture
B, firesimage/svg+xmlimage/svg+xml, a document, script runs on the CDN originthe session 01 primitive, same bytes, same .png URL, one header apart
C, the stealerimage/svg+xmlthe SVG does a credentialed fetch to vibe.thezodd.com/v1/client, the auth plane reflects the CDN origin with ACAC: true, the page receives the signed-in user and tokenthe session 02 chain, proven in a real browser after signing in on the app

The code, one handler at a time

The bed is projects/vibe-sim/app/app.py, 168 lines, and the same file runs on the hunt server. Read it handler by handler and mark where each critical decision is made.

1 · leg 1, the contentType check · graphql(), lines 79 to 101

CheckCodeVerdictThe insecure variant you will meetRoot cause lives in
contentType allowlist, line 86ext = EXT.get(ct) against a fixed dict of five exact stringssafea wildcard, ct.startswith("image/"), lets image/svg+xml through. A regex without an anchor, ^image/(png|jpg|gif), lets image/pngx and image/png; charset=x through. A substring, "image" in ct, lets anything through. A deny-list lets through every type it forgot, the Confluence case belowthe application, not Amazon, the bucket never sees this check
binding the type to the upload, lines 90 to 92params = {"Bucket", "Key"}, ContentType only added when SIGN_CTunsafe by defaultthis is vibe's shape, a correct allowlist that is never put under the signature, so leg 2 sends whatever it likesthe application, the signing parameters it chose, Amazon signs exactly what it is asked to
the key, line 89apps/<uuid4>.<ext>, server-chosensafea client-supplied filename in the key, path traversal or overwrite of another tenant's object inside the same signed prefixthe application
The same check in the wild, deny-list edition. Confluence Data Center, Atlassian on Bugcrowd, disclosed August 2025, P2. The comment uploader at /plugins/drag-and-drop/upload.action takes the MIME type from the client, and the server decides attachment versus inline on /download/attachments/ with a deny-list in ContentDispositionHeaderGuesser, text/html, application/xhtml+xml and friends. video/mp2t was not on it, so an HTML file named .png and declared video/mp2t is served inline, and WebKit on iOS renders video/mp2t as HTML. Script runs in the Confluence origin with the victim's session and mints a personal access token through the REST API. X-Content-Type-Options: nosniff was present and did nothing, it only forces the declared type, and the declared type was the attacker's. Three things for our row: the check is the same decision as line 86, which type is allowed to be rendered, a deny-list fails on the type nobody thought of while an exact allowlist cannot, and the browser decides what a type means, not the server, so even the allowlist must hold only types every engine renders inert, which is also why image/svg+xml is not in vibe's.
What the check guards. Lines 86 to 88 validate the declared type and turn it into an extension, so image/svg+xml or text/html is refused at leg 1. Nothing after that carries the type forward: line 90 signs only the bucket and the key, and line 92, the one line that would put content-type under the signature, sits behind a knob that is off. The check decides the file name and nothing else. Leg 2 may send any Content-Type, which is exactly the shape of vibe's leg 1.
Two reading notes. The operation check on line 83 looks at operationName only, the query text is never parsed, which is a simulation shortcut and not vibe's behaviour. And the SIGN_PAYLOAD branch on lines 94 and 95 is a stub that does nothing yet, only SIGN_CONTENT_TYPE is a real knob.

Detours, and what each one taught

What happenedWhyKeep
ACM sat on PENDING_VALIDATION, the validation name answered with two Cloudflare IPsthe record was orange-clouded, so Cloudflare answered with its own A records and the CNAME was never visible to ACMunder a proxied zone a third party only sees the real CNAME if the record is explicit and grey
CloudFront was built, then dropped for CloudflareYasho's call, the zone is already the edge. vibe's real CDN is a plain CNAME to CloudFront, so the headers differ, cf-ray and cf-cache-status instead of via and x-cache, the seam does notthe edge is a component you can swap, the seam is between the signer and the bucket
Leg 3 through Cloudflare answered 526the zone is Full (strict), the bucket is named vibecdn.thezodd.com, and S3's wildcard certificate cannot match a hostname with extra dotsone Configuration Rule, hostname equals vibecdn.thezodd.com, SSL Full. The same dots are why the signer presigns path-style
The bucket had to be locked without an OACCloudflare has no origin identity for S3, so the bucket policy allows GetObject from the 22 published Cloudflare ranges and nothing elsea direct request to S3 with the bucket's Host header gets AccessDenied, not NoSuchBucket, the check that the bucket resolves and the policy holds
Differences from vibe to keep in mind
  • The edge is Cloudflare, so leg 3 carries cf-ray and cf-cache-status instead of via: cloudfront and x-cache
  • Presigned URLs are path-style, because the dotted bucket name cannot match the S3 wildcard cert
  • Leg 1 is identical, ASIA temporary credentials, SignedHeaders=host, unsigned payload, 3600 seconds, same JSON shape
Status

Done in the lab. The source reports runs A, B and C on the bed. It does not test vibe.co with these runs.

●Notenote

Takeaways

Target

No target. This is a method note.

Impact
This session is the mindset frame from hacker mindset applied to one feature, with the file upload subject as the worked build, the three arenas from session 03 extended by one, and the fourth arena actually entered, the standing TODO from session 02.
Steps
  • A hunt produces two things, a report and an implementation, only the report is rare, the implementation you take away every time and it transfers to every app built the same way
  • The vibe.co upload read as a build is three legs with three owners, the app authorises, storage receives, the edge serves, and the bytes never pass the validator, true of every presigned upload
  • Read a build once and you have the first ten minutes on any uploader, does the app touch the bytes, where is the type decided, what does the edge trust, which leg does the validator never see
  • Hunt then no bug then study, in the arena that answers your question fastest, CTF, HackTheBox, a vulnerable box, or your own setup, and setup is the fastest because you own the answer key
  • Order is hunt first, study second, a syllabus-first bed produces knowledge with no target to spend it on
  • A bucket is key plus bytes plus metadata and validates nothing, Content-Type is metadata written by the PUT and served by every way out, so what the signature on the way in covers is the whole security model
  • Reread the packets before simulating, the capture had a fourth request, the CORS preflight, that the three-leg story had left out
  • The precondition is one line of the leg 1 response, SignedHeaders=host and UNSIGNED-PAYLOAD, everything leg 2 sends is outside the signature
  • The signature is always computed locally, only the credential can come from Amazon, a static AKIA key or ASIA temporary credentials from STS, a metadata role, Cognito or Access Grants, and the ASIA prefix on a presigned URL tells you which family you are looking at
  • A bed must sign for real, MinIO or S3, and copy the implementation field for field, or it teaches a different build than the target has
  • Under a proxied zone an explicit grey-cloud record is the only way a third party sees the real CNAME, and a bucket named after a hostname can sit behind a plain CNAME because S3 selects the bucket from the Host header
  • The edge is swappable, CloudFront or Cloudflare changes leg 3's headers and nothing about the seam between the signer and the bucket
  • SameSite is judged on the registrable domain, so a Lax cookie on the app host rides a credentialed fetch from a sibling subdomain, and HttpOnly does not matter when the script reads the response rather than the cookie
Evidence

The source gives no packets for this card. It lists takeaways.

Status

Note. The source gives no test result here. This card keeps the list of takeaways.

Evidence

This section has the long code. Click an item to open it. Use Copy to copy a code block.

E1The graphql() handlerread · graphql(), lines 79 to 101

Evidence for section 06.

pseudo
31  EXT = {"image/png": "png", "image/jpeg": "jpg", "image/jpg": "jpg", "image/gif": "gif", "image/webp": "webp"}

79  @app.post("/graphql")
80  @login_required                                  # check 0: a session, or 401
81  def graphql():
83      if body.get("operationName") != "RequestAssetUpload":   # check 1: the operation name only
85      ct  = (body.get("variables") or {}).get("contentType", "")
86      ext = EXT.get(ct)                            # check 2: allowlist lookup
87      if not ext:
88          return ... "Unsupported content type"   # anything not in EXT is rejected
89      key = f"apps/{uuid.uuid4()}.{ext}"           # the server picks the key, the type only picks the extension
90      params = {"Bucket": BUCKET, "Key": key}
91      if SIGN_CT:                                  # off by default
92          params["ContentType"] = ct               # the only line that would bind the type to the upload
93      url = s3_client().generate_presigned_url("put_object", Params=params, ExpiresIn=EXPIRES, HttpMethod="PUT")

Open items

Carried forward

  • The vibe.co technical threads stay where session 04 left them, the normalizer bypass, api.vibe.co/oauth2 redirect_uri validation, /oauth/register, the __clerk_handshake and the __client fixation
  • The bed is live and fired, next is the knobs on it, one at a time, against a thing we own
  • Lay the three Burp runs beside vibe's capture, leg by leg, as the class's side-by-side reading of a presigned upload
  • Which other vibe.co features hand out signed URLs, every one of them is the same three-owner build and the same ten-minute map

Other open tests

  • From section 06, The knobs, the next passSign content-type, SIGN_CONTENT_TYPE=1, run B fails with SignatureDoesNotMatch, that is the fix
  • From section 06, The knobs, the next passSign the payload, SIGN_PAYLOAD=1, byte substitution dies too
  • From section 06, The knobs, the next passPresigned POST with a policy, conditions on type and size exist there and not on PUT
  • From section 06, The knobs, the next passUnsigned metadata on the PUT, Cache-Control, Content-Disposition, all attacker-set when only host is signed
  • From section 06, The knobs, the next passRe-PUT inside the hour, review sees a PNG, the serve sees the SVG
  • From section 06, The knobs, the next passEdge mitigations one at a time, Content-Disposition: attachment, nosniff, CSP: sandbox, a type allowlist, see which kills the SVG and which is theatre