关于 analyzing-lnk-file-and-jump-list-artifacts
用于分析 Windows LNK 快捷方式和跳转列表的数字取证技能,指导调查人员解析元数据,以重建文件访问、程序执行、移动介质使用及网络共享活动。
主要功能
- 01解析 LNK 快捷方式痕迹
- 02分析自动与自定义跳转列表
- 03提取路径、时间戳和主机标识
- 04与其他痕迹关联访问证据
适用场景
- 01调查已删除文件的访问情况
- 02识别移动介质使用活动
- 03确定网络共享访问时间线
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ mukul975/ anthropic-cybersecurity-skills --skill analyzing-lnk-file-and-jump-list-artifacts安装后在 Claude Code 中输入/analyzing-lnk-file-and-jump-list-artifacts确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
LICENSEassets/template.mdreferences/api-reference.mdstandards.mdworkflows.mdscripts/agent.pyprocess.py详细介绍
分析 LNK 文件和跳转列表痕迹
概述
Windows LNK(快捷方式)文件和跳转列表是重要的取证痕迹,可用于证明文件访问、程序执行和用户行为。当用户通过 Windows 资源管理器或打开/保存对话框打开文件时,系统会自动创建 LNK 文件,并存储目标文件的元数据,包括原始路径、时间戳、卷序列号、NetBIOS 名称以及主机系统的 MAC 地址。Windows 7 引入的跳转列表通过维护每个应用最近访问和频繁访问的文件列表,扩展了这一功能。即使目标文件已删除,这些痕迹仍会保留,因此对于确认用户在特定时间访问过特定文件极具价值。
适用场景
- 调查需要分析 LNK 文件和跳转列表痕迹的安全事件时
- 为此领域构建检测规则或威胁搜寻查询时
- SOC 分析人员需要此类分析的结构化流程时
- 验证针对相关攻击技术的安全监控覆盖情况时
前置条件
- 用于解析 LNK 文件的 LECmd(Eric Zimmerman)
- 用于解析跳转列表的 JLECmd(Eric Zimmerman)
- Python 3.8+,以及 pylnk3 或 LnkParse3 库
- Windows 系统的取证映像或分诊采集数据
- 用于分析 CSV 的 Timeline Explorer
LNK 文件位置
| 位置 | 说明 |
|---|---|
%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Recent\ | 最近访问的文件 |
%USERPROFILE%\Desktop\ | 用户创建的快捷方式 |
%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\ | 开始菜单快捷方式 |
%USERPROFILE%\AppData\Roaming\Microsoft\Office\Recent\ | Office 最近使用的文档 |
LNK 文件结构
Shell Link 标头(76 字节)
| 偏移量 | 大小 | 字段 |
|---|---|---|
| 0x00 | 4 | HeaderSize(始终为 0x0000004C) |
| 0x04 | 16 | LinkCLSID(始终为 00021401-0000-0000-C000-000000000046) |
| 0x14 | 4 | LinkFlags |
| 0x18 | 4 | FileAttributes |
| 0x1C | 8 | CreationTime(FILETIME) |
| 0x24 | 8 | AccessTime(FILETIME) |
| 0x2C | 8 | WriteTime(FILETIME) |
| 0x34 | 4 | 目标文件的 FileSize |
| 0x38 | 4 | IconIndex |
| 0x3C | 4 | ShowCommand |
| 0x40 | 2 | HotKey |
LNK 文件中的关键取证字段
- 目标文件时间戳:被引用文件的创建、访问和修改时间
- 卷信息:序列号、驱动器类型、卷标
- 网络共享信息:UNC 路径、共享名称
- 机器标识符:NetBIOS 名称、MAC 地址(来自 TrackerDataBlock)
- 分布式链接跟踪:机器 ID 和对象 GUID
使用 EZ Tools 进行分析
LECmd - LNK 文件解析器
# Parse all LNK files in Recent folder
LECmd.exe -d "C:\Evidence\Users\suspect\AppData\Roaming\Microsoft\Windows\Recent" --csv C:\Output --csvf lnk_analysis.csv
# Parse a single LNK file with full details
LECmd.exe -f "C:\Evidence\Users\suspect\Desktop\Confidential.docx.lnk" --json C:\Output
# Parse LNK files with additional detail levels
LECmd.exe -d "C:\Evidence\Users\suspect\AppData\Roaming\Microsoft\Windows\Recent" --csv C:\Output --csvf lnk_all.csv --all
JLECmd - 跳转列表解析器
# Parse Automatic Jump Lists
JLECmd.exe -d "C:\Evidence\Users\suspect\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations" --csv C:\Output --csvf jumplists_auto.csv
# Parse Custom Jump Lists
JLECmd.exe -d "C:\Evidence\Users\suspect\AppData\Roaming\Microsoft\Windows\Recent\CustomDestinations" --csv C:\Output --csvf jumplists_custom.csv
# Parse all jump lists with detailed output
JLECmd.exe -d "C:\Evidence\Users\suspect\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations" --csv C:\Output --csvf jumplists_auto.csv --ld
跳转列表结构
自动目标(automaticDestinations-ms)
这些是 OLE 复合文件(结构化存储),可通过文件名中的 AppID 哈希识别:
| AppID 哈希 | 应用程序 |
|---|---|
| 5f7b5f1e01b83767 | Windows 资源管理器 固定/频繁访问 |
| 1b4dd67f29cb1962 | Windows 资源管理器 最近访问 |
| 9b9cdc69c1c24e2b | 记事本 |
| a7bd71699cd38d1c | Notepad++ |
| 12dc1ea8e34b5a6 | Microsoft 画图 |
| 7e4dca80246863e3 | 控制面板 |
| 1cf97c38a5881255 | Microsoft Edge |
| f01b4d95cf55d32a | Windows 资源管理器 |
| 9d1f905ce5044aee | Microsoft Excel |
| a4a5324453625195 | Microsoft Word |
| d00655d2aa12ff6d | Microsoft PowerPoint |
| bc03160ee1a59fc1 | Outlook |
自定义目标(customDestinations-ms)
用户将项目固定到应用程序跳转列表时会创建这些文件。此类文件包含按顺序排列的 LNK 条目。
Python 分析脚本
import struct
import os
from datetime import datetime, timedelta
FILETIME_EPOCH = datetime(1601, 1, 1)
def filetime_to_datetime(filetime_bytes: bytes) -> datetime:
"""Convert Windows FILETIME (100-ns intervals since 1601) to datetime."""
ft = struct.unpack("<Q", filetime_bytes)[0]
if ft == 0:
return None
return FILETIME_EPOCH + timedelta(microseconds=ft // 10)
def parse_lnk_header(lnk_path: str) -> dict:
"""Parse the Shell Link header from an LNK file."""
with open(lnk_path, "rb") as f:
header = f.read(76)
header_size = struct.unpack("<I", header[0:4])[0]
if header_size != 0x4C:
return {"error": "Invalid LNK header"}
link_flags = struct.unpack("<I", header[0x14:0x18])[0]
file_attrs = struct.unpack("<I", header[0x18:0x1C])[0]
result = {
"header_size": header_size,
"link_flags": hex(link_flags),
"file_attributes": hex(file_attrs),
"creation_time": filetime_to_datetime(header[0x1C:0x24]),
"access_time": filetime_to_datetime(header[0x24:0x2C]),
"write_time": filetime_to_datetime(header[0x2C:0x34]),
"file_size": struct.unpack("<I", header[0x34:0x38])[0],
"has_target_id_list": bool(link_flags & 0x01),
"has_link_info": bool(link_flags & 0x02),
"has_name": bool(link_flags & 0x04),
"has_relative_path": bool(link_flags & 0x08),
"has_working_dir": bool(link_flags & 0x10),
"has_arguments": bool(link_flags & 0x20),
"has_icon_location": bool(link_flags & 0x40),
}
return result
调查用例
文件访问证据
- 解析“最近”文件夹中的 LNK 文件,以识别访问过的文档
- 与 MFT 时间戳和 USN 日志条目进行交叉比对
- 注意,即使目标文件已删除,LNK 文件仍会保留
可移动介质访问
- 引用 E:、F:、G: 盘符的 LNK 文件表示使用了可移动介质
- LNK 中的卷序列号可标识具体设备
- TrackerDataBlock 中的 MAC 地址可标识源计算机
网络共享活动
- 包含 UNC 路径(\server\share)的 LNK 文件表示访问了网络文件
- NetBIOS 名称可标识远程服务
- 时间戳可确定访问发生的时间
Windows 10 与 Windows 11 的差异
近期研究(IEEE 2025)表明,Windows 11 会生成不同的 LNK 和跳转列表痕迹:
- 某些文件类型自动生成的 LNK 文件更少
- 现代应用的跳转列表行为有所改变
- UWP/MSIX 应用可能不会生成传统跳转列表
- Windows 11 的快速访问取代了部分最近使用功能
参考资料
- Shell Link 二进制文件格式:https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-shllink/
- Magnet Forensics 的 LNK 分析:https://www.magnetforensics.com/blog/forensic-analysis-of-lnk-files/
- 2025 年跳转列表取证:https://www.cybertriage.com/blog/jump-list-forensics-2025/
- Eric Zimmerman 的 LECmd/JLECmd:https://ericzimmerman.github.io/
示例输出
$ LECmd.exe -d "C:\Evidence\Users\jsmith\AppData\Roaming\Microsoft\Windows\Recent" --csv /analysis/lnk_output
LECmd v1.11.0 - LNK File Parser
================================
Processing 47 LNK files...
--- LNK File: Q4_Report.xlsx.lnk ---
Source: C:\Evidence\Users\jsmith\Recent\Q4_Report.xlsx.lnk
Target Path: C:\Users\jsmith\Downloads\Q4_Report.xlsm
Target Created: 2024-01-15 14:33:45 UTC
Target Modified: 2024-01-15 14:33:45 UTC
Target Accessed: 2024-01-15 14:35:12 UTC
File Size: 251,904 bytes
Drive Type: Fixed (C:)
Volume Serial: A4E7-3F21
Machine ID: DESKTOP-J5M1TH
MAC Address: 48:2A:E3:5C:9B:01
--- LNK File: update_client.exe.lnk ---
Source: C:\Evidence\Users\jsmith\Recent\update_client.exe.lnk
Target Path: C:\ProgramData\Updates\update_client.exe
Target Created: 2024-01-15 14:34:02 UTC
Target Modified: 2024-01-15 14:34:02 UTC
Target Accessed: 2024-01-15 14:36:30 UTC
File Size: 1,258,496 bytes
Drive Type: Fixed (C:)
Volume Serial: A4E7-3F21
Machine ID: DESKTOP-J5M1TH
Working Dir: C:\ProgramData\Updates
Arguments: --silent --no-update-check
Run Window: Hidden
======================================================================
$ JLECmd.exe -d "C:\Evidence\Users\jsmith\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations" --csv /analysis/jumplist_output
JLECmd v1.5.0 - Jump List Parser
==================================
Processing 23 AutomaticDestinations files...
--- Application: Microsoft Excel (AppID: 12dc1ea8e34b5a6) ---
Entries: 15
Most Recent:
Entry 0: C:\Users\jsmith\Downloads\Q4_Report.xlsm (2024-01-15 14:35:12 UTC)
Entry 1: \\FILESERV01\Finance\Budget_2024.xlsx (2024-01-14 09:22:30 UTC)
Entry 2: C:\Users\jsmith\Documents\Expenses\Dec2023.xlsx (2024-01-10 16:45:00 UTC)
--- Application: Windows Explorer (AppID: f01b4d95cf55d32a) ---
Entries: 28
Most Recent:
Entry 0: C:\ProgramData\Updates\ (2024-01-15 14:36:25 UTC)
Entry 1: E:\Backup\ (2024-01-15 15:30:00 UTC)
Entry 2: \\FILESERV01\HR\Employees\ (2024-01-15 16:12:45 UTC)
--- Application: cmd.exe (AppID: 9b9cdc69c1c24e2b) ---
Entries: 5
Most Recent:
Entry 0: C:\Windows\System32\cmd.exe (2024-01-15 14:36:00 UTC)
Summary:
Total LNK files processed: 47
Total Jump List entries: 156
Suspicious artifacts: 3 (hidden window execution, USB drive access, network shares)
CSV exported to: /analysis/lnk_output/ and /analysis/jumplist_output/
评论
支持 Markdown