Die Oberfläche ist lokalisiert; Skill-Beschreibungen und -Dokumente werden per KI automatisch in Ihre Sprache übersetzt. Code, Befehle, Pfade und Fachbegriffe bleiben im Original, maßgeblich ist das Dokument des Autors.
Skills entdecken
Produktivität · SKILL.md

analyzing-lnk-file-and-jump-list-artifacts

analyzing-lnk-file-and-jump-list-artifacts

分析 Windows LNK 快捷方式文件和 Jump List 制品,使用 LECmd、JLECmd 以及对 Shell Link 二进制格式的手动解析,以建立文件访问、程序执行和用户活动的证据。

Independent GitHub snapshot · Automated classification · Original documentation governs

Skill-Dokumentation

GitHub

name: analyzing-lnk-file-and-jump-list-artifacts description: 分析 Windows LNK 快捷方式文件和 Jump List 制品,使用 LECmd、JLECmd 以及对 Shell Link 二进制格式的手动解析,以建立文件访问、程序执行和用户活动的证据。 domain: cybersecurity subdomain: digital-forensics tags: [lnk-files, jump-lists, lecmd, jlecmd, windows-forensics, shell-link, user-activity, file-access, program-execution, recent-files] version: "1.0" author: mahipal license: Apache-2.0

分析 LNK 文件和 Jump List 制品

概述

Windows LNK(快捷方式)文件和 Jump List 是关键的取证制品(forensic artifact),提供文件访问、程序执行和用户行为的证据。当用户通过 Windows 资源管理器或"打开/保存"对话框打开文件时,会自动创建 LNK 文件,其中存储了目标文件的元数据,包括原始路径、时间戳、卷序列号、NetBIOS 名称以及主机系统的 MAC 地址。Windows 7 引入的 Jump List 通过维护每个应用程序最近和频繁访问文件的列表来扩展这一功能。即使目标文件被删除,这些制品仍然存在,使其成为证明用户在特定时间访问特定文件的宝贵手段。

前置条件

  • LECmd(Eric Zimmerman)用于 LNK 文件解析
  • JLECmd(Eric Zimmerman)用于 Jump List 解析
  • Python 3.8+ 及 pylnk3 或 LnkParse3 库
  • 来自 Windows 系统的取证镜像或分诊(triage)收集
  • Timeline Explorer 用于 CSV 分析

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 字节)

偏移大小字段
0x004HeaderSize(始终为 0x0000004C)
0x0416LinkCLSID(始终为 00021401-0000-0000-C000-000000000046)
0x144LinkFlags
0x184FileAttributes
0x1C8CreationTime(FILETIME)
0x248AccessTime(FILETIME)
0x2C8WriteTime(FILETIME)
0x344目标文件大小
0x384IconIndex
0x3C4ShowCommand
0x402HotKey

LNK 文件中的关键取证字段

  • 目标文件时间戳:被引用文件的创建、访问、修改时间
  • 卷信息:序列号、驱动器类型、卷标
  • 网络共享信息:UNC 路径、共享名称
  • 机器标识符:NetBIOS 名称、MAC 地址(来自 TrackerDataBlock)
  • 分布式链接跟踪:机器 ID 和对象 GUID

使用 EZ Tools 分析

LECmd——LNK 文件解析器

# 解析 Recent 文件夹中的所有 LNK 文件
LECmd.exe -d "C:\Evidence\Users\suspect\AppData\Roaming\Microsoft\Windows\Recent" --csv C:\Output --csvf lnk_analysis.csv

# 解析单个 LNK 文件并输出完整详情
LECmd.exe -f "C:\Evidence\Users\suspect\Desktop\Confidential.docx.lnk" --json C:\Output

# 解析 LNK 文件并附加详细级别
LECmd.exe -d "C:\Evidence\Users\suspect\AppData\Roaming\Microsoft\Windows\Recent" --csv C:\Output --csvf lnk_all.csv --all

JLECmd——Jump List 解析器

# 解析自动 Jump List
JLECmd.exe -d "C:\Evidence\Users\suspect\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations" --csv C:\Output --csvf jumplists_auto.csv

# 解析自定义 Jump List
JLECmd.exe -d "C:\Evidence\Users\suspect\AppData\Roaming\Microsoft\Windows\Recent\CustomDestinations" --csv C:\Output --csvf jumplists_custom.csv

# 解析所有 Jump List 并输出详细信息
JLECmd.exe -d "C:\Evidence\Users\suspect\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations" --csv C:\Output --csvf jumplists_auto.csv --ld

Jump List 结构

自动目标(automaticDestinations-ms)

这些是 OLE 复合文件(结构化存储),由文件名中的 AppID 哈希标识:

AppID 哈希应用程序
5f7b5f1e01b83767Windows 资源管理器固定/频繁
1b4dd67f29cb1962Windows 资源管理器最近
9b9cdc69c1c24e2bNotepad
a7bd71699cd38d1cNotepad++
12dc1ea8e34b5a6Microsoft Paint
7e4dca80246863e3控制面板
1cf97c38a5881255Microsoft Edge
f01b4d95cf55d32aWindows 资源管理器
9d1f905ce5044aeeMicrosoft Excel
a4a5324453625195Microsoft Word
d00655d2aa12ff6dMicrosoft PowerPoint
bc03160ee1a59fc1Outlook

自定义目标(customDestinations-ms)

当用户将条目固定到应用程序 Jump List 时创建。这些文件包含连续的 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:
    """将 Windows FILETIME(自 1601 年起的 100 纳秒间隔)转换为 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:
    """解析 LNK 文件的 Shell Link 头部。"""
    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": "无效的 LNK 头部"}

    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

调查使用场景

文件访问证据

  1. 解析 Recent 文件夹中的 LNK 文件以识别访问的文档
  2. 与 MFT 时间戳和 USN Journal 条目交叉比对
  3. 注意:即使目标文件被删除,LNK 文件仍然存在

可移动媒体访问

  1. 引用驱动器盘符 E:、F:、G: 的 LNK 文件表明使用了可移动媒体
  2. LNK 中的卷序列号标识具体设备
  3. TrackerDataBlock 中的 MAC 地址标识源机器

网络共享活动

  1. 包含 UNC 路径(\server\share)的 LNK 文件表明有网络文件访问
  2. NetBIOS 名称标识远程服务器
  3. 时间戳确定访问发生的时间

Windows 10 与 Windows 11 的差异

最新研究(IEEE 2025)表明 Windows 11 产生不同的 LNK 和 Jump List 制品:

  • 某些文件类型自动生成的 LNK 文件减少
  • 现代应用的 Jump List 行为已修改
  • UWP/MSIX 应用可能不生成传统 Jump List
  • Windows 11 快速访问(Quick Access)取代了部分最近功能

参考资料

Gespeicherte Skills