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

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

github.com/mukul975セキュリティ35.2k349 回インストール8 週間前に更新
リポジトリ

analyzing-lnk-file-and-jump-list-artifacts について

Windows の LNK ショートカットとジャンプリストを調べるデジタルフォレンジック向けスキルです。メタデータを解析し、ファイルアクセス、プログラム実行、リムーバブルメディアやネットワーク共有の利用を再構成します。

主な機能

  1. 01LNK ショートカット痕跡の解析
  2. 02自動およびカスタムジャンプリストの分析
  3. 03パス、タイムスタンプ、ホスト識別情報の抽出
  4. 04他の痕跡とのアクセス証拠の照合

活用シーン

  1. 01削除済みファイルへのアクセス調査
  2. 02リムーバブルメディア利用の特定
  3. 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 と一緒にインストールされる参考資料やスクリプト。

LICENSE
assets/
template.md
references/
api-reference.md
standards.md
workflows.md
scripts/
agent.py
process.py

詳細

LNK ファイルとジャンプリストのアーティファクトを分析する

概要

Windows の LNK(ショートカット)ファイルとジャンプリストは、ファイルへのアクセス、プログラムの実行、ユーザーの行動を示す重要なフォレンジックアーティファクトです。LNK ファイルは、ユーザーが Windows エクスプローラーまたは「開く/保存」ダイアログからファイルを開くと自動的に作成され、元のパス、タイムスタンプ、ボリュームシリアル番号、NetBIOS 名、ホストシステムの MAC アドレスなど、対象ファイルのメタデータを保存します。Windows 7 で導入されたジャンプリストは、アプリケーションごとに、最近アクセスしたファイルや頻繁にアクセスしたファイルのリストを保持することで、この機能を拡張します。これらのアーティファクトは対象ファイルの削除後も残るため、特定の時刻にユーザーが特定のファイルにアクセスしたことを立証するうえで非常に重要です。

使用する場面

  • LNK ファイルとジャンプリストのアーティファクトを分析する必要があるセキュリティインシデントを調査するとき
  • この分野の検出ルールや脅威ハンティングクエリを作成するとき
  • SOC アナリストがこの種の分析に関する体系的な手順を必要とするとき
  • 関連する攻撃手法について、セキュリティ監視のカバレッジを検証するとき

前提条件

  • LNK ファイルの解析用 LECmd(Eric Zimmerman)
  • ジャンプリストの解析用 JLECmd(Eric Zimmerman)
  • pylnk3 または LnkParse3 ライブラリを備えた Python 3.8+
  • 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 バイト)
オフセットサイズフィールド
0x004HeaderSize(常に 0x0000004C)
0x0416LinkCLSID(常に 00021401-0000-0000-C000-000000000046)
0x144LinkFlags
0x184FileAttributes
0x1C8CreationTime(FILETIME)
0x248AccessTime(FILETIME)
0x2C8WriteTime(FILETIME)
0x344対象の FileSize
0x384IconIndex
0x3C4ShowCommand
0x402HotKey
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 ハッシュアプリケーション
5f7b5f1e01b83767Windows エクスプローラーのピン留め/頻繁に使用
1b4dd67f29cb1962Windows エクスプローラーの最近使った項目
9b9cdc69c1c24e2bNotepad
a7bd71699cd38d1cNotepad++
12dc1ea8e34b5a6Microsoft Paint
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:
    """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

調査での活用例

ファイルアクセスの証拠
  1. 「最近使った項目」フォルダーの 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 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/

コメント