본문 바로가기
OffSec

[Blue Teams Academy] 모듈 17 - IDA Pro 시작

by 10th doctrine 2021. 3. 19.
728x90

역엔지니어링은 정보보안에 있어서 매우 중요한 과제다. 디지털 포렌식, 바이너리 공격, 취약성 분석, 멀웨어 분석 등에서 높은 성과를 거두고 있다. 이 글에서 우리는 "라고 불리는 놀라운 도구를 탐험할 것이다.IDA 프로".

설치

공식 웹사이트에 따르면,

'_IDA는 Windows, Linux 또는 Mac OS X가 호스팅하는 다중 프로세서 디스어셈블러  디버거로, 이들 모두를 설명하기 어려운 많은 기능을 제공한다.' _

IDA에는 두 가지 버전이 있다.

  • 상용 버전 "IDA Pro"
  • "IDA Free"라는 무료 버전

소스

Windows에 IDA Pro를 설치하려면 다음 웹 사이트를 방문하십시오. https://www.hex-rays.com/products/ida/support/download.shtml

설치 후 바탕 화면 바로 가기에서 시작 가능

일단 그것을 시작하면, 당신은 새로운 프로젝트를 작업하고 오래된 분해물을 적재할 수 있는 선택권을 갖게 될 것이다.

시범적으로 팔로알토네트웍스에서 간단한 악성 PE파일을 분해한다. 여기서 다운로드 가능: https://docs.paloaltonetworks.com/wildfire/7-1/wildfire-admin/submit-files-for-wildfire-analysis/test-a-sample-malware-file

샌드박스 또는 VM에서 파일 테스트 잊지 마십시오.

PE(Portable Executable) 파일은 실행 파일, DDL 및 32비트 및 64비트 버전의 Windows에서 사용되는 개체 코드에 대한 파일 형식이다. 여기에는 악성 프로그램 분석가를 위한 많은 유용한 정보가 포함되어 있으며 여기에는 수입, 수출, 날짜 스탬프, 서브시스템, 섹션 및 리소스가 포함된다. PE 파일의 기본 구조는 다음과 같다.

출처: pe_format.png

PE 파일의 일부 구성 요소는 다음과 같다.

DOS 헤더 : 이 작업은 모든 PE 파일의 처음 64바이트에서 시작되므로 DOS는 실행 파일의 유효성을 검사하고 DOS 스텁 모드에서 실행할 수 있다.

PE 헤더 : 코드의 위치와 크기를 포함한 정보를 포함한다.

PE 섹션 파일의 주요 내용을 포함한다.

PE 파일 로드:

이전 스크린샷에서 볼 수 있듯이 IDA Pro는 파일 형식을 자동으로 감지할 수 있다.

"확인"을 누르면 기본 인터페이스로 안내된다.

파일을 로드하면 IDA는 데이터베이스 "idb"를 만든다. 데이터베이스는 다음을 포함한다.

  • Name.id0
  • name.id1
  • name.nam
  • Name.til

기본 인터페이스에는 많은 보기와 창이 포함되어 있으며,

"네비게이션 밴드"라고 불리는 이 막대는 이진수가 사용하는 메모리 공간을 보여준다.

함수를 그래프와 하위 그래프로 표시하는 그래프 뷰도 있다.

기능 창:

IDA pro에 의해 인식되는 모든 기능을 나열한다.

수입은

가져온 라이브러리를 로드된 이진수별로 표시

다음은 데이터를 분해로 나타내는 텍스트 보기입니다.

다른 많은 사용 가능한 보기를 찾을 수 있음: 보기 -\> 하위 보기 열기

쉽게 탐색하려면 다음과 같은 IDA 바로 가기를 사용하십시오.

새 창으로 이동: Alt+Enter 텍스트: Alt+T 이름: Shift+F4 함수: Shift+F3

전체 목록은 여기에서 찾을 수 있다: Data Rescue Interactive Disconsoller(IDA) Pro Quick Reference Sheet

IDA Pro는 뛰어난 기능을 바탕으로 String(F21), 가져오기, 내보내기, 그래프 흐름 등을 포함한 많은 정보를 추출할 수 있는 기능을 제공하기 때문에 멀웨어 분석에 있어 매우 유용하다.

또 다른 훌륭한 도구를 탐색하려면 "Radare2로 정적 멀웨어 분석을 수행하는 방법" 기사를 살펴보십시오.

이 기사에서는 IDA PRO에 대해 개괄적으로 설명했다.

 

더보기

Getting started with IDA Pro

Reverse engineering is a very important task in information security. It is highly performed in digital forensics, binary exploitation, vulnerability analysis, malware analysis and much more. In this article, we are going to explore an amazing tool called "IDA Pro".

Installation

According to its official website,

'_IDA is a Windows, Linux or Mac OS X hosted multi-processor disassembler and debugger that offers so many features it is hard to describe them all' _

There are two versions of IDA:

  • Commercial version " IDA Pro"
  • A free version of it called " IDA Free"

source

To install IDA Pro on Windows you just simply need to go to: https://www.hex-rays.com/products/ida/support/download.shtml

After installing it you can start it from its desktop shortcut

Once you start it, you will have the choice to work on a new project and load an old disassembly

As a demonstration, we are going to disassemble a simple malicious PE file from Paloalto Networks. You can download it from here: https://docs.paloaltonetworks.com/wildfire/7-1/wildfire-admin/submit-files-for-wildfire-analysis/test-a-sample-malware-file

Don't forget to test the file on a sandbox or a VM

Portable Executable ( PE ) files are file formats for executables, DDLs, and object codes used in 32-bit and 64-bit versions of Windows. They contain many useful pieces of information for malware analysts, including imports, exports, time-date stamps, subsystems, sections, and resources. The following is the basic structure of a PE file:

Source: pe_format.png

Some of the components of a PE file are as follows:

DOS Header : This starts with the first 64 bytes of every PE file, so DOS can validate the executable and can run it in the DOS stub mode.

PE Header : This contains information, including the location and size of the code.

PE Sections They contain the main contents of the file.

Load the PE file:

As you can see from the previous screenshot, IDA Pro is able to detect the file type automatically.

Press "OK" and will be guided to the main interface:

If you load a file, IDA will create a database "idb". The database contains:

  • Name.id0
  • name.id1
  • name.nam
  • Name.til

The main interface contains many views and windows:

This bar called "the navigation band" illustrates the memory space used by the binary

There is also a graph view to display functions as graphs and sub-graphs

Functions Window:

It lists all the recognizable functions by IDA pro

Imports

It shows the imported libraries by the loaded binary

The following is the text view where data is represented as disassembly

You can find a lot of other available views: view -\> Open Subviews

To facilitate the navigation you can simply use the IDA shortcuts including:

Go to a new window: Alt+Enter Text: Alt+T Names: Shift+F4 Functions: Shift+F3

You can find the full list here: Datarescue Interactive Disassembler (IDA) Pro Quick Reference Sheet

Based on its great capabilities IDA Pro is very helpful when it comes to Malware Analysis since it gives you the ability to extract many pieces of information including Strings (F21), imports, exports, graph flows and so on:

If you want to explore another great tool, I highly recommend you to take a look at my article:" How to Perform Static Malware Analysis with Radare2"

In this article, we did a high-level overview of IDA PRO

 

 

※ 출처 : Blue Teams Academy | www.blueteamsacademy.com/?fbclid=IwAR0h-Vz8PtKLuStF5NEb9niYf07zYmRm2FPEioOt8AG03o9rgbhiYDMRhj8

반응형

댓글