Writeups PicoCTFWebRedirectsBase64

FindMe Writeup - PicoGym

Writeup for the FindMe challenge from PicoCTF PicoGym.

Contents

Category: Web Exploitation

Difficulty: Medium

Points: 100

Description

Logging into the site triggers a chain of redirects. The flag is split into two parts, each hidden in a different place along the redirect chain.

Overview

Solution

Step 1: Log In and Follow the Redirect

r = requests.post(url + "/login", data={"username": "test", "password": "test!"})
redirect = r.url

Step 2: Decode Part 1 from the URL

clue = redirect.split("id=")[-1] + "=="
pt1 = base64.b64decode(clue).decode()

Step 3: Decode Part 2 from the Script Tag

script = soup.find("script").get_text()
clue = re.search('"(.*?)"', script).group(1).split("id=")[-1]
pt2 = base64.b64decode(clue).decode()

Step 4: Concatenate

result = pt1 + pt2

Why the Flag is Split

Flag

picoCTF{proxies_all_the_way_3d9e3697}

← Back to Blog