본문 바로가기
분석 TIP/정적분석

Autoit 샘플 분석

by 두유노우컴퓨터 2025. 4. 21.

일반적인 오토잇은 au3 -> EXE로 변환한 것을 역으로 만드는 수준이였지만, 최근에는 다른 형태로 악성코드에서 사용된다.

 

더미코드가 삽입된 au3는 특정 오프셋부터 a3x의 구조를 포함하고 있을 수 있다.

(3.26버전부터는 EA06 이라는 매직 문자열을 사용한다)

시작 매직넘버

 

종료 매직문자열은 AU3! 이다.

종료 매직넘버

 

위에 그림 처럼 malcat 툴로도 쉽게 분리할 수 있다.
이렇게 분리한 파일을 아래 툴로 쉽게 오토잇 소스를 추출할 수 있다.

 

첫 번째 방법

 

https://github.com/nazywam/AutoIt-Ripper

 

GitHub - nazywam/AutoIt-Ripper: Extract AutoIt scripts embedded in PE binaries

Extract AutoIt scripts embedded in PE binaries. Contribute to nazywam/AutoIt-Ripper development by creating an account on GitHub.

github.com

 

python3 -m pip install autoit-ripper 설치 후
autoit-ripper sample.exe out_directory 명령으로 쉽게 풀 수 있다.

실행 화면

 

두 번째 방법

 

UI가 있는 툴이며, 직관적이다.

https://github.com/digitalsleuth/autoit-extractor/releases/tag/v1.0.0

 

Release v1.0.0 · digitalsleuth/autoit-extractor

Adding the existing Releases to the Release page $ sha256sum AutoIt-Extractor-* d82d49e9ad153ef84670c1d0bde5f36b540d32fa037cca6127ce9e4e366b7403 AutoIt-Extractor-net40-x64.exe f19accc5c33d0a4638ad...

github.com

 

그냥 드래그엔 드롭한 후 풀면 되는데, 좌측 Resources에 >>AUTOIT SCRIPT<< 이걸 눌러줘야 소스를 볼 수 있다.

실행 화면

 

이후 소스를 분석 하면 된다.