I have an application which is linked with set of dll files. I am loading the DLL s implicitly without going through insecure LoadLibrary() calls. I am thinking of signing the DLL s with a certificate file to avoid DLL hijacking. I have a doubt that how can implicit linking checks whether my DLL s are signed or not.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You should add a manifest dependency using the MANIFESTDEPENDENCY linker option and set publicKeyToken
to the key used to sign the dlls.
E.g. something like:
/manifestdependancy:type='win32' name='mydll' language='*' publicKeyToken='1234567890ABCDEF0'
Windows will then refuse to load your application unless the dll matching the above conditions is present.