// HackTheBox  ·  writeup

SmartyPants

HackTheBox Very Easy EvtxECmdPython
DFIR

Scenario

Players will use SmartScreen debug logs to understand user activities and corporate sabotage. This Sherlock is released alongside a HackTheBox blog post (https://hackthebox.com/blog/smartscreen-logs-evidence-execution) to highlight how this log, which was discovered by HackTheBox content engineers during their research, can serve as a crucial artefact in incident investigations.

Executive Summary

An attacker connected over RDP to the workstation where a user named Dutch keeps sensitive files and ran a roughly thirteen minute sabotage and extortion session. They installed an archiver, then dropped a portable file-search utility and used it to locate board and budget documents. A cloud sync client followed for exfiltration, and a file shredder was installed to destroy the data afterwards. The last step was clearing the event logs. Because the Security log was wiped, the logon and process-creation trail is gone, and the whole story is rebuilt from the SmartScreen debug channel and the Terminal Services logs that survived.

Artifacts

Timestamp note: Every answer uses YYYY-MM-DD HH:MM:SS. Use the TimeCreated value from the EvtxECmd CSV as it is and do not shift it.

Parse the whole log directory once and work from the CSV from then on.

EvtxECmd -d evidence/Logs --csv work/evtx --csvf all.csv

Initial Access

Q1 — The attacker logged in to the machine where Dutch saves critical files, via RDP on 24th January 2025. Please determine the timestamp of this login.

The obvious source is Security 4624 with logon type 10, but the Security log was cleared during the intrusion (see Q10), so no logon events from the session survive. Pivot to the Terminal Services channels. RemoteConnectionManager event 1149 (“User authentication succeeded”) names the user and the source address, and it is the first RDP event for the connection. LocalSessionManager logs its own session events a second later.

python3 -I -c "import csv;[print(r['TimeCreated'],r['Channel'],r['EventId'],r['PayloadData1']) for r in csv.DictReader(open('work/evtx/all.csv')) if r['EventId'] in ('1149','21','22','25') and r['TimeCreated'].startswith('2025-01-24')]"

Gotcha: 1149 and the LocalSessionManager events sit one second apart. The 1149 authentication event is the login; the session events are the desktop being attached.

Click flag to reveal 2025-01-24 10:15:14

Execution

Q2 — The attacker downloaded a few utilities that aided them for their sabotage and extortion operation. What was the first tool they downloaded and installed?

Filter the CSV to the SmartScreen debug channel and sort by time. Every file the user launches produces an applicationLookup event carrying its path, so the session reads like a program execution history. The first installer fetched into Downloads after the RDP login is an archiver setup file, and the installed program’s own executable shows up in the lookups right after it.

python3 -I -c "import csv;[print(r['TimeCreated'],r['PayloadData1']) for r in csv.DictReader(open('work/evtx/all.csv')) if 'SmartScreen' in r['Channel']]"
Click to reveal answer WinRAR
Q3 — They then proceeded to download and then execute the portable version of a tool that could be used to search for files on the machine quickly and efficiently. What was the full path of the executable?

From the same SmartScreen listing, look for an executable that has no installer in front of it. A portable file-search tool runs straight from Downloads, and its applicationLookup event carries the full path. The path starts with the drive letter, as the format asks.

python3 -I -c "import csv;[print(r['TimeCreated'],r['PayloadData1']) for r in csv.DictReader(open('work/evtx/all.csv')) if 'SmartScreen' in r['Channel'] and 'Downloads' in r['PayloadData1']]"
Click flag to reveal C:\Users\Dutch\Downloads\Everything.exe
Q4 — What is the execution time of the tool from task 3?

Same event as Q3. The TimeCreated of the applicationLookup row for that path is the first time the tool ran. It lands a few minutes after the login, in the same window as the archiver install, so the attacker was moving quickly.

Click to reveal answer 2025-01-24 10:17:33

Discovery

Q5 — The utility was used to search for critical and confidential documents stored on the host, which the attacker could steal and extort the victim. What was the first document that the attacker got their hands on and breached the confidentiality of that document?

Keep reading the SmartScreen channel after the search tool starts. Opening a document produces an isFileSupported event with its full path, which is how a viewer or shell checks that a file type can be handled. The first one after the search tool is a PDF in a board of directors folder under Documents. Note that the folder name contains a space and a leading year, so copy the path exactly.

python3 -I -c "import csv;[print(r['TimeCreated'],r['PayloadData1']) for r in csv.DictReader(open('work/evtx/all.csv')) if 'SmartScreen' in r['Channel'] and 'isFileSupported' in str(r.values())]"
Click flag to reveal C:\Users\Dutch\Documents\2025- Board of directors Documents\Ministry Of Defense Audit.pdf
Q6 — Find the name and path of second stolen document as well.

The next isFileSupported event after Q5 sits in the same folder, about twenty seconds later. The name flags it as budget material marked confidential.

Click to reveal answer C:\Users\Dutch\Documents\2025- Board of directors Documents\2025-BUDGET-ALLOCATION-CONFIDENTIAL.pdf

Exfiltration

Q7 — The attacker installed a Cloud utility as well to steal and exfiltrate the documents. What is name of the cloud utility?

A minute after the second document, a setup file for a cloud storage sync client appears in the SmartScreen listing. Cloud storage clients are a common exfiltration route because the traffic is ordinary HTTPS to a well-known provider.

python3 -I -c "import csv;[print(r['TimeCreated'],r['PayloadData1']) for r in csv.DictReader(open('work/evtx/all.csv')) if 'SmartScreen' in r['Channel'] and 'Setup' in r['PayloadData1']]"
Click flag to reveal MEGASync
Q8 — When was this utility executed?

The installer lookup from Q7 is not the answer. Look for the installed client’s own executable under its install path, which logs a separate applicationLookup a couple of minutes after the setup file.

python3 -I -c "import csv;[print(r['TimeCreated'],r['PayloadData1']) for r in csv.DictReader(open('work/evtx/all.csv')) if 'SmartScreen' in r['Channel'] and 'MEGAsync.exe' in r['PayloadData1']]"

Gotcha: Setup and application are separate events. Reporting the installer time answers a different question.

Click to reveal answer 2025-01-24 10:22:19

Impact

Q9 — The Attacker also proceeded to destroy the data on the host so it is unrecoverable. What utility was used to achieve this?

After the sync client, the SmartScreen channel shows another download and install, this time of a secure-deletion tool. The setup file is followed shortly by the application executable, so the attacker installed it and ran it straight away.

python3 -I -c "import csv;[print(r['TimeCreated'],r['PayloadData1']) for r in csv.DictReader(open('work/evtx/all.csv')) if 'SmartScreen' in r['Channel'] and 'hredder' in r['PayloadData1']]"
Click flag to reveal File Shredder

Defense Evasion

Q10 — The attacker cleared 2 important logs, thinking they covered all their tracks. When was the security log cleared?

Security event 1102 (“The audit log was cleared”) records the wipe; 104 is the equivalent for other logs, which covers the second cleared log the task mentions. Filter the CSV for both on the incident date. The Security 1102 is the last step of the session and explains why Q1 had to be answered from Terminal Services instead of 4624.

python3 -I -c "import csv;[print(r['TimeCreated'],r['Channel'],r['EventId']) for r in csv.DictReader(open('work/evtx/all.csv')) if r['EventId'] in ('1102','104') and r['TimeCreated'].startswith('2025-01-24')]"
Click to reveal answer 2025-01-24 10:28:41

Attack Summary

PhaseAction
Initial AccessRDP login to Dutch’s workstation, seen in Terminal Services 1149
ExecutionArchiver downloaded and installed
ExecutionPortable file-search utility run from Downloads
DiscoverySearch used to find board and budget documents
CollectionTwo confidential PDFs opened from the board of directors folder
ExfiltrationCloud sync client installed and launched
ImpactFile shredder installed and run to destroy data
Defense EvasionEvent logs cleared, Security 1102 last

Forensic Timeline

TimestampEvent
2025-01-24 10:15:14RDP authentication succeeds (RemoteConnectionManager 1149)
2025-01-24 10:17:14Archiver installer looked up in Downloads
2025-01-24 10:17:33Portable file-search tool first executed
2025-01-24 10:19:00First confidential PDF opened
2025-01-24 10:19:19Second confidential PDF opened
2025-01-24 10:20:05Cloud sync client installer looked up
2025-01-24 10:22:19Cloud sync client executed
2025-01-24 10:26:40File shredder installer looked up
2025-01-24 10:27:09File shredder executed
2025-01-24 10:28:41Security log cleared (1102)

IOCs

TypeValue
Tool pathC:\Users\Dutch\Downloads\Everything.exe
InstallerC:\Users\Dutch\Downloads\winrar-x64-701.exe
InstallerMEGAsyncSetup64.exe
Installerfile_shredder_setup.exe
Accessed fileC:\Users\Dutch\Documents\2025- Board of directors Documents\Ministry Of Defense Audit.pdf
Accessed fileC:\Users\Dutch\Documents\2025- Board of directors Documents\2025-BUDGET-ALLOCATION-CONFIDENTIAL.pdf
AccountDutch (RDP)

MITRE ATT&CK

TechniqueIDDescription
Remote Services: Remote Desktop ProtocolT1021.001Attacker logged in to the workstation over RDP as Dutch
Ingress Tool TransferT1105Archiver, search tool, sync client and shredder fetched onto the host
File and Directory DiscoveryT1083Portable search utility used to find sensitive documents
Exfiltration to Cloud StorageT1567.002Cloud sync client installed to move the documents out
Data DestructionT1485Secure-deletion utility used to make the data unrecoverable
Indicator Removal: Clear Windows Event LogsT1070.001Security log cleared (the task says two logs were cleared)

Defender Takeaways

SmartScreen debug logging records what Security auditing missed. Once the Security log was cleared, there was no 4624 or 4688 left, but the SmartScreen channel still held a path-level history of everything run and opened. Collect Microsoft-Windows-SmartScreen/Debug alongside the standard channels, and enable it where it is off by default.

Ship logs off the host before the attacker can clear them. Both the Security and a second log were wiped in the final minutes. Forward Security and Terminal Services events to a collector in near real time, and alert on 1102 and 104 as high-severity.

RDP into a user’s workstation followed by installers is a short chain worth detecting. The session went from login to archiver, search tool, cloud sync client and shredder in minutes. Alerting on an RDP logon followed by software installs from Downloads would have fired well before the shredder ran.

Restrict outbound access to consumer cloud storage. The sync client existed only to move documents out. Egress filtering or application allow-listing on a machine holding board documents would have blocked it.

Conclusion

The attacker reached sensitive board documents over RDP, exfiltrated them with a cloud sync client, shredded the originals and wiped the logs, all within about thirteen minutes. The wipe removed the standard evidence, but the SmartScreen debug log kept the path-level history that the defenders needed.