Communitygithub.com

分析 LNK 檔案與跳躍清單成品

使用 LECmd 分析 Windows LNK 捷徑檔案與跳躍清單成品,支援取證調查與威脅狩獵。

分析 LNK 檔案與跳躍清單成品 是什麼?

此技能專注於 Windows LNK(捷徑)檔案與跳躍清單(Jump List)的取證分析。LNK 檔案會在使用者透過檔案總管或開啟/儲存對話框存取檔案時自動建立,並包含目標檔案的原始路徑、時間戳記、磁碟區序號、NetBIOS 名稱及主機 MAC 位址等中繼資料。自 Windows 7 起導入的跳躍清單則進一步按應用程式記錄最近與頻繁存取的檔案,這些成品即使原始檔案已被刪除仍會留存,對確認使用者於特定時間存取特定檔案極具價值。本技能詳細說明 LNK 與跳躍清單的結構、取證重點、LECmd 與 JLECmd 等 EZ Tools 的使用方法、Windows 10 與 Windows 11 的差異,並提供 Python 分析腳本與調查實例,適合 SOC 分析師、威脅獵人及數位鑑識人員使用。

相容平台~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 檔案與跳躍清單成品 是做什麼的?

概述

Windows LNK(捷徑)檔案與跳躍清單(Jump List)是關鍵的取證成品,能提供檔案存取、程式執行與使用者行為的證據。當使用者透過 Windows 檔案總管或開啟/儲存對話框開啟檔案時,系統會自動建立 LNK 檔案,其中儲存目標檔案的原始路徑、時間戳記、磁碟區序號、NetBIOS 名稱與主機 MAC 位址等中繼資料。跳躍清單自 Windows 7 起導入,可維護每個應用程式最近與頻繁存取的檔案清單。這些成品即使目標檔案已被刪除仍會留存,對於證明使用者在特定時間存取過特定檔案極具價值。

使用時機

  • 調查需要分析 LNK 檔案與跳躍清單成品的安全事件時
  • 建立針對此領域的偵測規則或威脅狩獵查詢時
  • SOC 分析師需要此類分析的結構化程序時
  • 驗證相關攻擊技術的安全監控覆蓋範圍時

先決條件

  • LECmd(Eric Zimmerman)用於 LNK 檔案解析
  • JLECmd(Eric Zimmerman)用於跳躍清單解析
  • Python 3.8+ 搭配 pylnk3 或 LnkParse3 函式庫
  • 來自 Windows 系統的鑑識映像或 triage 收集
  • 用於 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 位元組)

偏移量大小欄位
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 - 跳躍清單解析器

# 解析自動跳躍清單(Automatic Jump Lists)
JLECmd.exe -d "C:\Evidence\Users\suspect\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations" --csv C:\Output --csvf jumplists_auto.csv

# 解析自訂跳躍清單(Custom Jump Lists)
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

跳躍清單結構

自動目的地(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 奈秒間隔)轉換為 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 日誌條目交叉比對
  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 與跳躍清單成品有所不同:

  • 針對某些檔案類型自動產生的 LNK 檔案較少
  • 現代應用程式的跳躍清單行為有所修改
  • UWP/MSIX 應用程式可能不會產生傳統的跳躍清單
  • 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 - 跳躍清單解析器
==================================

正在處理 23 個自動目的地檔案...

--- 應用程式: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
  跳躍清單條目總數:         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,

相關技能