检测研究概念验证:通过Mozilla签名的 mozglue.dll 代理内存操作(内存映射、本地内存分配),使得内核回调将最终用户模块属性关联到受信任的厂商 DLL(Mozilla 签名),而非不受信任或未签名的模块。
两者均为 mozglue.dll 的 MFBT_API 导出(需安装 Firefox):
| 模式 | 导出函数 | Mozilla 源码 |
|---|---|---|
inject | mozilla::MapRemoteViewOfFile | WindowsMapRemoteView.cpp · header |
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 弹出 "来自 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(尤其是已安装在 Program Files 中的)。仅用于授权的安全研究和检测测试。