Dan Chui
Happy Bytes
cybersecurity

Threat Hunting with Microsoft Defender XDR (including Defender for Endpoint): Investigating Tor Browser Activity

Threat Hunting with Microsoft Defender XDR (including Defender for Endpoint): Investigating Tor Browser Activity
7 min read
#cybersecurity

๐Ÿ”Ž Threat Hunting with Microsoft Defender XDR: Investigating Tor Browser Activity

Threat hunting is one of the most valuable skills for a security analyst. Rather than waiting for alerts, analysts proactively search for suspicious activity hidden in telemetry data.

In this project, I conducted a threat hunt using Microsoft Defender XDR Advanced Hunting to investigate suspicious activity related to the Tor Browser on an endpoint.

The investigation confirmed that Tor was downloaded, executed, and actively used on the endpoint, with network connections established to Tor relay infrastructure.

This investigation follows a structured SOC-style workflow including detection, alert triage, timeline reconstruction, severity assessment, and escalation decision-making.


๐ŸŽฏ Investigation Overview

FieldValue
Investigation TypeThreat Hunt
PlatformMicrosoft Defender XDR
Endpointvm-hunt-tyo
Userdan
Detection MethodKQL Log Analysis

๐Ÿšจ Alert Triage

Upon identifying Tor-related activity, the alert was triaged to determine whether it represented malicious behavior, policy violation, or benign user activity.

Key Questions

  • Is the activity authorized within the environment?
  • Is there evidence of malicious intent or follow-on activity?
  • Does the activity indicate data exfiltration or lateral movement?

Findings

  • Tor Browser activity confirmed via file, process, and network telemetry
  • No evidence of privilege escalation or persistence
  • Network connections aligned with Tor relay infrastructure

Severity Assessment

The activity was classified as Medium severity due to:

  • Use of anonymization software in a monitored environment
  • External encrypted communication
  • Potential violation of enterprise security policy

Investigation Objective

Identify whether the Tor Browser was downloaded, executed, and used on the endpoint and determine:

  • When Tor was downloaded
  • Whether it was executed
  • If network connections to Tor infrastructure occurred
  • What user artifacts were created during activity

๐Ÿง  Why Tor Activity Matters

Tor itself is not inherently malicious, but in enterprise environments it is often associated with:

๐Ÿ” Anonymous browsing
๐Ÿ•ธ Dark web marketplace access
๐Ÿ“ค Data exfiltration
๐Ÿšซ Corporate security policy violations

For security teams, Tor usage can be a high-risk signal depending on the environment.


๐Ÿ” Threat Hunting Methodology

The investigation relied on Microsoft Defender XDR Advanced Hunting (KQL) and multiple telemetry sources:

Log SourcePurpose
DeviceFileEventsDetect Tor downloads and file creation
DeviceProcessEventsDetect installer execution
DeviceNetworkEventsIdentify Tor network connections

The hunting workflow followed this sequence:

1๏ธโƒฃ Identify Tor-related file downloads
2๏ธโƒฃ Confirm installer execution
3๏ธโƒฃ Detect Tor process creation
4๏ธโƒฃ Identify network connections to Tor infrastructure
5๏ธโƒฃ Investigate user artifacts created during activity


โฑ Timeline of Events

The investigation revealed the following timeline:

Time (UTC)Event
00:18:19Tor installer downloaded
00:21:44Tor installer executed
00:22:04โ€“00:22:12Tor files extracted to Desktop
00:22:22Tor Browser launched
00:22:34Connection established to Tor relay
00:22:37โ€“00:27:54Continued Tor browsing activity
00:35:58tor-shopping-list.txt created

This sequence shows a complete activity chain from download to network communication.


๐Ÿ“ฅ Step 1: Identifying Tor Downloads

The first step was to search for any file containing the string "tor".

DeviceFileEvents
| where DeviceName == "vm-hunt-tyo"
| where InitiatingProcessAccountName == "dan"
| where FileName startswith "tor"
| order by Timestamp desc

This query identified the download of: tor-browser-windows-x86_64-portable-15.0.7.exe

This installer was downloaded to the Downloads directory, marking the start of Tor activity.

KQL query showing Tor installer download

โš™๏ธ Step 2: Detecting Installer Execution

Next, I searched process execution logs to determine whether the installer was run.

