Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
EhTrace — ATrace는 Windows에서 바이너리의 실행을 추적하는 도구입니다. | Kitploit
도구/GitHubGitHub/k2/ehtrace
Dynamic Analysis (Sandboxing)Code AnalysisExploitationReverse EngineeringDebuggersFuzzingBinary Analysis
GitHubk2/ehtrace

EhTrace

ATrace는 Windows에서 바이너리의 실행을 추적하는 도구입니다.

저장소 보기
243509개월 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

EhTrace

LOGO

EhTrace ("에이트레이스"로 발음)는 Windows용 고성능 바이너리 추적 및 계측 프레임워크입니다. 소스 코드, 바이너리 수정, 또는 전통적인 디버깅 없이 Windows 실행 파일의 심층 런타임 분석을 가능하게 합니다.

개요

EhTrace는 Windows Vectored Exception Handling(VEH)과 블록 스테핑 기법을 활용하여 최소한의 오버헤드로 포괄적인 실행 추적을 제공합니다. 전통적인 디버깅 또는 계측 도구와 달리 EhTrace는 완전히 프로세스 내에서 작동하며 대상 바이너리에 패치가 필요하지 않습니다.

주요 기능

  • 바이너리 수정 제로: 대상 바이너리를 변경하지 않고 실행 추적
  • 고성능: 단일 스테핑 대신 블록 스테핑으로 초당 약 4,300만 개의 이벤트 처리
  • 완전한 코드 커버리지: 자동 기본 블록 감지 및 추적
  • 레지스터 상태 모니터링: 실행 중 레지스터 상태 캡처 및 분석
  • 디버그 모드 불필요: CPU 디버그/추적 MSR 기능 활성화 없이 작동
  • 프로세스 내 작동: 전통적인 디버거에 비해 컨텍스트 전환 오버헤드 최소화
  • 다양한 계측 모드: 다양한 추적 및 분석 시나리오 지원

핵심 역량

  • 실행 흐름 분석: 프로그램 실행 경로 및 제어 흐름 추적
  • 코드 커버리지 매핑: 포괄적인 코드 커버리지 보고서 생성
  • RoP 방어: 호출/반환 균형을 통한 Return-Oriented Programming 공격 탐지 및 차단
  • 키 에스크로: 암호화 키 가로채기 및 에스크로 기능
  • 퍼징 통합: AFL 호환 퍼징 계측(AWinAFL)
  • 심볼 해석: DIA2를 통한 자동 심볼 로딩 및 해석

아키텍처

root@kitploit:~
flowchart TB
    subgraph Target["🎯 대상 프로세스"]
        direction TB
        APP[애플리케이션 코드]
        VEH[Vectored Exception Handler]
        style APP fill:#e1f5ff,stroke:#01579b,stroke-width:3px,color:#000
        style VEH fill:#fff3e0,stroke:#e65100,stroke-width:3px,color:#000
    end
    
    subgraph EhTrace["⚡ EhTrace 엔진"]
        direction TB
        BLOCK[블록 스테퍼]
        DISASM[Capstone 디스어셈블러]
        FIGHTERS[BlockFighters]
        CTX[컨텍스트 관리자]
        style BLOCK fill:#f3e5f5,stroke:#4a148c,stroke-width:3px,color:#000
        style DISASM fill:#e8f5e9,stroke:#1b5e20,stroke-width:3px,color:#000
        style FIGHTERS fill:#ffebee,stroke:#b71c1c,stroke-width:3px,color:#000
        style CTX fill:#e0f2f1,stroke:#004d40,stroke-width:3px,color:#000
    end
    
    subgraph Output["📊 분석 출력"]
        direction TB
        SHMEM[공유 메모리 로그]
        GRAPHS[시각적 그래프]
        REPORTS[커버리지 보고서]
        style SHMEM fill:#fce4ec,stroke:#880e4f,stroke-width:3px,color:#000
        style GRAPHS fill:#f1f8e9,stroke:#33691e,stroke-width:3px,color:#000
        style REPORTS fill:#fff8e1,stroke:#f57f17,stroke-width:3px,color:#000
    end
    
    APP -->|예외| VEH
    VEH -->|단일 스텝| BLOCK
    BLOCK -->|명령어| DISASM
    DISASM -->|분석| FIGHTERS
    FIGHTERS -->|상태| CTX
    CTX -->|이벤트| SHMEM
    SHMEM -->|데이터| GRAPHS
    SHMEM -->|데이터| REPORTS
    
    style Target fill:#e3f2fd,stroke:#0d47a1,stroke-width:4px
    style EhTrace fill:#f3e5f5,stroke:#6a1b9a,stroke-width:4px
    style Output fill:#e8f5e9,stroke:#2e7d32,stroke-width:4px

핵심 작동 원리

