Chainsaw 提供强大的“第一响应”能力,能够快速识别 Windows 取证工件(如事件日志和 MFT 文件)中的威胁。Chainsaw 提供了一种通用且快速的方法来搜索事件日志中的关键字,并通过内置对 Sigma 检测规则的支持以及自定义 Chainsaw 检测规则来识别威胁。
更多信息可在此工具的 Wiki 中找到:https://github.com/WithSecureLabs/chainsaw/wiki
在 WithSecure Countercept,我们通过 EDR 代理从端点摄取广泛的遥测数据源,以提供托管检测与响应服务。然而,在某些情况下,我们需要快速分析未被 EDR 捕获的取证工件,一个常见的例子是:在入侵发生时我们的 EDR 尚未安装的环境中,进行应急响应调查。Chainsaw 的创建正是为了在这些情况下,为我们的威胁猎人和应急响应顾问提供一种对取证工件进行快速分类的工具。
Windows 事件日志为威胁搜寻和应急响应调查提供了丰富的取证信息来源。不幸的是,处理和搜索事件日志可能是一个缓慢且耗时的过程,在大多数情况下还需要周围基础设施的支持(例如 ELK 堆栈或 Splunk 实例)才能高效地搜索日志数据并应用检测逻辑。这种开销往往意味着蓝队无法快速对 Windows 事件日志进行分类,从而无法提供推进调查所需的方向和结论。Chainsaw 解决了这个问题,因为它允许快速搜索和搜寻 Windows 事件日志。
在撰写本文时,很少有开源、独立的工具提供简单快速的 Windows 事件日志分类方法,能够识别日志中的有趣元素,并应用检测逻辑规则格式(如 Sigma)来检测恶意活动的迹象。在我们的测试中,确实存在的那些工具难以高效地将检测逻辑应用于大量事件日志,使其不适用于需要快速分类的场景。
使用 --sigma 和 --mapping 参数,您可以指定一个包含部分 SIGMA 检测规则(或整个 SIGMA git 仓库)的目录,Chainsaw 将自动加载、转换并针对提供的事件日志运行这些规则。映射文件告诉 Chainsaw 在事件日志中使用哪些字段进行规则匹配。默认情况下,Chainsaw 支持多种事件日志类型,包括但不限于:
有关用于规则检测的完整字段列表,请参阅映射文件,并可根据需要随意扩展。
除了支持 Sigma 规则外,Chainsaw 还支持自定义规则格式。在仓库中,您会找到一个 rules 目录,其中包含各种 Chainsaw 规则,允许用户:
随着 Chainsaw v2 的发布,我们决定不再将 Sigma Rules 和 EVTX-Attack-Samples 仓库作为 Chainsaw 的子模块包含在内。我们建议您单独克隆这些仓库,以确保拥有最新版本。
如果您仍然需要包含 Chainsaw 二进制文件、Sigma 规则和示例事件日志的一体化包,可以从这个 GitHub 仓库的 releases 部分 下载。在该 releases 部分,您还会找到适用于各种平台和架构的仅包含预编译二进制文件的 Chainsaw 版本。
如果您想自己编译 Chainsaw,可以克隆 Chainsaw 仓库:
git clone https://github.com/WithSecureLabs/chainsaw.git
然后通过运行: cargo build --release 自行编译代码。构建完成后,您将在 target/release 文件夹中找到编译后的二进制文件副本。
请务必使用 --release 标志进行构建,因为这将确保显著更快的执行时间。
如果您想快速了解 Chainsaw 运行时的效果,可以克隆 Sigma Rules 和 EVTX-Attack-Samples 仓库:``` git clone https://github.com/SigmaHQ/sigma git clone https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES.git
然后使用以下参数运行 Chainsaw:```
./chainsaw hunt EVTX-ATTACK-SAMPLES/ -s sigma/ --mapping mappings/sigma-event-logs-all.yml
├───devShells │ └───x86_64-linux │ └───default: development environment 'nix-shell' ├───formatter │ └───x86_64-linux: package 'alejandra-3.1.0' └───packages └───x86_64-linux ├───chainsaw: package 'chainsaw-2.10.1' └───default: package 'chainsaw-2.10.1'
Chainsaw 作为一个软件包,可通过 [nixpkgs](https://search.nixos.org/packages?query=chainsaw) 获取。
如果你使用的是 NixOS,只需将 `chainsaw` 添加到你的系统配置文件中。
不过,如果你没有使用 NixOS,你仍然可以通过 Nix 安装 Chainsaw。推荐的方式是使用 `nix-shell`,它会临时修改你的 $PATH 环境变量。
为此,请运行以下命令:```
nix-shell -p chainsaw
您还可以利用该仓库是一个 flake 这一事实,运行以下命令:``` nix profile install github:WithSecureLabs/chainsaw
然而,如果你想使用 Nix 自行构建 chainsaw,可以再次利用本仓库提供的 `flake.nix`。
要构建二进制文件,请在克隆仓库的根目录中运行以下命令:```
nix build .#
这将创建 ./result 目录,chainsaw 二进制文件位于 ./result/bin/chainsaw。
在下载并运行 chainsaw 时,你可能会发现本地的 EDR / 防病毒引擎将 Chainsaw 检测为恶意软件。你可以通过以下 GitHub issue 查看相关示例:Example1、Example2。
这些警告通常是由于示例事件日志和/或 Sigma 规则中包含对恶意字符串(例如 "mimikatz")的引用所致。我们还发现过 Chainsaw 二进制文件被一小部分防病毒引擎检测到的情况,这很可能是由于某种形式的启发式检测。
2022 年 7 月,我们发布了 Chainsaw 版本 2,这是对 Chainsaw 运行方式的重大改造。Chainsaw v2 包含多项重要改进,主要亮点如下:
如果你仍想使用 Chainsaw 版本 1,可以在发布部分找到编译好的二进制文件,也可以访问 v1.x.x 分支中的源代码。请注意,Chainsaw v1 已不再维护,所有用户都应考虑迁移到 Chainsaw v2。
万分感谢 @AlexKornitzer,他成功将 Chainsaw v1 的 "Christmas Project" 代码库在 v2 中打磨成了一件完善的产品。
USAGE:
chainsaw search [FLAGS] [OPTIONS] <pattern> [--] [path]...
FLAGS:
-h, --help Prints help information
-i, --ignore-case Ignore the case when searching patterns
--json Print the output in json format
--load-unknown Allow chainsaw to try and load files it cannot identify
--local Output the timestamp using the local machine's timestamp
-q Suppress informational output
--skip-errors Continue to search when an error is encountered
-V, --version Prints version information
OPTIONS:
--extension <extension>... Only search through files with the provided extension
--from <from> The timestamp to search from. Drops any documents older than the value provided
-o, --output <output> The path to output results to
-e, --regex <pattern>... A string or regular expression pattern to search for
-t, --tau <tau>... Tau expressions to search with. e.g. 'Event.System.EventID: =4104'
--timestamp <timestamp> The field that contains the timestamp
--timezone <timezone> Output the timestamp using the timezone provided
--to <to> The timestamp to search up to. Drops any documents newer than the value provided
ARGS:
<pattern> A string or regular expression pattern to search for. Not used when -e or -t is specified
<path>... The paths containing event logs to load and hunt through
搜索所有 .evtx 文件中不区分大小写的字符串 "mimikatz"
./chainsaw search mimikatz -i evtx_attack_samples/
*搜索所有 .evtx 文件中的 PowerShell 脚本块事件(事件 ID 4014)
./chainsaw search -t 'Event.System.EventID: =4104' evtx_attack_samples/
搜索特定 evtx 日志中的登录事件,并使用匹配的正则表达式模式,以 JSON 格式输出
./chainsaw search -e "DC[0-9].insecurebank.local" evtx_attack_samples --json
USAGE:
chainsaw hunt [FLAGS] [OPTIONS] [--] [path]...
FLAGS:
--csv Print the output in csv format
--full Print the full values for the tabular output
-h, --help Prints help information
--json Print the output in json format
--load-unknown Allow chainsaw to try and load files it cannot identify
--local Output the timestamp using the local machine's timestamp
--log Print the output in log like format
--metadata Display additional metadata in the tablar output
-q Suppress informational output
--skip-errors Continue to hunt when an error is encountered
-V, --version Prints version information
OPTIONS:
--column-width <column-width> Set the column width for the tabular output
--extension <extension>... Only hunt through files with the provided extension
--from <from> The timestamp to hunt from. Drops any documents older than the value provided
--kind <kind>... Restrict loaded rules to specified kinds
--level <level>... Restrict loaded rules to specified levels
-m, --mapping <mapping>... A mapping file to tell Chainsaw how to use third-party rules
-o, --output <output> A path to output results to
-r, --rule <rule>... A path containing additional rules to hunt with
-s, --sigma <sigma>... A path containing Sigma rules to hunt with
--status <status>... Restrict loaded rules to specified statuses
--timezone <timezone> Output the timestamp using the timezone provided
--to <to> The timestamp to hunt up to. Drops any documents newer than the value provided
ARGS:
<rules> The path to a collection of rules to use for hunting
<path>... The paths containing event logs to load and hunt through
使用 Sigma 规则作为检测逻辑,对所有 evtx 文件进行狩猎
./chainsaw hunt evtx_attack_samples/ -s sigma/ --mapping mappings/sigma-event-logs-all.yml
使用 Sigma 规则和 Chainsaw 规则作为检测逻辑,对所有 evtx 文件进行狩猎,并以 CSV 格式输出到 results 文件夹
./chainsaw hunt evtx_attack_samples/ -s sigma/ --mapping mappings/sigma-event-logs-all.yml -r rules/ --csv --output results
使用 Sigma 规则作为检测逻辑,对所有 evtx 文件进行狩猎,仅搜索特定时间戳之间的内容,并以 JSON 格式输出结果
./chainsaw hunt evtx_attack_samples/ -s sigma/ --mapping mappings/sigma-event-logs-all.yml --from "2019-03-17T19:09:39" --to "2019-03-17T19:09:50" --json
$ ./chainsaw hunt -r rules/ evtx_attack_samples -s sigma/rules --mapping mappings/sigma-event-logs-all.yml --level critical
██████╗██╗ ██╗ █████╗ ██╗███╗ ██╗███████╗ █████╗ ██╗ ██╗
██╔════╝██║ ██║██╔══██╗██║████╗ ██║██╔════╝██╔══██╗██║ ██║
██║ ███████║███████║██║██╔██╗ ██║███████╗███████║██║ █╗ ██║
██║ ██╔══██║██╔══██║██║██║╚██╗██║╚════██║██╔══██║██║███╗██║
╚██████╗██║ ██║██║ ██║██║██║ ╚████║███████║██║ ██║╚███╔███╔╝
╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚══╝╚══╝
By WithSecure Countercept (@FranticTyping, @AlexKornitzer)
[+] Loading detection rules from: ../../rules/, /tmp/sigma/rules
[+] Loaded 129 detection rules (198 not loaded)
[+] Loading event logs from: ../../evtx_attack_samples (extensions: .evtx)
[+] Loaded 268 EVTX files (37.5 MB)
[+] Hunting: [========================================] 268/268
[+] Group: Antivirus
┌─────────────────────┬────────────────────┬──────────┬───────────┬─────────────┬────────────────────────────────┬──────────────────────────────────┬────────────────────┐
│ timestamp │ detections │ Event ID │ Record ID │ Computer │ Threat Name │ Threat Path │ User │
├─────────────────────┼────────────────────┼──────────┼───────────┼─────────────┼────────────────────────────────┼──────────────────────────────────┼────────────────────┤
│ 2019-07-18 20:40:00 │ ‣ Windows Defender │ 1116 │ 37 │ MSEDGEWIN10 │ Trojan:PowerShell/Powersploit. │ file:_C:\AtomicRedTeam\atomic- │ MSEDGEWIN10\IEUser │
│ │ │ │ │ │ M │ red-team-master\atomics\T1056\ │ │
│ │ │ │ │ │ │ Get-Keystrokes.ps1 │ │
├─────────────────────┼────────────────────┼──────────┼───────────┼─────────────┼────────────────────────────────┼──────────────────────────────────┼────────────────────┤
│ 2019-07-18 20:53:31 │ ‣ Windows Defender │ 1117 │ 106 │ MSEDGEWIN10 │ Trojan:XML/Exeselrun.gen!A │ file:_C:\AtomicRedTeam\atomic- │ MSEDGEWIN10\IEUser │
│ │ │ │ │ │ │ red-team-master\atomics\T1086\ │ │
│ │ │ │ │ │ │ payloads\test.xsl │ │
└─────────────────────┴────────────────────┴──────────┴───────────┴─────────────┴────────────────────────────────┴──────────────────────────────────┴────────────────────┘
[+] Group: Log Tampering
┌─────────────────────┬───────────────────────────────┬──────────┬───────────┬────────────────────────────────┬───────────────┐
│ timestamp │ detections │ Event ID │ Record ID │ Computer │ User │
├─────────────────────┼───────────────────────────────┼──────────┼───────────┼────────────────────────────────┼───────────────┤
│ 2019-01-20 07:00:50 │ ‣ Security Audit Logs Cleared │ 1102 │ 32853 │ WIN-77LTAPHIQ1R.example.corp │ Administrator │
└─────────────────────┴───────────────────────────────┴──────────┴───────────┴────────────────────────────────┴───────────────┘[+] Group: Sigma
┌─────────────────────┬────────────────────────────────┬───────┬────────────────────────────────┬──────────┬───────────┬──────────────────────────┬──────────────────────────────────┐
│ timestamp │ detections │ count │ Event.System.Provider │ Event ID │ Record ID │ Computer │ Event Data │
├─────────────────────┼────────────────────────────────┼───────┼────────────────────────────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────────────┤
│ 2019-04-29 20:59:14 │ ‣ Malicious Named Pipe │ 1 │ Microsoft-Windows-Sysmon │ 18 │ 8046 │ IEWIN7 │ --- │
│ │ │ │ │ │ │ │ Image: System │
│ │ │ │ │ │ │ │ PipeName: "\\46a676ab7f179e511 │
│ │ │ │ │ │ │ │ e30dd2dc41bd388" │
│ │ │ │ │ │ │ │ ProcessGuid: 365ABB72-D9C4-5CC │
│ │ │ │ │ │ │ │ 7-0000-0010EA030000 │
│ │ │ │ │ │ │ │ ProcessId: 4 │
│ │ │ │ │ │ │ │ RuleName: "" │
│ │ │ │ │ │ │ │ UtcTime: "2019-04-29 20:59:14. │
│ │ │ │ │ │ │ │ 430" │
├─────────────────────┼────────────────────────────────┼───────┼────────────────────────────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────────────┤
│ 2019-04-30 20:26:51 │ ‣ CobaltStrike Service │ 1 │ Microsoft-Windows-Sysmon │ 13 │ 9806 │ IEWIN7 │ --- │
│ │ Installations in Registry │ │ │ │ │ │ Details: "%%COMSPEC%% /b /c st │
│ │ │ │ │ │ │ │ art /b /min powershell.exe -no │
│ │ │ │ │ │ │ │ p -w hidden -noni -c \"if([Int │
│ │ │ │ │ │ │ │ Ptr]::Size -eq 4){$b='powershe │
│ │ │ │ │ │ │ │ ll.exe'}else{$b=$env:windir+'\ │
│ │ │ │ │ │ │ │ \syswow64\\WindowsPowerShell\\ │
│ │ │ │ │ │ │ │ v1.0\\powershell.exe'};$s=New- │
│ │ │ │ │ │ │ │ Object System.Diagnostics.Proc │
│ │ │ │ │ │ │ │ essStartInfo;$s.FileName=$b;$s │
│ │ │ │ │ │ │ │ .Arguments='-noni -nop -w hidd │
│ │ │ │ │ │ │ │ en -c &([scriptblock]::create( │
│ │ │ │ │ │ │ │ (New-Object IO.StreamReader(Ne │
│ │ │ │ │ │ │ │ w-Object IO.Compression.GzipSt │
│ │ │ │ │ │ │ │ ream((New-Object IO.MemoryStre │
│ │ │ │ │ │ │ │ am(,[Convert]::FromBase64Strin │
│ │ │ │ │ │ │ │ g(''H4sIAIuvyFwCA7VW+2/aSBD+OZ │
│ │ │ │ │ │ │ │ H6P1... │
│ │ │ │ │ │ │ │ (use --full to show all content) │
│ │ │ │ │ │ │ │ EventType: SetValue │
│ │ │ │ │ │ │ │ Image: "C:\\Windows\\system32\ │
│ │ │ │ │ │ │ │ \services.exe" │
│ │ │ │ │ │ │ │ ProcessGuid: 365ABB72-2586-5CC │
│ │ │ │ │ │ │ │ 9-0000-0010DC530000 │
│ │ │ │ │ │ │ │ ProcessId: 460 │
│ │ │ │ │ │ │ │ RuleName: "" │
│ │ │ │ │ │ │ │ TargetObject: "HKLM\\System\\C │
│ │ │ │ │ │ │ │ urrentControlSet\\services\\he │
│ │ │ │ │ │ │ │ llo\\ImagePath" │
│ │ │ │ │ │ │ │ UtcTime: "2019-04-30 20:26:51. │
│ │ │ │ │ │ │ │ 934" │
├─────────────────────┼────────────────────────────────┼───────┼────────────────────────────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────────────┤
│ 2019-05-12 12:52:43 │ ‣ Meterpreter or Cobalt │ 1 │ Service Control Manager │ 7045 │ 10446 │ IEWIN7 │ --- │
│ │ Strike Getsystem Service │ │ │ │ │ │ AccountName: LocalSystem │
│ │ Installation │ │ │ │ │ │ ImagePath: "%COMSPEC% /c ping │
│ │ │ │ │ │ │ │ -n 1 127.0.0.1 >nul && echo 'W │
│ │ │ │ │ │ │ │ inPwnage' > \\\\.\\pipe\\WinPw │
│ │ │ │ │ │ │ │ nagePipe" │
│ │ │ │ │ │ │ │ ServiceName: WinPwnage │
│ │ │ │ │ │ │ │ ServiceType: user mode service │
│ │ │ │ │ │ │ │ StartType: demand start │
├─────────────────────┼────────────────────────────────┼───────┼────────────────────────────────┼──────────┼───────────┼──────────────────────────┼──────────────────────────────────┤
│ 2019-06-21 07:35:37 │ ‣ Dumpert Process Dumper │ 1 │ Microsoft-Windows-Sysmon │ 11 │ 238375 │ alice.insecurebank.local │ --- │
│ │ │ │ │ │ │ │ CreationUtcTime: "2019-06-21 0 │
│ │ │ │ │ │ │ │ 6:53:03.227" │
│ │ │ │ │ │ │ │ Image: "C:\\Users\\administrat │
│ │ │ │ │ │ │ │ or\\Desktop\\x64\\Outflank-Dum │
│ │ │ │ │ │ │ │ pert.exe" │
│ │ │ │ │ │ │ │ ProcessGuid: ECAD0485-88C9-5D0 │
│ │ │ │ │ │ │ │ C-0000-0010348C1D00 │
│ │ │ │ │ │ │ │ ProcessId: 3572 │
│ │ │ │ │ │ │ │ RuleName: "" │
│ │ │ │ │ │ │ │ TargetFilename: "C:\\Windows\\ │
│ │ │ │ │ │ │ │ Temp\\dumpert.dmp" │
│ │ │ │ │ │ │ │ UtcTime: "2019-06-21 07:35:37. │
│ │ │ │ │ │ │ │ 324" │
└─────────────────────┴────────────────────────────────┴───────┴────────────────────────────────┴──────────┴───────────┴──────────────────────────┴──────────────────────────────────┘
COMMAND:
analyse shimcache Create an execution timeline from the shimcache with optional amcache enrichments
USAGE:
chainsaw analyse shimcache [OPTIONS] <SHIMCACHE>
ARGUMENTS:
<SHIMCACHE> The path to the shimcache artefact (SYSTEM registry file)
OPTIONS:
-e, --regex <pattern> A string or regular expression for detecting shimcache entries whose timestamp matches their insertion time
-r, --regexfile <REGEX_FILE> The path to a newline delimited file containing regex patterns for detecting shimcache entries whose timestamp matches their insertion time
-o, --output <OUTPUT> The path to output the result csv file
-a, --amcache <AMCACHE> The path to the amcache artefact (Amcache.hve) for timeline enrichment
-p, --tspair Enable near timestamp pair detection between shimcache and amcache for finding additional insertion timestamps for shimcache entries
-h, --help Print help
--regexfile 参数的示例模式文件位于 analysis/shimcache_patterns.txt 中。使用提供的正则模式分析 shimcache 工件,并在启用时间戳近邻配对检测的情况下使用 amcache 丰富化。输出到 csv 文件。
./chainsaw analyse shimcache ./SYSTEM --regexfile ./analysis/shimcache_patterns.txt --amcache ./Amcache.hve --tspair --output ./output.csv
使用提供的正则模式分析 shimcache 工件(不进行 amcache 丰富化)。输出到终端。
./chainsaw analyse shimcache ./SYSTEM --regexfile ./analysis/shimcache_patterns.txt
检测一个或多个 .evtx 文件中选择性事件日志篡改的两类指标:
RecordID 间隙:每个通道的 EventRecordID 值通常单调递增且无空洞。单个 evtx 文件内部出现空洞(即非日志轮转边界)属于异常,这是那些在不触发明显的“日志已清除”事件(EID 1102)的情况下精确删除单条记录的工具(例如 Eventlogedit 风格技术)留下的指纹。
时间间隙:在通常频繁产生事件的通道上,连续事件之间出现异常长的静默窗口,可能表明该窗口内的记录已被删除。阈值可配置;各主机的基线由分析人员自行确定。
COMMAND: analyse gaps Detect chronological or RecordID gaps in evtx files (possible selective record deletion)
USAGE: chainsaw analyse gaps [OPTIONS] [PATH]...
ARGUMENTS: [PATH]... The path(s) to evtx files or directories containing them
OPTIONS: --min-time-gap-minutes Minimum time gap (in minutes) between consecutive events to flag as suspicious [default: 30] --no-record-id-gaps Skip RecordID gap detection (only flag time gaps) --no-time-gaps Skip time gap detection (only flag RecordID gaps) -j, --json Print the output in json format -o, --output Save the output to a file -q Suppress informational output --skip-errors Continue when an error is encountered -h, --help Print help
使用默认的 30 分钟阈值扫描包含 evtx 文件的目录,以查找 RecordID 间隙和时间间隙:
./chainsaw analyse gaps ./Logs/
仅查找被选择性删除的记录(RecordID 空洞),并输出机器可读的 JSON:
./chainsaw analyse gaps ./Logs/ --no-time-gaps --json -o ./gaps.json
Chainsaw 中实现的 SRUM 数据库解析器与其他解析器不同,因为它不依赖关于表的硬编码值。信息直接从 SOFTWARE 配置单元中提取,该配置单元是必填参数。目标是避免与未知表相关的错误。
COMMAND:
analyse srum Analyse the SRUM database
USAGE:
chainsaw analyse srum [OPTIONS] --software <SOFTWARE_HIVE_PATH> <SRUM_PATH>
ARGUMENTS:
<SRUM_PATH> The path to the SRUM database
OPTIONS:
-s, --software <SOFTWARE_HIVE_PATH> The path to the SOFTWARE hive
--stats-only Only output details about the SRUM database
-q Suppress informational output
-o, --output <OUTPUT> Save the output to a file
-h, --help Print help
分析 SRUM 数据库(SOFTWARE 配置单元为必填项)
./chainsaw analyse srum --software ./SOFTWARE ./SRUDB.dat --output ./output.json
$ ./chainsaw analyse srum --software ./SOFTWARE ./SRUDB.dat -o ./output.json
██████╗██╗ ██╗ █████╗ ██╗███╗ ██╗███████╗ █████╗ ██╗ ██╗
██╔════╝██║ ██║██╔══██╗██║████╗ ██║██╔════╝██╔══██╗██║ ██║
██║ ███████║███████║██║██╔██╗ ██║███████╗███████║██║ █╗ ██║
██║ ██╔══██║██╔══██║██║██║╚██╗██║╚════██║██╔══██║██║███╗██║
╚██████╗██║ ██║██║ ██║██║██║ ╚████║███████║██║ ██║╚███╔███╔╝
╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚══╝╚══╝
By WithSecure Countercept (@FranticTyping, @AlexKornitzer)[+] ESE database file loaded from "/home/user/Documents/SRUDB.dat"
[+] Parsing the ESE database...
[+] SOFTWARE hive loaded from "/home/user/Documents/SOFTWARE"
[+] Parsing the SOFTWARE registry hive...
[+] Analysing the SRUM database...
[+] Details about the tables related to the SRUM extensions:
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| Table GUID | Table Name | DLL Path | Timeframe of the data | Expected Retention Time |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {5C8CF1C7-7257-4F13-B223-970EF5939312} | App Timeline Provider | %SystemRoot%\System32\eeprov.dll | 2022-03-10 16:34:59 UTC | 7 days |
| | | | 2022-03-10 21:10:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {B6D82AF1-F780-4E17-8077-6CB9AD8A6FC4} | Tagged Energy Provider | %SystemRoot%\System32\eeprov.dll | No records | 3 days |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {D10CA2FE-6FCF-4F6D-848E-B2E99266FA86} | WPN SRUM Provider | %SystemRoot%\System32\wpnsruprov.dll | 2022-03-10 20:09:00 UTC | 60 days |
| | | | 2022-03-10 21:09:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {D10CA2FE-6FCF-4F6D-848E-B2E99266FA89} | Application Resource Usage Provider | %SystemRoot%\System32\appsruprov.dll | 2022-03-10 16:34:59 UTC | 60 days |
| | | | 2022-03-10 21:10:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {FEE4E14F-02A9-4550-B5CE-5FA2DA202E37} | Energy Usage Provider | %SystemRoot%\System32\energyprov.dll | No records | 60 days |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {FEE4E14F-02A9-4550-B5CE-5FA2DA202E37}LT | Energy Usage Provider (Long Term) | %SystemRoot%\System32\energyprov.dll | No records | 1820 days |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {973F5D5C-1D90-4944-BE8E-24B94231A174} | Windows Network Data Usage Monitor | %SystemRoot%\System32\nduprov.dll | 2022-03-10 16:34:59 UTC | 60 days |
| | | | 2022-03-10 21:10:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {7ACBBAA3-D029-4BE4-9A7A-0885927F1D8F} | vfuprov | %SystemRoot%\System32\vfuprov.dll | 2022-03-10 20:09:00 UTC | 60 days |
| | | | 2022-03-10 21:10:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {DA73FB89-2BEA-4DDC-86B8-6E048C6DA477} | Energy Estimation Provider | %SystemRoot%\System32\eeprov.dll | No records | 7 days |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
| {DD6636C4-8929-4683-974E-22C046A43763} | Windows Network Connectivity Usage Monitor | %SystemRoot%\System32\ncuprov.dll | 2022-03-10 16:34:59 UTC | 60 days |
| | | | 2022-03-10 21:10:00 UTC | |
+------------------------------------------+--------------------------------------------+--------------------------------------+-------------------------+-------------------------+
[+] SRUM database parsed successfully
[+] Saving output to "/home/user/Documents/output.json"
[+] Saved output to "/home/user/Documents/output.json"
关于此痕迹的新取证洞察信息,可在 wiki 中查看:https://github.com/WithSecureLabs/chainsaw/wiki/SRUM-Analysis。
USAGE:
chainsaw dump [OPTIONS] <PATH>
ARGUMENTS:
<PATH> The path to an artefact to dump
OPTIONS:
-j, --json Dump in json format
--jsonl Print the output in jsonl format
--load-unknown Allow chainsaw to try and load files it cannot identify
-o, --output <OUTPUT> A path to output results to
-q Suppress informational output
--skip-errors Continue to hunt when an error is encountered
-h, --help Print help
转储 SOFTWARE 配置单元
./chainsaw dump ./SOFTWARE.hve --json --output ./output.json
| 事件类型 | 事件 ID |
|---|
| 进程创建(Sysmon) | 1 |
| 网络连接(Sysmon) | 3 |
| 镜像加载(Sysmon) | 7 |
| 文件创建(Sysmon) | 11 |
| 注册表事件(Sysmon) | 13 |
| PowerShell 脚本块 | 4104 |
| 进程创建 | 4688 |
| 计划任务创建 | 4698 |
| 服务创建 | 7045 |