Communitygithub.com

peepdf를 사용한 악성 PDF 분석

peepdf, pdfid, pdf-parser를 사용하여 악성 PDF 문서의 정적 분석을 수행합니다.

peepdf를 사용한 악성 PDF 분석란 무엇인가요?

이 스킬은 peepdf, pdfid, pdf-parser와 같은 전문 도구를 사용하여 악성 PDF 문서를 정적 분석하는 방법을 설명합니다. 피싱 이메일에서 발견된 의심스러운 PDF 첨부 파일을 분류하거나, 익스플로잇 기반 문서의 악성코드를 분석할 때 유용합니다. pdfid로 빠른 사전 검사를 수행한 후 peepdf의 대화형 모드에서 객체 구조를 탐색하며 임베디드 자바스크립트, 셸코드, 또는 실행 파일을 추출하고 난독화를 해제하는 워크플로우를 제공합니다. VirusTotal과의 연동을 통해 파일 해시를 교차 검증하고 최종적으로 URL, 도메인, 해시, 셸코드 시그니처 등 침해 지표(IOC)를 생성합니다. 이 스킬은 Python 3.8 이상 환경에서 peepdf-3 패키지와 Didier Stevens 도구 모음을 필요로 하며, 격리된 분석 환경(VM 또는 샌드박스)에서 실행하는 것이 권장됩니다.

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

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

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

문서

peepdf를 사용한 악성 PDF 분석은(는) 무엇을 하나요?

사용 시점

  • 피싱 이메일에서 의심스러운 PDF 첨부 파일을 분류할 때
  • PDF 기반 익스플로잇 문서의 악성코드를 분석할 때
  • PDF에서 임베디드 자바스크립트, 셸코드 또는 실행 파일을 추출해야 할 때
  • 무기화된 문서 아티팩트의 법의학적 조사가 필요할 때
  • PDF 기반 위협에 대한 탐지 시그니처를 구축할 때

전제 조건

  • Python 3.8+ 및 peepdf-3 설치 (pip install peepdf-3)
  • Didier Stevens 도구 모음의 pdfid.py 및 pdf-parser.py
  • 격리된 분석 환경 (VM 또는 샌드박스)
  • 선택 사항: peepdf 내 자바스크립트 에뮬레이션을 위한 PyV8
  • 선택 사항: 셸코드 분석을 위한 Pylibemu

워크플로우

  1. pdfid로 사전 검사: 의심스러운 키워드(/JS, /JavaScript, /OpenAction, /Launch, /EmbeddedFile)를 PDF에서 스캔합니다.
  2. 대화형 분석: peepdf 대화형 모드에서 PDF를 열어 객체 구조를 탐색합니다.
  3. 의심스러운 객체 식별: 자바스크립트, 스트림 또는 인코딩된 데이터가 포함된 객체를 찾습니다.
  4. 콘텐츠 추출: 의심스러운 스트림을 덤프하고 필터(FlateDecode, ASCIIHexDecode)를 디코딩합니다.
  5. 자바스크립트 난독화 해제: 추출된 JS를 분석하여 셸코드, 힙 스프레이 또는 익스플로잇 코드를 찾습니다.
  6. VirusTotal 확인: peepdf vtcheck를 사용하여 파일 해시를 AV 탐지 결과와 교차 참조합니다.
  7. IOC 생성: URL, 도메인, 해시 및 셸코드 시그니처를 추출합니다.

주요 개념

개념설명
/OpenActionPDF가 열릴 때 자동으로 실행되는 액션
/JavaScript /JSPDF 객체에 임베디드된 자바스크립트 코드
/Launch외부 애플리케이션을 실행하는 액션
/EmbeddedFilePDF 구조 내에 포함된 파일
FlateDecode콘텐츠를 숨기는 데 사용되는 zlib 압축 필터
Object Streams압축된 스트림에 저장된 PDF 객체

도구 및 시스템

도구목적
peepdf / peepdf-3JS 에뮬레이션을 지원하는 대화형 PDF 분석 도구
pdfid.py의심스러운 키워드에 대한 빠른 사전 검사
pdf-parser.py심층적인 객체 수준 PDF 파싱
VirusTotal해시 조회 및 AV 탐지 교차 참조
CyberChef추출된 페이로드 디코딩 및 변환

출력 형식

분석 보고서: PDF-MAL-[날짜]-[일련번호]
파일: [파일명.pdf]
SHA-256: [해시]
의심스러운 키워드: [/JS, /OpenAction 등]
자바스크립트가 있는 객체: [객체 ID]
추출된 URL: [목록]
셸코드 탐지: [예/아니오]
포함된 파일: [개수 및 유형]
VirusTotal 탐지: [X/Y 엔진]
위험 수준: [심각/높음/중간/낮음]

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,

관련 스킬