EhTrace는 정교한 파이프라인을 통해 작동합니다:

  1. 🛡️ 예외 처리: Vectored Exception Handler(VEH) 등록
  2. 👣 블록 스테핑: 기본 블록 경계에서 단일 스텝 예외 사용
  3. 🔍 디스어셈블리: Capstone을 활용한 즉석 명령어 분석
  4. 📝 로깅: 외부 분석을 위해 실행 이벤트를 공유 메모리에 기록
  5. ⚔️ 파이팅: 보안 및 분석 작업을 위한 구성 가능한 "BlockFighters" 적용

프레임워크는 특수화된 컨텍스트 구조를 사용하여 스레드별 실행 상태를 유지하며 사용자 정의 계측을 위한 후크를 제공합니다.

성능

root@kitploit:~
graph LR
    subgraph Traditional["🐌 전통적인 디버거"]
        T1[단일 스텝]
        T2[컨텍스트 전환]
        T3[커널 모드]
        T4[~1M 이벤트/초]
        style T1 fill:#ffcdd2,stroke:#c62828,stroke-width:2px,color:#000
        style T2 fill:#ffcdd2,stroke:#c62828,stroke-width:2px,color:#000
        style T3 fill:#ffcdd2,stroke:#c62828,stroke-width:2px,color:#000
        style T4 fill:#ef5350,stroke:#b71c1c,stroke-width:3px,color:#fff
    end
    
    subgraph EhTrace["⚡ EhTrace"]
        E1[블록 스텝]
        E2[프로세스 내]
        E3[사용자 모드]
        E4[~43M 이벤트/초]
        style E1 fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px,color:#000
        style E2 fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px,color:#000
        style E3 fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px,color:#000
        style E4 fill:#66bb6a,stroke:#1b5e20,stroke-width:3px,color:#fff
    end
    
    T1 --> T2 --> T3 --> T4
    E1 --> E2 --> E3 --> E4
    
    style Traditional fill:#ffebee,stroke:#d32f2f,stroke-width:3px
    style EhTrace fill:#e8f5e9,stroke:#388e3c,stroke-width:3px

EhTrace는 여러 최적화를 통해 높은 성능을 달성합니다:

  • 🎯 분기 스테핑 vs 단일 스테핑: 기본 블록 경계에서만 추적
  • ⚡ 프로세스 내 작동: 디버거 컨텍스트 전환 없음
  • ⏱️ 시간적 상태 관리: VEH가 자연스럽게 실행 상태를 유지
  • 💾 효율적 로깅: 고처리량 이벤트 기록을 위한 공유 메모리 버퍼

📊 벤치마크: 428,833,152개 이벤트(각 32바이트)를 10초 동안 캡처 = ~43M 이벤트/초

예제 출력

CSW16 데모: notepad.exe를 심볼 없이 추적:

심볼 없는 플레임 그래프

Capstone 디스어셈블리가 포함된 기본 블록 그래프:

디스어셈블리가 포함된 BB 그래프

코드 커버리지 시각화:

BB 그래프 커버리지

구성 요소

root@kitploit:~
graph TD
    subgraph Core["🎯 핵심 구성 요소"]
        EH[EhTrace.dll<br/>주 계측]
        AC[Acleanout<br/>로그 덤퍼]
        AG[Agasm<br/>그래프 생성기]
        style EH fill:#e1bee7,stroke:#6a1b9a,stroke-width:3px,color:#000
        style AC fill:#c5cae9,stroke:#3949ab,stroke-width:3px,color:#000
        style AG fill:#b2dfdb,stroke:#00695c,stroke-width:3px,color:#000
    end
    
    subgraph Tools["🔧 보조 도구"]
        AL[Aload<br/>DLL 인젝터]
        AP[Aprep<br/>테스트 EXE]
        AS[Astrace<br/>스택 트레이서]
        style AL fill:#ffe0b2,stroke:#e65100,stroke-width:3px,color:#000
        style AP fill:#f8bbd0,stroke:#c2185b,stroke-width:3px,color:#000
        style AS fill:#d1c4e9,stroke:#512da8,stroke-width:3px,color:#000
    end
    
    subgraph Fuzzing["🐛 퍼징 통합"]
        AWA[AWinAFL<br/>AFL 계측]
        style AWA fill:#ffccbc,stroke:#d84315,stroke-width:3px,color:#000
    end
    
    subgraph Viz["📊 시각화"]
        WPF[WPFx<br/>그래프 뷰어]
        DIA[Dia2Sharp<br/>심볼 해석기]
        ASF[AStackFolding<br/>플레임 그래프]
        style WPF fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px,color:#000
        style DIA fill:#fff9c4,stroke:#f9a825,stroke-width:3px,color:#000
        style ASF fill:#ffecb3,stroke:#ff8f00,stroke-width:3px,color:#000
    end
    
    EH -->|로그| AC
    AC -->|데이터| AG
    AG -->|그래프| WPF
    AL -->|주입| EH
    DIA -->|심볼| AG
    ASF -->|처리| AC
    AWA -->|변형| EH
    
    style Core fill:#f3e5f5,stroke:#7b1fa2,stroke-width:4px
    style Tools fill:#fff3e0,stroke:#ef6c00,stroke-width:4px
    style Fuzzing fill:#fbe9e7,stroke:#bf360c,stroke-width:4px
    style Viz fill:#e8f5e9,stroke:#388e3c,stroke-width:4px

