Communitygithub.com

Windows Shellbag 아티팩트 분석

SBECmd를 사용하여 Windows Shellbag(BagMRU) 레지스트리 아티팩트를 분석하고, 폴더 접근 증거를 수집합니다.

Windows Shellbag 아티팩트 분석란 무엇인가요?

이 스킬은 Windows Shellbag(BagMRU) 레지스트리 아티팩트를 분석하는 방법을 제공합니다. Shellbag은 Windows 탐색기에서 사용자가 폴더와 상호작용한 방식을 추적하는 레지스트리 아티팩트로, 폴더 보기 설정(아이콘 크기, 창 위치, 정렬 순서 등)을 저장합니다. 법의학적 관점에서 Shellbag은 시스템에서 더 이상 존재하지 않는 폴더까지 포함하여 폴더 접근에 대한 명확한 증거를 제공합니다. 이 스킬은 SBECmd 명령줄 도구와 ShellBags Explorer GUI 도구를 사용하여 분석하는 방법, 다양한 포렌식 시나리오(USB 장치 탐색 증명, 네트워크 공유 접근 탐지, 삭제된 폴더 식별)를 다룹니다. 주 지원 플랫폼은 Windows 환경이며, EZ Tools 제품군을 기반으로 합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/analyzing-windows-shellbag-artifacts

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Windows Shellbag 아티팩트 분석은(는) 무엇을 하나요?

개요

Shellbag은 Windows 탐색기를 통해 사용자가 폴더와 상호작용하는 방식을 추적하는 Windows 레지스트리 아티팩트로, 아이콘 크기, 창 위치, 정렬 순서, 보기 모드 등의 보기 설정을 저장합니다. 법의학적 관점에서 Shellbag은 시스템에 더 이상 존재하지 않는 폴더까지 포함하여 폴더 접근에 대한 명확한 증거를 제공합니다. 사용자가 Windows 탐색기, 열기/저장 대화 상자 또는 제어판을 통해 폴더를 탐색하면 사용자 레지스트리 하이브에 Shellbag 항목이 생성되거나 업데이트됩니다. 이러한 항목은 폴더 삭제, 드라이브 연결 해제, 사용자 프로필 재설정 이후에도 유지되므로, 로컬 드라이브, USB 장치, 네트워크 공유 또는 zip 아카이브의 특정 디렉터리에 사용자가 탐색했음을 입증하는 데 매우 유용합니다.

사용 시기

  • Windows shellbag 아티팩트 분석이 필요한 보안 사고를 조사할 때
  • 이 도메인에 대한 탐지 규칙 또는 위협 헌팅 쿼리를 구축할 때
  • SOC 분석가가 이 분석 유형에 대한 체계적인 절차를 필요로 할 때
  • 관련 공격 기술에 대한 보안 모니터링 범위를 검증할 때

사전 요구 사항

  • 디지털 포렌식 개념 및 도구에 대한 친숙함
  • 안전한 실행을 위한 테스트 또는 실습 환경 접근
  • 필요한 종속성이 설치된 Python 3.8+
  • 모든 테스트 활동에 대한 적절한 권한

레지스트리 위치

Windows 7/8/10/11

하이브키 경로저장 내용
NTUSER.DATSoftware\Microsoft\Windows\Shell\BagMRU폴더 계층 트리
NTUSER.DATSoftware\Microsoft\Windows\Shell\Bags폴더별 보기 설정
UsrClass.datLocal Settings\Software\Microsoft\Windows\Shell\BagMRU바탕 화면/탐색기 셸
UsrClass.datLocal Settings\Software\Microsoft\Windows\Shell\Bags추가 보기 설정

BagMRU 구조

