LNK 파일 및 점프 목록 아티팩트 분석은(는) 무엇을 하나요?
개요
Windows LNK(바로 가기) 파일과 점프 목록은 파일 접근, 프로그램 실행, 사용자 행동에 대한 증거를 제공하는 중요한 포렌식 아티팩트입니다. LNK 파일은 사용자가 Windows 탐색기나 열기/저장 대화 상자를 통해 파일을 열 때 자동으로 생성되며, 대상 파일의 원래 경로, 타임스탬프, 볼륨 일련 번호, NetBIOS 이름, 호스트 시스템의 MAC 주소 등 메타데이터를 저장합니다. 점프 목록은 Windows 7부터 도입되어 각 애플리케이션별로 최근 및 자주 접근한 파일 목록을 유지합니다. 이러한 아티팩트는 대상 파일이 삭제된 후에도 남아 있어 특정 시간에 특정 파일에 접근했음을 증명하는 데 매우 유용합니다.
사용 시기
- LNK 파일 및 점프 목록 아티팩트 분석이 필요한 보안 사고를 조사할 때
- 이 도메인에 대한 탐지 규칙 또는 위협 헌팅 쿼리를 구축할 때
- SOC 분석가가 이 분석 유형에 대한 체계적인 절차가 필요할 때
- 관련 공격 기술에 대한 보안 모니터링 범위를 검증할 때
사전 요구 사항
- LECmd (Eric Zimmerman) - LNK 파일 파싱
- 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 파일 구조
셸 링크 헤더 (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 | 대상 파일 크기 |
| 0x38 | 4 | IconIndex |
| 0x3C | 4 | ShowCommand |
| 0x40 | 2 | HotKey |
LNK 파일의 주요 포렌식 필드
- 대상 파일 타임스탬프: 참조된 파일의 생성, 접근, 수정 시간
- 볼륨 정보: 일련 번호, 드라이브 유형, 볼륨 레이블
- 네트워크 공유 정보: UNC 경로, 공유 이름
- 머신 식별자: NetBIOS 이름, MAC 주소 (TrackerDataBlock에서)
- 분산 링크 추적: 머신 ID 및 개체 GUID
EZ 도구를 이용한 분석
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 - 점프 목록 파서
# 자동 점프 목록 파싱
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
점프 목록 구조
자동 대상 (automaticDestinations-ms)
파일 이름에 AppID 해시로 식별되는 OLE 복합 파일(구조적 저장소)입니다:
| 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:
"""Windows FILETIME(1601년 이후 100ns 간격)을 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 파일에서 셸 링크 헤더를 파싱합니다."""
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
조사 사용 사례
파일 접근 증거
- Recent 폴더에서 LNK 파일을 파싱하여 접근한 문서 식별
- MFT 타임스탬프 및 USN 저널 항목과 상호 참조
- LNK 파일은 대상 파일이 삭제된 후에도 남아 있음에 유의
이동식 미디어 접근
- 드라이브 문자 E:, F:, G:를 참조하는 LNK 파일은 이동식 미디어 사용을 나타냄
- LNK의 볼륨 일련 번호로 특정 장치 식별
- TrackerDataBlock의 MAC 주소로 소스 머신 식별
네트워크 공유 활동
- UNC 경로(\서버\공유)가 있는 LNK 파일은 네트워크 파일 접근을 나타냄
- NetBIOS 이름으로 원격 서버 식별
- 타임스탬프로 접근 시점 확인
Windows 10과 Windows 11의 차이점
최근 연구(IEEE 2025)에 따르면 Windows 11은 다음과 같은 차이점을 보입니다:
- 특정 파일 형식에 대해 더 적은 자동 LNK 파일 생성
- 최신 애플리케이션에 대한 수정된 점프 목록 동작
- UWP/MSIX 애플리케이션은 기존 점프 목록을 생성하지 않을 수 있음
- Windows 11 빠른 실행이 일부 Recent 기능을 대체
참고 자료
- 셸 링크 바이너리 파일 형식: 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 파일 파서
================================
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개의 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
총 점프 목록 항목: 156
의심스러운 아티팩트: 3 (숨김 창 실행, USB 드라이브 접근, 네트워크 공유)
CSV 출력 위치: /analysis/lnk_output/ 및 /analysis/jumplist_output/