Communitygithub.com

分析 LNK 文件和 Jump List 痕迹

使用 LECmd 和 JLECmd 等工具分析 Windows LNK 快捷方式文件和 Jump List 痕迹,揭示文件访问、程序执行和用户行为证据。

分析 LNK 文件和 Jump List 痕迹 是什么?

这是一个专注于分析 Windows LNK(快捷方式)文件和 Jump List(跳转列表)痕迹的专业技能。该技能利用 LECmd(Eric Zimmerman 的工具)和 JLECmd 来解析这些关键的法证痕迹,揭示文件访问、程序执行和用户行为。LNK 文件在用户通过 Windows 资源管理器或打开/保存对话框打开文件时自动创建,存储目标文件的元数据,包括原始路径、时间戳、卷序列号、NetBIOS 名称和主机系统的 MAC 地址。Jump List 自 Windows 7 起引入,维护每个应用程序最近和常用文件的列表。这些痕迹即使在目标文件被删除后仍然存在,对于确定用户在特定时间访问了哪些文件至关重要。该技能涵盖 LNK 文件结构、使用 EZ Tools 和 Python 脚本进行分析、调查用例(文件访问、可移动介质、网络共享),以及 Windows 10 和 11 之间的差异。支持平台包括 Windows 法证分析环境和相关工具(LECmd、JLECmd、Python)。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/analyzing-lnk-file-and-jump-list-artifacts

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

分析 LNK 文件和 Jump List 痕迹 是做什么的?

概述

Windows LNK(快捷方式)文件和 Jump List(跳转列表)是关键的计算机取证痕迹,能够提供文件访问、程序执行和用户行为的证据。当用户通过 Windows 资源管理器或打开/保存对话框打开文件时,LNK 文件会自动创建,并存储目标文件的元数据,包括其原始路径、时间戳、卷序列号、NetBIOS 名称和主机系统的 MAC 地址。Jump List 自 Windows 7 起引入,通过维护每个应用程序最近和常用访问的文件列表来扩展此功能。这些痕迹即使在目标文件被删除后仍然存在,这使得它们在确定用户在特定时间访问了特定文件方面极具价值。

何时使用

  • 在调查涉及分析 lnk 文件和 jump list 痕迹的安全事件时
  • 在为此领域构建检测规则或威胁狩猎查询时
  • 当 SOC 分析师需要此分析类型的结构化流程时
  • 在验证相关攻击技术的安全监控覆盖范围时

先决条件

  • LECmd(Eric Zimmerman)用于解析 LNK 文件
  • JLECmd(Eric Zimmerman)用于解析 Jump List
  • Python 3.8+,带有 pylnk3 或 LnkParse3 库
  • 来自 Windows 系统的取证镜像或快速收集数据
  • 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 解析器

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

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

# 解析所有跳转列表并显示详细输出
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 资源管理器最近使用
9b9cdc69c1c24e2b记事本
a7bd71699cd38d1cNotepad++
12dc1ea8e34b5a6Microsoft 画图
7e4dca80246863e3控制面板
1cf97c38a5881255Microsoft Edge
f01b4d95cf55d32aWindows 资源管理器
9d1f905ce5044aeeMicrosoft Excel
a4a5324453625195Microsoft Word
d00655d2aa12ff6dMicrosoft PowerPoint
bc03160ee1a59fc1Outlook

