How to avoid load system DLL while creating application using WPF

Prashant Sharma 0 Reputation points
2025-10-23T10:26:01.02+00:00

I have application in WPF C#, When I run process mon I can see list of System DLL

  • cryptsp.dll
  • CRYPTBASE.dll
  • bcrypt.dll
  • MSVCP140_CLR0400.dll
  • profapi.dll
  • USP10.dll
  • msls31.dll
  • NTASN1.dll By placing a malicious DLL with the same name in the application directory, arbitrary code execution was achieved. How to avoid such case.
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 81,191 Reputation points Volunteer Moderator
    2025-10-24T23:18:50.2266667+00:00

    You get around this by only using signed dlls. Most system dlls are signed. If you are creating your own, then you must sign them:

    https://free.blessedness.top/en-us/dotnet/standard/assembly/sign-strong-name

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.