
서명된 mozglue.dll을 통한 메모리 API 프록시
탐지 연구 PoC: Mozilla 서명 mozglue.dll 을 통해 프록시 메모리 작업(메모리 매핑, 로컬 메모리 할당)을 수행하여 커널 콜백이 최종 사용자 모듈을 신뢰할 수 없는 모듈이나 서명되지 않은 모듈 대신 신뢰할 수 있는 벤더 DLL(Mozilla 서명)로 귀속시키도록 합니다.
둘 다 mozglue.dll 의 MFBT_API 내보내기입니다(Firefox 설치 필요):
| 모드 | 내보내기 | Mozilla 소스 |
|---|---|---|
inject | mozilla::MapRemoteViewOfFile | WindowsMapRemoteView.cpp · 헤더 |
alloc | MozVirtualAlloc | mozjemalloc.cpp · mozmemory_wrap.h |
x64 MSVC 맹글링된 이름:
?MapRemoteViewOfFile@mozilla@@YAPEAXPEAX0_K01KK@Z
MozVirtualAlloc
MSYS2 mingw-w64:
./build.sh
./build.sh shellcode # 선택 사항: shellcode/msgbox.bin 재빌드
탐지 엔지니어링 테스트를 위한 사전 빌드된 mozglue_gate.exe 가 저장소에 포함되어 있습니다(64비트, Firefox 설치 필요).
# 프로세스 간 맵 + APC (MapRemoteViewOfFile)
.\mozglue_gate.exe inject <pid> shellcode\msgbox.bin
# 로컬 RWX 할당 (MozVirtualAlloc)
.\mozglue_gate.exe alloc --size 10240
shellcode/msgbox.bin 은 "Hello from Mozglue" / 캡션 gluegate 를 표시합니다(자식 프로세스 없음).
클래식 Firefox 필요: C:\Program Files\Mozilla Firefox\mozglue.dll (또는 --mozglue / MOZGLUE_DLL).
최종 사용자 모듈이 Mozilla Corporation 서명/신뢰됨
MapViewOfFile
VirtualAlloc
mozglue.dll!MozVirtualAlloc 또는 mozglue.dll!?MapRemoteViewOfFile 이 나타남.mozilla.dll 을 로드함(특히 programfiles에 이미 설치된 것).공인된 보안 연구 및 탐지 테스트 전용입니다.