Contents

🌐 Login

A detailed write-up of the Web challenge 'Login' from picoMini by redpwn - 2021

/images/PicoGym/PicoMiniByRedPwn-2021/Login/challenge_presentation.png
Challenge Presentation

📊 Challenge Overview

Category Details Additional Info
🏆 Event PicoGym Event Link
🔰 Category Web 🌐
💎 Points Out of 500 total
⭐ Difficulty 🟡 Medium Personal Rating: 0/10
👤 Author BrownieInMotion Profile
🎮 Solves (At the time of flag submission) 45.957 solve rate
📅 Date 13-02-2025 PicoGym
🦾 Solved By mH4ck3r0n3 Team:

📝 Challenge Information

My dog-sitter’s brother made this website but I can’t get in; can you help? login.mars.picoctf.net

🎯 Challenge Files & Infrastructure

Provided Files

1
Files: None

🔍 Initial Analysis

First Steps

Initially, the website appears as follows:

/images/PicoGym/PicoMiniByRedPwn-2021/Login/site_presentation.png
Site Presentation

Upon seeing a login screen, I decided to immediately inspect the page source:

/images/PicoGym/PicoMiniByRedPwn-2021/Login/page_source.png
Page Source

I found a JavaScript script included in the page (index.js). When I tried to open it, I found the function that handles the login process (client-side):

/images/PicoGym/PicoMiniByRedPwn-2021/Login/indexjs.png
Index.js

It also clearly shows the section for a successful login, where, as we can see, it triggers an alert by decoding a strange base64 string…

🎯 Solution Path

Exploitation Steps

Exploitation

Taking that strange base64 string and trying to decode it with bash:

1
echo;echo cGljb0NURns1M3J2M3JfNTNydjNyXzUzcnYzcl81M3J2M3JfNTNydjNyfQ | base64 -d  

I obtained the flag.

Flag capture

/images/PicoGym/PicoMiniByRedPwn-2021/Login/manual_flag.png
Manual Flag

🛠️ Exploitation Process

Approach

The exploit makes a GET request to /index.js, extracts the base64-encoded flag, decodes it, and prints it.

🚩 Flag Capture

Flag

Proof of Execution

/images/PicoGym/PicoMiniByRedPwn-2021/Login/automated_flag.png
Automated Flag
Screenshot of successful exploitation

🔧 Tools Used

Tool Purpose
Python Exploit
ChromeDevTools Web Testing

💡 Key Learnings

Skills Improved

  • Binary Exploitation
  • Reverse Engineering
  • Web Exploitation
  • Cryptography
  • Forensics
  • OSINT
  • Miscellaneous

📊 Final Statistics

Metric Value Notes
Time to Solve 00:00 From start to flag
Global Ranking (At the time of flag submission) Challenge ranking
Points Earned Team contribution

Created: 13-02-2025 • Last Modified: 13-02-2025 *Author: mH4ck3r0n3 • Team: *