Skip to content
Account takeover Write-up Beginner

Mock Test Capen: How We Cracked It

The report describes a mock penetration test with four challenges: identifying an unsupported cipher suite, finding existing users via email enumeration, resetting a password by replacing an MD5 hash in a URL, and accessing an S3 bucket with weak ACLs to retrieve a flag. An attacker could reset passwords for arbitrary accounts and read sensitive files from a misconfigured cloud storage bucket.

medium.com

Published on medium.com

There were four questions in total. They weren’t too challenging, but I came across some interesting insights worth sharing.

Aleens-labs, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the password reset mechanism used a predictable MD5 hash of the email address as the only token, and the S3 bucket had overly permissive ACLs.

Impact

An attacker could reset the password of any user whose email address is known, leading to account takeover, and could read files from a misconfigured S3 bucket.

What the attacker needed

A free account; knowledge of victim's email; AWS CLI configured

How it was found

  1. Register an account on the website.
  2. Go to the Forgot Password page and observe the MD5 hash in the URL.
  3. Generate the MD5 hash of the target email address.
  4. Replace the hash in the URL with the new one.
  5. Set a new password and submit to reset the password.
  6. Access the flag after resetting the password.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This is a practice exercise with four tasks. One task shows that a password reset link used a simple code (an MD5 hash) that anyone could calculate from an email address, so you could reset someone else's password. Another task shows that a cloud storage bucket was left open, letting anyone list and download its files.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.