Drop File Malware 靜態分析

Chihhh Linnn 香菇頭

Source

  • File Hash : d71a7b1efc4a06afffd94f526ad496368a9c4489296076449c74eec2d76ee4ca
Tools
1
2
3
4
5
Strings
PE-Bear
DIE (Detect It Easy)
ResourceHacker
IDA

Basic info

Strings

  • Grep .com
    image
  • Grep dll
    image

DIE

image

  • AMD64 PE
  • Develop with Vistual C/C++
  • Without packing

Import

Kernel32.dll
image

這邊可以看到跟 grep dll 的結果不太一樣,可以推測這支程式內還藏了一些東西

Decompile

  • Entry point -> Optional header :: Entry Point + image base
    jmp to Entry point
    image
    Security and CRT init

  • 回到Function main
    image
    會看到call 了同一個 Function 暫時命名為 load_resource

Load_resource ?

image

所以這邊不是 load_resourcesaveResourceToPath 才對
可以知道他從 resourcee drop 兩個 file lpName分別是

  • 101
  • 102

Drop file execution

使用 winexec 執行
image

What about Drop File

  • 原程式的 .rsrc
    image

  • ResourceHacker Extract File
    image
    這邊把 DLL and EXE 都存起來

check file hash 就可以知道 exe 是正常的,但 dll 可能是惡意的

EXE

DLL

Export and Import

  • DLL Export
    image
  • EXE Import
    image

這邊的 import 可以看到他用了 McVsocCfg.dll 的 McVsoCfgGetObject ,所以先看這個 function

McVsoCfgGetObject

  • unk_1800159F0 做 XOR 解密
    image

下個部分就是 VirtualAlloc and memmove 解密後的 unk_1800159F0

image

  • VirtualAlloc : 分配 VM
  • memmove : 將 unk_1800159F0 指向的 block copy 到 VirtualAlloc 的 block
  • 一段 XOR 解密過的資料被載入 VM

unk_1800159F0 -> shellcode

Conculsion

  • .rsrc 段內植入 合法的 exe 及 惡意的DLL
  • Drop File DLL side-loading
    但我們還看不出來他到底做了什麼(因為shellcode 做 XOR),可以用動態分析看

VT

VT Check

  • Title: Drop File Malware 靜態分析
  • Author: Chihhh Linnn
  • Created at : 2025-01-10 16:25:22
  • Updated at : 2025-01-10 16:25:22
  • Link: https://chihhhs.github.io/2025/01/10/Malware/
  • License: This work is licensed under CC BY-NC-SA 4.0.