Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6949515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:57:53+00:00 2026-05-27T13:57:53+00:00

Trying to get my head around authenticode code-signing and strong-naming. Am I right in

  • 0

Trying to get my head around authenticode code-signing and strong-naming.

Am I right in thinking that if I code-sign an exe that references a few dlls (not strong named) that a malicious user could replace my DLLs and distribute the app in a way that appears as if it’s signed by me, but is running their code?

Assuming that’s true, it seems like you wouldn’t really want to sign a .NET app without strong-naming the whole thing, otherwise you’re giving people the ability to execute code under the guise of an app you wrote?

The reason I’m unsure, is that none of the articles I found online (including the MSDN doc about using SN+Authenticode) seem to mention this, and it seems like a fairly important point to understand (if I’ve understood correctly)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:57:54+00:00Added an answer on May 27, 2026 at 1:57 pm

    Am I right in thinking that if I code-sign an exe that references a few dlls (not strong named) that a malicious user could replace my DLLs and distribute the app in a way that appears as if it’s signed by me, but is running their code?

    Yes if the remainder of the DLLs are only signed and not strong named they can be replaced without .NET raising an exception. You could, inside the exe, verify the DLLs are signed by the same key as the exe. None of these approaches prevent someone from replacing your DLLs or the EXE.

    Assuming that’s true, it seems like you wouldn’t really want to sign a .NET app without strong-naming the whole thing, otherwise you’re giving people the ability to execute code under the guise of an app you wrote?

    Generally I suppose that is the ‘best practice’, but again you have not prevented anything. Once a user has the rights to change files on the local system there is not much you can do to stop them from malicious activity.

    There are several obfuscation technologies that build complete .NET projects into a single exe, this might make the ‘most secure’ approach but still can tampered with.

    The real question is what are you trying to prevent them from doing? I mean to say, why would someone be interested in replacing your dll? What would they hope to achieve, what is their goal? If you’re trying to prevent someone from reading sensitive information from the process you in for a long hard road of disappointment. Assume a malicious party has complete access to your source code and every piece of information used by your process, because they do. Assume they can replace all or part of your code at will, because they can.

    Updated

    So binding redirect will only work with assemblies strong-named with the same key, and therefore does protect you from DLLs being changed?

    Correct, with the noted exception that code injection can still be done in numerous ways.

    … and back to the original question, does code-signing without strong-naming kinda undermine the point of code-signing?

    Not really. Code signing (not strong naming) has two distinct purposes:

    1. Authentication. Verifying who the author of the software is.
    2. Integrity. Verifying that the software hasn’t been tampered with since it was signed.

    Often this is only authenticated and validated during installation. This is why we sign our setup.exe, to ensure that the customer has received the unmodified installer from us. They are prompted with the “Do you trust XXXX Company” and are thereby granting authorization to the authenticated/signed installer. Once installed however there is little built-in use of code signing by the OS (except for drivers and some other obscure cases).

    Strong Naming on the other had has a completely different purpose for it’s existence. It’s entirely focused on ‘integrity’ of the application. There is no certificate, no signing authority (CA) to verify it against, no user-displayed information for them to confirm, and nothing the OS can verify about the executable it’s going to run.

    The .NET framework uses strong names for many things, all of them I loosely categorize as application integrity:

    1. The contents of the dll/exe has a signed hash so that it cannot be tampered with.
    2. Each reference must be strong named and verified when loading the dependency.
    3. Assemblies can be registered in the GAC and publisher policies can be used.
    4. Native images can be ngen’d to produce a compiled image of the assembly’s IL.

    I’m sure there are other things I’m missing here, but these are primary uses I’m aware of.

    Best practices for Signing and Strong-naming

    • Use a signed installer
    • Use a code-signed executable
    • Use a strong-named executable
    • Strong name all dependencies and references to them
    • Code signing dependencies is not generally required*
    • Consider GAC registering assemblies at install time

    *Note: Code signing can be useful in some cases for a DLL, for example COM objects marked ‘safe’ and embedded into a browser should be signed and strong-named as if it were an executable. Code signing can also be useful in externally verifying dependencies without loading the assembly or reflecting it’s attributes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was trying to get my head around XAML and thought that I would
I am trying to get my head around some of my predecessors code who,
Im trying to get my head around javascript inheritance and this code doesnt work
I'm still trying to get my head around mocking. Right now, I'm trying to
Im trying to get my head around the sequence of events that happen between
trying to get my head around Feedzirra here. I have it all setup and
Just trying to get my head around Generics by reading this enlightening article by
Just trying to get my head around what can happen when things go wrong
I'm trying to get my head around why the following doesn't work. I have
I'm trying to get my head around the Error Handling in MVC. What I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.