markthuri7/threat-hunting-scenario-tor

GitHub: markthuri7/threat-hunting-scenario-tor

这是一个威胁狩猎实战教程,展示如何通过Microsoft Defender for Endpoint的KQL查询检测企业环境中未经授权的TOR浏览器使用。

Stars: 0 | Forks: 0

Tor Logo with the onion and a crosshair on it # 威胁狩猎报告:未经授权的TOR使用 - [场景创建](https://github.com/markthuri7/threat-hunting-scenario-tor/blob/main/threat-hunting-scenario-tor-event-creation.md) ## 平台和语言 - Windows 10 虚拟机(Microsoft Azure) - EDR 平台:Microsoft Defender for Endpoint - Kusto 查询语言(KQL) - Tor Browser ## 场景 管理层怀疑一些员工可能正在使用TOR浏览器来绑过网络安全控制,因为最近的网络日志显示异常加密流量模式以及与已知TOR入口节点的连接。此外,有匿名举报称员工在工作时间讨论访问受限网站的方法。目标是检测任何TOR使用情况并分析相关的安全事件以减轻潜在风险。如果发现任何TOR使用情况,请通知管理层。 ### 高级别TOR相关IoC发现计划 - **检查 `DeviceFileEvents`** 中是否存在任何 `tor(.exe)` 或 `firefox(.exe)` 文件事件。 - **检查 `DeviceProcessEvents`** 中是否存在任何安装或使用的迹象。 - **检查 `DeviceNetworkEvents`** 中是否存在任何通过已知TOR端口的出站连接迹象。 ## 步骤 ### 1. 搜索 `DeviceFileEvents` 表 搜索了任何包含"tor"字符串的文件,发现用户"employee"似乎下载了TOR安装程序,做了一些导致许多TOR相关文件被复制到桌面的操作,并在 `2026-03-28T04:31:50Z` 时在桌面上创建了一个名为 `tor-shopping-list.txt` 的文件。这些事件始于 `2026-03-28T03:57:23.5592363Z`。 **用于定位事件的查询:** ``` DeviceFileEvents | where DeviceName == "windows-11-vm-e" | where InitiatingProcessAccountName == "markmthus" | where FileName contains "tor" | where Timestamp >= datetime(2024-11-08T22:14:48.6065231Z) | order by Timestamp desc | project Timestamp, DeviceName, ActionType, FileName, FolderPath, SHA256, Account = InitiatingProcessAccountName ``` 1 ### 2. 搜索 `DeviceProcessEvents` 表 搜索了任何包含字符串"tor-browser-windows-x86_64-portable-15.0.8.exe"的 `ProcessCommandLine`。根据返回的日志,在 `2026-03-28T04:01:28.9973851Z`,"markmthus"设备上的一名员工从下载文件夹运行了文件 `tor-browser-windows-x86_64-portable-15.0.8.exe`,使用的命令触发了静默安装。 **用于定位事件的查询:** ``` DeviceProcessEvents | where DeviceName == "windows-11-vm-e" | where ProcessCommandLine contains "tor-browser-windows-x86_64-portable-15.0.8.exe" | project Timestamp, DeviceName, AccountName, ActionType, FileName, FolderPath, SHA256, ProcessCommandLine ``` 2 ### 3. 搜索 `DeviceProcessEvents` 表以查找TOR浏览器执行 搜索了用户"markmthus"实际打开TOR浏览器的任何迹象。有证据表明他们在 `2026-03-28T04:03:02.985053` 打开了它。之后还有多次 `firefox.exe`(TOR)以及 `tor.exe` 被启动的情况。 **用于定位事件的查询:** ``` DeviceProcessEvents | where DeviceName == "windows-11-vm-e" | where FileName has_any ("tor.exe", "firefox.exe", "tor-browser.exe") | project Timestamp, DeviceName, AccountName, ActionType, FileName, FolderPath, SHA256, ProcessCommandLine | order by Timestamp desc ``` 4 ### 4. 搜索 `DeviceNetworkEvents` 表以查找TOR网络连接 搜索了TOR浏览器使用任何已知TOR端口建立连接的任何迹象。在 `2026-03-28T04:04:15.7934745Z`,"windows-11-vm-e"设备上的一名员工成功建立了到远程IP地址 `131.203.32.146` 端口 `9001` 的连接。该连接由位于文件夹 `c:\users\markmthus\desktop\tor browser\browser\torbrowser\tor\tor.exe` 中的进程 `tor.exe` 发起。还有其他几个通过端口 `443` 连接到网站的连接。 **用于定位事件的查询:** ``` DeviceNetworkEvents | where DeviceName == "windows-11-vm-e" | where InitiatingProcessAccountName != "system" | where InitiatingProcessFileName in ("tor.exe", "firefox.exe") | where RemotePort in ("9001", "9030", "9040", "9050", "9051", "9150", "80", "443") | project Timestamp, DeviceName, InitiatingProcessAccountName, ActionType, RemoteIP, RemotePort, RemoteUrl, InitiatingProcessFileName, InitiatingProcessFolderPath | order by Timestamp desc ``` 6 ## 按时间顺序的事件时间线 ### 1. 文件下载 - TOR安装程序 - **时间戳:** `2026-03-28T03:57:23.5592363Z` - **事件:** 用户"employee"将名为 `tor-browser-windows-x86_64-portable-15.0.8.exe` 的文件下载到下载文件夹。 - **操作:** 检测到文件下载。 - **文件路径:** `C:\Users\markmthus\Downloads\tor-browser-windows-x86_64-portable-15.0.8.exe` ### 2. 进程执行 - TOR浏览器安装 - **时间戳:** `2026-03-28T04:01:28.9973851Z` - **事件:** 用户"markmthus"以静默模式执行了文件 `tor-browser-windows-x86_64-portable-15.0.8.exe`,启动了TOR浏览器的后台安装。 - **操作:** 检测到进程创建。 - **命令:** `tor-browser-windows-x86_64-portable-15.0.8.exe /S` - **文件路径:** `C:\Users\markmthus\Downloads\tor-browser-windows-x86_64-portable-15.0.8.exe` ### 3. 进程执行 - TOR浏览器启动 - **时间戳:** `2026-03-28T04:03:02.9850533Z` - **事件:** 用户"markmthus"打开了TOR浏览器。随后还创建了与TOR浏览器相关的其他进程,如 `firefox.exe` 和 `tor.exe`,表明浏览器成功启动。 - **操作:** 检测到TOR浏览器相关可执行文件的进程创建。 - **文件路径:** `C:\Users\markmthus\Desktop\Tor Browser\Browser\TorBrowser\Tor\tor.exe` ### 4. 网络连接 - TOR网络 - **时间戳:** `2026-03-28T04:04:15.7934745Z` - **事件:** 用户"employee"使用 `tor.exe` 建立了到IP `131.203.32.146` 端口 `9001` 的网络连接,确认了TOR浏览器网络活动。 - **操作:** 连接成功。 - **进程:** `tor.exe` - **文件路径:** `c:\users\markmthus\desktop\tor browser\browser\torbrowser\tor\tor.exe` ### 5. 附加网络连接 - TOR浏览器活动 - **时间戳:** - `2026-03-28T04:04:19Z` - 连接到 `64.65.62.79` 端口 `443`。 - `2026-03-28T04:04:31Z` - 连接到本地 `127.0.0.1` 端口 `9150`。 - **事件:** 建立了额外的TOR网络连接,表明用户"employee"通过TOR浏览器持续活动。 - **操作:** 检测到多个成功连接。 ### 6. 文件创建 - TOR购物清单 - **时间戳:** `2026-03-28T04:31:50Z` - **事件:** 用户"employee"在桌面上创建了一个名为 `tor-shopping-list.txt` 的文件,可能表示与TOR浏览器活动相关的清单或笔记。 - **操作:** 检测到文件创建。 - **文件路径:** `C:\Users\markmthus\Desktop\tor-shopping-list.txt` ## 总结 "windows-11-vm-e"设备上的用户"markmthus"启动并完成了TOR浏览器的安装。他们继续启动浏览器,在TOR网络内建立连接,并在桌面上创建了各种与TOR相关的文件,包括一个名为 `tor-shopping-list.txt` 的文件。这一系列活动表明该用户主动安装、配置并使用了TOR浏览器,可能是为了匿名浏览目的,并以"购物清单"文件的形式进行了可能的文档记录。 ## 采取的响应 确认了用户 `markmthus` 在端点 `windows-11-vm-e` 上使用了TOR。该设备已被隔离,并已通知该用户的直接经理。
标签:Azure云安全, Conpot, EDR, IoC指标, IP 地址批量处理, KQL查询, Microsoft Defender for Endpoint, TOR浏览器检测, Windows安全, 恶意流量分析, 端点检测与响应, 网络安全, 脆弱性评估, 脱壳工具, 隐私保护, 隐私规避检测