๐ A New Hire
A detailed write-up of the Forensics challenge 'A New Hire' from Cyber Apocalypse CTF - 2025
๐ Challenge Overview
Category Details Additional Info ๐ Event Cyber Apocalypse CTF - 2025 Event Link ๐ฐ Category Forensics ๐ ๐ Points 1000 Out of 1000 total โญ Difficulty ๐ข Easy Personal Rating: 1/10 ๐ค Author Unknown Profile ๐ฎ Solves (At the time of flag submission) 323 solve rate ๐ Date 21-03-2025 Cyber Apocalypse CTF - 2025 ๐ฆพ Solved By mH4ck3r0n3 Team: QnQSec
๐ Challenge Information
The Royal Archives of Eldoria have recovered a mysterious documentโan old resume once belonging to Lord Malakar before his fall from grace. At first glance, it appears to be an ordinary record of his achievements as a noble knight, but hidden within the text are secrets that reveal his descent into darkness.
๐ฏ Challenge Files & Infrastructure
Provided Files
Files:
๐ Initial Analysis
First Steps
First, I analyzed the attached file. I ran
strings email.eml
:By analyzing the file, I realized it was a phishing email with a link leading to a
malware
. The file mentionsstorage.microsoftcloudservices.com:[PORT]/index.php
, so I decided to replace the domain with the link provided by the challenge and visit the page:This is where the supposed page used to spread the malware opened. After this initial analysis, let’s move on to the next phase.
๐ฏ Solution Path
Exploitation Steps
Exploitation
Clicking on
View Full Resume
, the following screen appeared:It asked for permission to open my
Explorer
. So, I decided to take a look at the page’s source and found the link to which I get redirected when clicking the button:I then searched for
3fe1690d955e8fd2a0b282501570e1f4/resumes
on the web server, finding the fileResume.pdf.Ink
. I downloaded it, and the first thing I did was check the metadata usingexiftool
:Inside the file, I found embedded commands for execution with
powershell
. I then decoded them from base64:This revealed a new path
3fe1690d955e8fd2a0b282501570e1f4/configs/client.py
. Apparently, this malware runs the scriptclient.py
from the server. When I visited the new path, I found theclient.py
:It seems everything is encoded in base64. After decoding the variable
key
, I found the flag:
1
echo SFRCezRQVF8yOF80bmRfbTFjcjBzMGZ0X3MzNHJjaD0xbjF0MTRsXzRjYzNzISF9Cg== | base64 -d
Flag capture
๐ ๏ธ Exploitation Process
Approach
The automatic exploit makes a GET request to fetch the contents of the
client.py
file and extracts the base64. Once decoded, it prints the result, which is the flag.
๐ฉ Flag Capture
FlagHTB{4PT_28_4nd_m1cr0s0ft_s34rch=1n1t14l_4cc3s!!}
Proof of Execution
๐ง Tools Used
Tool Purpose Python Exploit Exiftool Metadata Exfiltration
๐ก Key Learnings
Skills Improved
- Binary Exploitation
- Reverse Engineering
- Web Exploitation
- Cryptography
- Forensics
- OSINT
- Miscellaneous
๐ Final Statistics
Metric | Value | Notes |
---|---|---|
Time to Solve | 00:03 | From start to flag |
Global Ranking (At the time of flag submission) | 33/6550 | Challenge ranking |
Points Earned | 950 | Team contribution |
Created: 21-03-2025 โข Last Modified: 21-03-2025 Author: mH4ck3r0n3 โข Team: QnQSec