교육

문서 악성코드 분석 교육 3일차

Goblebin 2024. 1. 5. 17:20
반응형

어제 docx 파일 이어서 교육.

VBS 언어 실행할 때, MSOffice 문서에서 실행시킬 수 있음.

난독화 되어 있을 때, 이렇게 복호화 가능함.

윈도우에서는 cscript.exe라는 vbs 코드를 실행시킬 수 있는 실행파일이 있음.

 

WMI 네임스페이스란?

 

https://powershell.one/wmi/root

 

Understanding WMI Namespaces - powershell.one

 

powershell.one

 

excel 파일도 doc 파일과 마찬가지임.

oledump.py [파일명]

oledump.py [파일명] -s 8 -v > s8.vbs (여기서 숫자는 대문자가 표시된 부분만 추출하면 됨.)

분석 방법은 doc과 동일함.

 

excel 같은 경우는 macro 4.0이라는 것도 있음.)

매크로 실행하기위한 시트(해당 시트를 글자색 하얀색, 시트 숨기기 등으로 숨기기 가능 -> 근데 금방 찾을 수 있을 듯)를 생성할 수 있는데, 파일 실행 시 자동으로 실행되는 코드로 동작하는 듯 함.

macro 4.0은 내장 함수도 따로 잘 알아야 분석 가능함

아래 링크 들어가면 macro 4.0의 get.workspace 정보 확인 가능

https://malware.news/t/excel-4-macros-get-workspace-reference/38892

 

Excel 4 Macros – Get.Workspace Reference

With the recent resurgence of the use of Excel 4 macros in malicious excel documents, I’ve found myself scouring the internet looking for language references. One such function that was particularly difficult to find documentation for was Get.Workspace,

malware.news

배리든?이라고 엑셀 시트 숨기기 취소를 못하게 하는 기능이 있는데, HEX 값 확인해서 값을 바꿔야 함.

아래 코드 실행해서 보이게 하는 방법도 있음.

Sub ShowSheets()
    Dim Sheet As Worksheet
    For Each Sheet In Sheets
        Sheet.

 

 

hwp 문서 분석

binarydata(bindata) 부분dp ole, 포스트 스크립트? 삽입 가능

한글에서 기본적으로 자바스크립트 제공함.

 

HwpScan이라는 한글과 컴퓨터에서 제공하는 한글 문서 취약점 점검 툴이 있음.(현재는 유로로 전환되어 사용 불가능)

 

 

아래 사이트 좋음. 복호화할 때

https://gchq.github.io/CyberChef/

 

CyberChef

 

gchq.github.io

 

 

 

강사님 블로그

https://sugiri.oopy.io/

 

수기리 블로그

안녕하세요. 수기리입니다. 블로그 UI나 컨텐츠 의견 있으시면 언제든 환영입니다~

sugiri.oopy.io

 

반응형