BagMRU 키에는 디렉터리 구조를 나타내는 번호가 매겨진 하위 키의 계층적 트리가 포함됩니다. 각 하위 키 값에는 폴더 ID를 인코딩하는 셸 항목(SHITEMID) 바이너리 BLOB이 포함됩니다.

  • 루트(BagMRU): 바탕 화면 네임스페이스 루트
  • BagMRU\0: 일반적으로 "내 컴퓨터"
  • BagMRU\0\0: 첫 번째 드라이브(예: C:)
  • BagMRU\0\0\0: C:의 첫 번째 하위 폴더

각 셸 항목에는 다음이 포함됩니다.

  • 항목 유형(폴더, 드라이브, 네트워크, zip, 제어판)
  • 짧은 이름(8.3 형식)
  • 긴 이름(유니코드)
  • 생성/수정 타임스탬프
  • NTFS 폴더용 MFT 항목/시퀀스

EZ 도구를 사용한 분석

SBECmd(명령줄)

# 레지스트리 하이브 디렉터리에서 shellbag 파싱
SBECmd.exe -d "C:\Evidence\Registry" --csv C:\Output --csvf shellbags.csv

# 라이브 시스템에서 파싱(관리자 권한 필요)
SBECmd.exe --live --csv C:\Output --csvf live_shellbags.csv

# 주요 출력 열:
# AbsolutePath - 재구성된 전체 경로
# CreatedOn - 폴더를 처음 탐색한 시간
# ModifiedOn - 보기 설정이 마지막으로 변경된 시간
# AccessedOn - 마지막 접근 타임스탬프
# ShellType - 셸 항목 유형(디렉터리, 드라이브, 네트워크 등)
# Value - 원시 셸 항목 데이터

ShellBags Explorer(GUI)

# 대화형 분석을 위한 GUI 도구 실행
ShellBagsExplorer.exe

# 레지스트리 하이브 로드: 파일 > 하이브 로드
# 폴더 계층을 보려면 트리 구조 탐색
# 자세한 셸 항목 속성을 보려면 항목을 마우스 오른쪽 버튼으로 클릭

포렌식 조사 시나리오

USB 장치 탐색 증명

Shellbag 경로: 내 컴퓨터\E:\Confidential\Project_Files
ShellType: 디렉터리(이동식 볼륨)
CreatedOn: 2025-03-15 09:30:00 UTC

이것은 USB 드라이브가 더 이상 연결되어 있지 않더라도 사용자가
Windows 탐색기를 통해 E:\Confidential\Project_Files로
이동했음을 증명합니다. 드라이브 문자 E: 및 디렉터리 타임스탬프는
USBSTOR 및 MountPoints2 레지스트리 항목과 상호 연관될 수 있습니다.

네트워크 공유 접근 탐지

Shellbag 경로: \\FileServer01\Finance\Q4_Reports
ShellType: 네트워크 위치
AccessedOn: 2025-02-20 14:15:00 UTC

이것은 공유가 해제되었거나 접근 권한이 철회된 경우에도
사용자가 네트워크 공유를 탐색했음을 증명합니다.

삭제된 폴더 인식 확인

Shellbag 경로: C:\Users\suspect\Documents\Exfiltration_Staging
ShellType: 디렉터리
CreatedOn: 2025-01-10 08:00:00 UTC

C:\Users\suspect\Documents\Exfiltration_Staging이
더 이상 존재하지 않지만, Shellbag 항목은 사용자가
이 폴더를 만들고 탐색했음을 증명합니다.

제한 사항

  • Shellbag은 개별 파일 접근이 아닌 폴더 수준 상호 작용만 기록합니다.
  • Windows 탐색기 셸 및 열기/저장 대화 상자를 통해서만 생성됩니다.
  • 명령줄 접근(cmd, PowerShell)은 Shellbag 항목을 생성하지 않습니다.
  • API를 통한 프로그래밍 방식 파일 접근은 Shellbag 항목을 생성하지 않습니다.
  • 타임스탬프는 폴더 접근이 아닌 보기 설정 변경을 반영할 수 있습니다.
  • Windows는 탐색기 종료 중에 Shellbag 항목을 일괄 업데이트할 수 있습니다.

