본문 바로가기
시스템 보안

[펌웨어/리버싱] Ghidra, Angr

by 민지.com 2025. 4. 4.
반응형

Ghidra

Ghidra란 미국 국가 안보국(NSA)에서 제작한 JAVA 기반의 역어셈블러(리버싱) 프레임워크로, 다양한 플러그인들을 가지고 있어 유용하다. IDA Pro와 비교했을 때, 모든 아키텍처를 지원하는데도 불구하고 무료라는 점에서 큰 장점을 가지고 있지만, 디버깅은 불가능하다는 단점 또한 존재한다.

 

Ghidra는 JAVA로 개발되었기 때문에 이를 원활하게 사용하기 위해서는 jdk 11 이상 버전의 설치가  필요하다. 또, 바이너리 파일을 제공하면 컴파일할 때 거의 1:1로 매칭되는 C코드를 생성해 줄 정도로 매우 정교하다.

 

(Ghidra 설치 링크)

https://ghidra-sre.org/

 

Ghidra

Getting Help Ghidra provides context-sensitive help on menu items, dialogs, buttons and tool windows. To access the help, press F1 or Help on any menu item or dialog. Visit our Wiki Issue Tracker

ghidra-sre.org

(JDK 11 설치 링크)

https://www.oracle.com/java/technologies/javase-jdk11-downloads.html

 

Download the Latest Java LTS Free

Subscribe to Java SE and get the most comprehensive Java support available, with 24/7 global access to the experts.

www.oracle.com

 

Angr

Angr이란 바이너리 분석 자동화 도구 플랫폼으로, Python의 라이브러리 형태로 존재한다.

Angr의 github를 살펴보면 다음과 같은 기능이 가능하다고 적혀있다.

  • Disassembly and intermediate-representation lifting - 디스어셈블리 및 IR(중간 표현) 변환
    : 바이너리 실행 파일의 기계어 코드를 사람이 읽을 수 있는 어셈블리 코드로 변환하는 과정. IR로 변환 시 분석 도구가 더 쉽게 다룰 수 있고, 아키텍처 간 호환성을 높일 수 있다.

  • Program instrumentation - 프로그램 계측
    : 프로그램 실행 중 특정 코드 조각을 삽입해 런타임 정보를 수집

  • Symbolic execution - 심볼릭 실행
    : 프로그램을 실제 값이 아닌 심볼릭 변수로 실행해 가능한 모든 경로를 탐색

  • Control-flow analysis - 제어 흐름 분석
    : 프로그램의 실행 흐름을 그래프로 모델링하여 분석.
    기본 블록과 제어 흐름 그래프 사용해 코드 실행 흐름 시각화 및 분석

  • Data-dependency analysis - 데이터 종속성 분석
    : 프로그램 내 변수 간 데이터 흐름 추적. 데이터 종속성 그래프(DDG)를 사용해 변수 값이 어디서 영향을 받았는지 분석

  • Value-set analysis (VSA) - 값 집합 분석
    : 정적 분석 기법 중 하나로, 변수나 레지스터가 가질 수 있는 모든 값의 범위 추정. 메모리 안전성 검증, 버퍼 오버플로우 탐지 등에 사용.

  • Decompilation - 바이너리 코드를 고급 언어로 변환하는 과정. 정적 분석 도구에서 활용.

Angr에 대해 더 자세히 알고 싶은 경우, 아래 Angr 공식 링크와 논문을 참고하길 바란다.

https://angr.io/

 

angr

Extensibility Provides powerful extensibility for analyses, architectures, platforms, exploration techniques, hooks, and more.

angr.io

https://ieeexplore.ieee.org/document/7546500

 

SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis

Finding and exploiting vulnerabilities in binary code is a challenging task. The lack of high-level, semantically rich information about data structures and control constructs makes the analysis of program properties harder to scale. However, the importanc

ieeexplore.ieee.org

 

반응형