Writeups PicoCTFWebJavaScriptBase64

Login Writeup - PicoGym

Writeup for the Login challenge from PicoCTF PicoGym.

Contents

Category: Web Exploitation

Difficulty: Medium

Description

A login page is served by a Node.js server. The authentication logic lives in an index.js file served publicly. The flag is hidden inside that file.

Overview

Solution

Step 1: Fetch index.js

r = requests.get("https://login.mars.picoctf.net/index.js")

Step 2: Find the Encoded String

cGljb0NURns1M3J2M3JfNTNydjNyXzUzcnYzcl81M3J2M3JfNTNydjNyfQ==

Step 3: Decode

import base64
encoded = "cGljb0NURns1M3J2M3JfNTNydjNyXzUzcnYzcl81M3J2M3JfNTNydjNyfQ=="
result = base64.b64decode(encoded).decode()

Why This Is Broken

Flag

picoCTF{53rv3r_53rv3r_53rv3r_53rv3r_53rv3r}

← Back to Blog