自定义跳转列表(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:
    """将 Windows FILETIME(自 1601 年以来的 100 纳秒间隔)转换为日期时间。"""
    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 日志条目交叉引用
  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 快速访问取代了部分最近使用的功能

参考

示例输出

$ LECmd.exe -d "C:\Evidence\Users\jsmith\AppData\Roaming\Microsoft\Windows\Recent" --csv /analysis/lnk_output

LECmd v1.11.0 - LNK 文件解析器
================================

正在处理 47 个 LNK 文件...

--- LNK 文件: Q4_Report.xlsx.lnk ---
  源文件:           C:\Evidence\Users\jsmith\Recent\Q4_Report.xlsx.lnk
  目标路径:      C:\Users\jsmith\Downloads\Q4_Report.xlsm
  目标创建时间:   2024-01-15 14:33:45 UTC
  目标修改时间:  2024-01-15 14:33:45 UTC
  目标访问时间:  2024-01-15 14:35:12 UTC
  文件大小:        251,904 字节
  驱动器类型:       本地 (C:)
  卷序列号:    A4E7-3F21
  机器 ID:       DESKTOP-J5M1TH
  MAC 地址:      48:2A:E3:5C:9B:01

--- LNK 文件: update_client.exe.lnk ---
  源文件:           C:\Evidence\Users\jsmith\Recent\update_client.exe.lnk
  目标路径:      C:\ProgramData\Updates\update_client.exe
  目标创建时间:   2024-01-15 14:34:02 UTC
  目标修改时间:  2024-01-15 14:34:02 UTC
  目标访问时间:  2024-01-15 14:36:30 UTC
  文件大小:        1,258,496 字节
  驱动器类型:       本地 (C:)
  卷序列号:    A4E7-3F21
  机器 ID:       DESKTOP-J5M1TH
  工作目录:      C:\ProgramData\Updates
  参数:        --silent --no-update-check
  运行窗口:       隐藏

======================================================================

$ JLECmd.exe -d "C:\Evidence\Users\jsmith\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations" --csv /analysis/jumplist_output

JLECmd v1.5.0 - Jump List 解析器
==================================

正在处理 23 个 AutomaticDestinations 文件...

--- 应用程序: Microsoft Excel (AppID: 12dc1ea8e34b5a6) ---
  条目数: 15
  最近使用:
    条目 0:  C:\Users\jsmith\Downloads\Q4_Report.xlsm         (2024-01-15 14:35:12 UTC)
    条目 1:  \\FILESERV01\Finance\Budget_2024.xlsx             (2024-01-14 09:22:30 UTC)
    条目 2:  C:\Users\jsmith\Documents\Expenses\Dec2023.xlsx   (2024-01-10 16:45:00 UTC)

--- 应用程序: Windows 资源管理器 (AppID: f01b4d95cf55d32a) ---
  条目数: 28
  最近使用:
    条目 0:  C:\ProgramData\Updates\                           (2024-01-15 14:36:25 UTC)
    条目 1:  E:\Backup\                                        (2024-01-15 15:30:00 UTC)
    条目 2:  \\FILESERV01\HR\Employees\                        (2024-01-15 16:12:45 UTC)

--- 应用程序: cmd.exe (AppID: 9b9cdc69c1c24e2b) ---
  条目数: 5
  最近使用:
    条目 0:  C:\Windows\System32\cmd.exe                       (2024-01-15 14:36:00 UTC)

总结:
  处理的 LNK 文件总数:    47
  Jump List 条目总数:       156
  可疑痕迹:          3(隐藏窗口执行、USB 驱动器访问、网络共享)
  CSV 导出到:               /analysis/lnk_output/ 和 /analysis/jumplist_output/

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

abusing-dpapi-for-credential-access

Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket

abusing-shadow-credentials-for-privesc

Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target

achieving-cmmc-level-2-compliance

>-

acquiring-disk-image-with-dd-and-dcfldd

Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident response, or producing a verified copy for legal or law-enforcement proceedings before any destructive analysis.

analyzing-active-directory-acl-abuse

Detect dangerous ACL misconfigurations in Active Directory using ldap3

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically triage a suspicious APK without executing it or to build mobile malware detection rules.

analyzing-api-gateway-access-logs

Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect

analyzing-apt-group-with-mitre-navigator

Query ATT&CK data with attackcti, mitreattack-python, and stix2, then build MITRE ATT&CK Navigator layers and multi-layer heatmap overlays mapping one or more APT groups

analyzing-azure-activity-logs-for-threats

Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query

analyzing-bootkit-and-rootkit-samples

Analyzes bootkit and advanced rootkit malware infecting the Master

analyzing-browser-forensics-with-hindsight

Parse Chromium-based browser databases with Hindsight to extract and correlate browsing history, downloads, cookies, cached content, autofill data, saved passwords, and extensions from Chrome, Edge, Brave, Opera, and Vivaldi into a unified timeline (XLSX, JSON, or SQLite output). Use during incident response, insider-threat investigations, or criminal cases when you need to reconstruct a user

analyzing-campaign-attribution-evidence

Systematically evaluate cyber-campaign evidence to attribute an operation to a threat actor, using the Diamond Model and Analysis of Competing Hypotheses (ACH) to weigh infrastructure overlaps, TTP consistency, malware code similarity, and timing/language artifacts into confidence-weighted attribution assessments. Use when an incident investigation needs a defensible attribution confidence level.

analyzing-certificate-transparency-for-phishing

Monitor Certificate Transparency logs using crt.sh and Certstream to

analyzing-cloud-storage-access-patterns

Detect abnormal access in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics for after-hours bulk downloads, new-IP access, and API-call spikes (e.g. GetObject) via statistical baselines and time-series anomaly detection. Use when investigating suspected cloud data exfiltration or building related detection rules.

analyzing-cobalt-strike-beacon-configuration

Extract and analyze Cobalt Strike beacon configuration from PE files

analyzing-cobaltstrike-malleable-c2-profiles

Parse and analyze Cobalt Strike Malleable C2 profiles with dissect.cobaltstrike (profiles and beacon-payload configs) and pyMalleableC2 (AST parsing) to extract HTTP/DNS transforms, URIs, headers, sleep/jitter, and injection behavior, then generate network detection signatures. Use when reverse-engineering a captured malleable profile or building detections against Cobalt Strike Beacon traffic.

analyzing-command-and-control-communication

Analyzes malware C2 communication over HTTP, HTTPS, DNS, and custom

analyzing-cyber-kill-chain

Analyzes intrusion activity against the Lockheed Martin Cyber Kill Chain

analyzing-disk-image-with-autopsy

Perform comprehensive forensic analysis of raw (dd), E01, or AFF disk images with Autopsy and The Sleuth Kit, recovering deleted files, examining metadata and embedded artifacts, keyword searching, and building investigation timelines with visual reports. Use for structured analysis of a forensic disk image or when stakeholders need visual reports from evidence.

analyzing-dns-logs-for-exfiltration

Analyzes DNS query logs to detect data exfiltration via DNS tunneling,

相关技能