EhTrace 에코시스템은 여러 통합 프로젝트로 구성됩니다:

핵심 구성 요소

  • EhTrace: 주 계측 DLL (테스트를 위해 EXE로도 빌드 가능)
  • Acleanout: EhTrace가 생성한 공유 메모리에서 추적 로그 덤프
  • Agasm: 심볼 및 Capstone 통합으로 그래프를 생성하는 접착/디스어셈블리 도구

보조 도구

  • Aload: DLL 주입 유틸리티
  • Aprep: 테스트 실행 파일 (EhTrace가 EXE로 빌드된 경우)
  • Astrace: 스택 추적 유틸리티
  • AKeyTest: 암호화 키 에스크로 테스트

퍼징 통합

  • AWinAFL: Windows용 AFL 호환 퍼징 계측

시각화

  • WPFx: MSAGL 그래프 라이브러리를 사용한 WPF 기반 시각화
  • Dia2Sharp: 심볼 처리를 위한 C# DIA2 래퍼
  • TestDump2: Dia2Sharp용 테스트 애플리케이션
  • Amerger: 로그 병합 유틸리티
  • AStackFolding: 플레임 그래프 생성을 위한 스택 트레이스 폴딩

사전 요구 사항

빌드 요구 사항

  • Visual Studio 2015 이상 (C++ 도구 체인)
  • Windows SDK
  • .NET Framework (시각화 도구용)

런타임 종속성

  • dbghelp.dll: 심볼 해석 (support 디렉터리에 포함)
  • symsrv.dll: 심볼 서버 지원 (support 디렉터리에 포함)
  • Capstone: 디스어셈블리 엔진 (support 디렉터리의 라이브러리)
  • MSAGL: 그래프 시각화 (Microsoft Automatic Graph Layout)

빌드

  1. Visual Studio에서 EhTrace.sln 열기
  2. 대상 구성(Debug/Release) 및 플랫폼(x86/x64) 선택
  3. 솔루션 빌드

자세한 빌드 지침은 BUILDING.md를 참조하세요.

사용법

기본 추적

  1. EhTrace.dll 빌드 또는 획득
  2. Aload 또는 원하는 주입 방법을 사용하여 대상 프로세스에 EhTrace.dll 주입
  3. 대상 애플리케이션 실행
  4. Acleanout을 사용하여 추적 데이터 수집
  5. WPFx 또는 사용자 정의 분석 도구로 결과 시각화

예제 워크플로우

root@kitploit:~
# EhTrace 빌드
msbuild EhTrace.sln /p:Configuration=Release /p:Platform=x64

# 대상에 주입
Aload.exe target.exe EhTrace.dll

# 추적 데이터 수집
Acleanout.exe > trace.log

# Agasm으로 분석
Agasm.exe trace.log output.graph

포괄적인 사용법 문서는 USAGE.md를 참조하세요.

구성

EhTrace는 BlockFighters 프레임워크를 통해 런타임 구성을 지원합니다. 빌드에서 파이터 구성을 수정하여 추적 동작을 설정하세요.

사용 가능한 파이터:

  • RoP 파이터: ROP 가젯 체인 탐지
  • 키 에스크로 파이터: 암호화 작업 가로채기
  • AFL 파이터: 퍼징 계측 제공
  • 사용자 정의 파이터: 자체 분석 로직 구현

개발

프로젝트 구조

root@kitploit:~
EhTrace/
├── EhTrace/          # 핵심 계측 DLL
├── prep/             # 보조 도구 및 유틸리티
├── vis/              # 시각화 구성 요소
├── support/          # 종속성 및 리소스
├── doc/              # 문서
└── afl-fuzz/         # AFL 퍼징 통합

주요 소스 파일

  • EhTrace.cpp: 주요 VEH 핸들러 및 핵심 로직
  • BlockFighters.cpp: 파이터 프레임워크 구현
  • Config.cpp: 구성 및 심볼 관리
  • GlobLog.cpp: 공유 메모리 로깅
  • KeyEscrow.cpp: 암호화 키 가로채기
  • RoP-Defender.cpp: ROP 탐지 로직

라이선스

이 프로젝트는 GNU Affero General Public License v3.0에 따라 라이선스가 부여됩니다. 자세한 내용은 LICENSE 파일을 참조하세요.

Copyright (C) 2014-2016 Shane Macaulay

기여

기여를 환영합니다! 코드가 기존 스타일을 따르고 적절한 테스트를 포함하는지 확인해 주세요.

작성자

Shane Macaulay ([email protected])

감사의 말

  • Capstone 디스어셈블리 프레임워크
  • Microsoft Automatic Graph Layout (MSAGL)
  • AFL 퍼징 프레임워크
  • 보안 연구 커뮤니티

참고 자료

기술적 세부 사항은 다음을 참조하세요:

  • ARCHITECTURE.md - 기술 아키텍처 문서
  • doc/ - 추가 문서 및 프레젠테이션
도구 다운로드