DeviceProcessEvents
| where DeviceName == "vm-hunt-tyo"
| where ProcessCommandLine contains "tor-browser"

The logs confirmed that the installer was executed and extracted the Tor Browser files to the system.

KQL query showing Tor installation

๐Ÿš€ Step 3: Detecting Tor Process Activity

To confirm that Tor was actually launched, I searched for the following processes:

tor.exe | firefox.exe (Tor Browser)

DeviceProcessEvents
| where FileName has_any ("tor.exe","firefox.exe")

The logs confirmed both processes were executed shortly after extraction.

KQL query showing Tor file execution

๐ŸŒ Step 4: Detecting Tor Network Connections

One of the strongest indicators of Tor activity is network communication with Tor relay nodes.

Tor commonly uses ports such as:

9001 | 9030 | 9050 | 9051 | 9150

The following query identified Tor network activity:

DeviceNetworkEvents
| where DeviceName == "vm-hunt-tyo"
| where InitiatingProcessFileName in ("tor.exe","firefox.exe")
| where RemotePort in ("9001","9030","9040","9050","9051","9150","80","443")

The endpoint established a connection to:

IP Address: 15.204.223.128 | Port: 9001 | Process: tor.exe

This confirms the system successfully connected to a Tor relay node.

KQL query showing Tor network relay

๐Ÿ“„ Step 5: Identifying User Artifacts

Later in the timeline, the following file was created on the Desktop: tor-shopping-list.txt

KQL query showing file artifact

This file appears to be a user-created artifact generated after Tor activity was observed.


๐Ÿšจ Indicators of Interest

TypeIndicator
Filetor-browser-windows-x86_64-portable-15.0.7.exe
Filetor-shopping-list.txt
Processtor.exe
Processfirefox.exe
IP Address15.204.223.128
Port9001

๐Ÿงฌ MITRE ATT&CK Mapping

The activity observed aligns with several MITRE ATT&CK techniques:

TechniqueID
User ExecutionT1204
Ingress Tool TransferT1105
Application Layer ProtocolT1071
Encrypted ChannelT1573

These techniques describe the download, execution, and encrypted communication behaviors observed during the investigation.


๐Ÿ›ก Security Assessment

The investigation confirmed that Tor Browser was downloaded, executed, and used on the endpoint, with successful outbound communication to Tor relay infrastructure.

No evidence of persistence, privilege escalation, or malware execution was observed during the analysis period.

However, the use of anonymization tools in an enterprise environment may indicate:

  • Policy violations
  • Reduced visibility into user activity
  • Potential risk depending on user intent

The activity was therefore assessed as non-malicious but potentially policy-violating.


Endpoint Monitoring

Monitor for execution of Tor-related processes such as:

  • tor.exe
  • firefox.exe (Tor Browser)

Application Control

Restrict installation of anonymizing tools such as:

  • Tor Browser
  • Proxy tunneling tools
  • Network Controls

Consider blocking outbound connections to common Tor ports: 9001 | 9030 | 9050 | 9051 | 9150


โฌ†๏ธ Escalation Consideration

Although no direct malicious activity was identified, the use of anonymization software in an enterprise environment may violate acceptable use policies and reduce monitoring visibility.

The activity was escalated for further review to validate:

  • Whether the activity was authorized
  • Whether containment or remediation actions were required

๐Ÿงพ Conclusion

This investigation demonstrates how endpoint telemetry can support a structured SOC workflow including alert triage, investigation, severity assessment, and escalation.

The activity followed a clear sequence:

  1. Tor downloaded
  2. Installer executed
  3. Browser launched
  4. Tor network connection established
  5. User artifact created

While no malicious activity was confirmed, the use of anonymization software represents a potential policy violation and highlights the importance of monitoring and contextual analysis in security operations.


๐Ÿ“ฅ Download the Executive Summary Report

๐Ÿ‘‰ Tor Threat Hunting Summary Report (PDF)

๐Ÿ”— Full report and supporting files available on GitHub


โš ๏ธ Disclaimer: This project is a simulated threat hunting exercise created for educational and portfolio purposes. The environment, devices, and user accounts referenced are part of a controlled lab environment and do not represent real-world systems or individuals.


Thanks for reading! ๐Ÿ™

If you're interested in security governance, GRC frameworks, or enterprise risk programs - feel free to connect with me on LinkedIn.

Feel free to reach out with questions or thoughts.