참고 자료

예제 출력

$ SBECmd.exe -d "C:\Evidence\Users\jsmith" --csv /analysis/shellbag_output

SBECmd v2.1.0 - ShellBags Explorer (명령줄)
====================================================
사용자 jsmith에 대한 하이브 처리 중:
  NTUSER.DAT:  C:\Evidence\Users\jsmith\NTUSER.DAT
  UsrClass.dat: C:\Evidence\Users\jsmith\AppData\Local\Microsoft\Windows\UsrClass.dat

[+] NTUSER.DAT shellbag 항목:   456
[+] UsrClass.dat shellbag 항목: 1,234
[+] 총 shellbag 항목:           1,690

--- 폴더 접근 타임라인 (사고 기간) ---
마지막 접근(UTC)        | 폴더 경로                                              | 유형        | 접근 횟수
------------------------|---------------------------------------------------------|-------------|-------------
2024-01-15 14:34:05     | C:\Users\jsmith\Downloads                            | 파일 시스템 | 45
2024-01-15 14:36:25     | C:\ProgramData\Updates                                 | 파일 시스템 | 3
2024-01-15 15:05:00     | \\FILESERV01\Finance                                    | 네트워크    | 2
2024-01-15 15:12:30     | \\FILESERV01\Finance\Q4_Reports                       | 네트워크    | 1
2024-01-15 15:30:00     | E:\                                                     | 이동식      | 4
2024-01-15 15:30:45     | E:\Backup                                               | 이동식      | 3
2024-01-15 15:31:20     | E:\Backup\Corporate_Data                                | 이동식      | 2
2024-01-15 16:12:45     | \\FILESERV01\HR\Employees                              | 네트워크    | 1
2024-01-15 16:15:00     | \\FILESERV01\HR\Employees\Records_2024                 | 네트워크    | 1
2024-01-16 02:35:00     | C:\Windows\Temp                                         | 파일 시스템 | 5
2024-01-17 02:44:00     | C:\ProgramData\svc                                     | 파일 시스템 | 2
2024-01-18 01:10:00     | C:\Users\jsmith\AppData\Local\Temp                   | 파일 시스템 | 8

--- 네트워크 공유 접근 ---
  \\FILESERV01\Finance             최초: 2023-09-10  마지막: 2024-01-15
  \\FILESERV01\Finance\Q4_Reports  최초: 2024-01-15  마지막: 2024-01-15  (신규)
  \\FILESERV01\HR\Employees        최초: 2024-01-15  마지막: 2024-01-15  (신규)
  \\DC01\SYSVOL                    최초: 2023-03-15  마지막: 2024-01-16  (비정상 접근 시간)

--- 이동식 장치 접근 ---
  E:\ (USB 드라이브)
    볼륨 이름:    BACKUP_DRIVE
    최초 접근: 2024-01-15 15:30:00 UTC
    마지막 접근:  2024-01-15 15:45:22 UTC
    탐색된 폴더: 3개 (E:\, E:\Backup, E:\Backup\Corporate_Data)

--- 삭제되었거나 더 이상 존재하지 않는 경로 ---
  C:\ProgramData\Updates\                (폴더 삭제됨, shellbag 유지)
  C:\ProgramData\svc\                    (폴더 삭제됨, shellbag 유지)
  C:\Windows\Temp\tools\                 (폴더 삭제됨, shellbag 유지)

요약:
  접근된 고유 폴더 총 수:  1,690
  접근된 네트워크 공유:     4개 (사고 기간 중 새로 접근된 2개)
  이동식 미디어:           1 USB 장치 (데이터 스테이징 의심)
  삭제된 폴더 증거:        3개 경로 (안티포렌식 지표)
  CSV 내보내기 대상:       /analysis/shellbag_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,

관련 스킬