tom.maruska
tom.maruska

Reputation: 1481

c# allow only signed assemblies to be loaded

I have .NET 4.8 application. I want to setup application environment in a way that only assemblies (dlls) signed with trusted certificate could be loaded into application.

How can I achieve that? I guess I need to setup (or create new) AppDomain with certain settings, but after some searching I'm not sure how to do it.

Can anyone help?

Upvotes: 1

Views: 444

Answers (1)

Christopher
Christopher

Reputation: 9814

When I install this app, I can tamper dll (also signed) loaded during runtime with hex editor.

If the enemy has that kind of access to your memory, there is nothing you can do. Everything you could do, could be undone with a similar attack on your main programm.

Whatever check you would put into the code, you can not trust it because it could be attacked the very same way.

Upvotes: 2

Related Questions