fousseyni-berthe/threat-hunting-scenario-tor

GitHub: fousseyni-berthe/threat-hunting-scenario-tor

一个基于Microsoft Defender for Endpoint的威胁狩猎场景,展示如何通过KQL查询检测企业环境中未经授权的TOR浏览器使用。

Stars: 0 | Forks: 0

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