Skip to content

Implement Windows DLL blocklist to prevent problematic injections#8

Draft
Copilot wants to merge 5 commits intono-nightlyfrom
copilot/fix-win-dll-blocklist-issue
Draft

Implement Windows DLL blocklist to prevent problematic injections#8
Copilot wants to merge 5 commits intono-nightlyfrom
copilot/fix-win-dll-blocklist-issue

Conversation

Copy link

Copilot AI commented Feb 9, 2026

Astrill VPN's ASProxy64.dll injection causes access violations in RustDesk. Implementing blocklist following OBS Studio's approach.

Implementation

src/platform/win_dll_blocklist.c - Core blocking logic with dual modes:

  • Without Detours (default): SetDefaultDllDirectories restricts DLL search to System32, app dir, user dirs
  • With Detours (optional): Hooks NtMapViewOfSection to intercept and block DLL loads

Blocklist includes:

  • asproxy64.dll (Astrill VPN - primary target)
  • 17 additional DLLs from OBS Studio's proven list (RTSS, FRAPS, Bandicam, etc.)

Integration

Initialization added to all Windows entry points:

  • main.rs - All 3 main() variants
  • service.rs - Windows service
  • flutter_ffi.rs - Flutter interface
#[cfg(windows)]
crate::platform::init_dll_blocklist();

build.rs compiles the C file via cc crate. Logs to %TEMP%\rustdesk_dll_blocklist.log.

Optional Detours support via res/vcpkg/detours/vcpkg.json.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits February 9, 2026 06:50
…njections

Co-authored-by: 21pages <14891774+21pages@users.noreply.github.com>
…ling

Co-authored-by: 21pages <14891774+21pages@users.noreply.github.com>
Co-authored-by: 21pages <14891774+21pages@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix win DLL blocklist based on discussion Implement Windows DLL blocklist to prevent problematic injections Feb 9, 2026
Copilot AI requested a review from 21pages February 9, 2026 06:56
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