Skip to content

Add mitigation for DLL sideloading#53

Merged
MouriNaruto merged 1 commit into
M2Team:mainfrom
dinhngtu:dlf
Apr 25, 2026
Merged

Add mitigation for DLL sideloading#53
MouriNaruto merged 1 commit into
M2Team:mainfrom
dinhngtu:dlf

Conversation

@dinhngtu

Copy link
Copy Markdown
Member
  • Set /DEPENDENTLOADFLAG:0x800 to force static dependencies to load from System32.
  • Call SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_SYSTEM32) to enforce the same requirements for dynamically-loaded DLLs.

Note: From manual testing, SetDefaultDllDirectories was sufficient and so DelayLoadDLLs was not needed.

* Set /DEPENDENTLOADFLAG:0x800 to force static dependencies to load from
  System32.
* Call SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_SYSTEM32) to enforce
  the same requirements for dynamically-loaded DLLs.

Note: From manual testing, SetDefaultDllDirectories was sufficient and
so DelayLoadDLLs was not needed.

Signed-off-by: Tu Dinh <contact@tudinh.xyz>
@MouriNaruto MouriNaruto merged commit 738fd14 into M2Team:main Apr 25, 2026
1 check passed
MouriNaruto added a commit that referenced this pull request Apr 25, 2026
@dinhngtu dinhngtu deleted the dlf branch April 25, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants