Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Code signing of Revit Addins

69 REPLIES 69
SOLVED
Reply
Message 1 of 70
harrymattison
33459 Views, 69 Replies

Code signing of Revit Addins

Considering the new requirement in 2017 for Revit Addin signing, does anyone have recommendations

  1. Which vendor to use to buy the certificate (presumably someone listed at http://social.technet.microsoft.com/wiki/contents/documents/2592.windows-root-certificate-program-me...
  2. What is the "right" certificate to buy?

For example, how about the "CODE SIGNING CERTIFICATE" for $170/yr (if you buy 3 years)?

Validates and secures your code
Eliminates security warnings during download and installation
Protects with your choice of SHA-1 or SHA-2 encryption

https://www.godaddy.com/web-security/code-signing-certificate

69 REPLIES 69
Message 21 of 70
Anonymous
in reply to: Anonymous

TL:DR Code signing ensures your code isn't modified before it reaches the end user. If you're going to be malicious with your code there is little we can do.

Message 22 of 70
jeremytammik
in reply to: Anonymous

You can sign your own code, and declare yourself trusted to yourself.

 

Hopefully malicious code publishers will not be declared trusted for the general public by the certification authorities.

 

And, if they turn out to be malicious later on, the trust can hopefully be revoked.



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 23 of 70

 

Dear Neil,

 

I just received another developer query, critically urgent, on digitally signing your Revit add-in, with the ADN case number 12147397:

 

We have a client that is deploying Revit 2017 and addins using Microsoft System Centre software.

 

They ran into the following issue: when users start Revit they are prompted to verify the addins; this is expected for the first time.

 

However, when the user selects 'Always Load' the addins, this choice only remains valid for that single session.

 

If they close Revit and reopen Revit, they are prompted again to verify the addin.

 

Where does Revit store the addin credential information?

 

Can we check whether it is being stored correctly?

 

This problem is affecting digitally signed Revit addins from multiple developers and publishers.

 

The same addins work as expected ("Always Load" selected only once) on other computers that don't have the software deployed with MSC.

 

This issue is holding up the deployment of Revit 2017 to over a hundred computers within the organisation and therefore is absolutely critical for us.

 

Do you have any advice how this can be resolved?

 

Thank you!

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 24 of 70
jeremytammik
in reply to: jeremytammik

I just received an update from the developer saying that the issue is presumably solved.

 

Check the Certificates setting:

 

Internet Explorer -> Tools -> Internet Options -> Content -> Certificates -> Trusted Publishers

 

Is the published listed under Trusted Publishers?

 

If not listed, you will be prompted each time…. This could be the cause of the issue.

 

Cheers, 

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 25 of 70
Anonymous
in reply to: neil.smithline

Hi,

I have a question to Neil. Code signing requires a certificate from a "certificate authority" like Verisign, Digicert etc. When bying a cert, the CA validates the buyer (checks govermental company registry based on given contact data, calls back to verify phone number etc). This gives a certain of validity to the certificate.

 

A signed file can then be traced back to the issuer, and also though the signing be protected from tampering between the issuer and the receiver.

 

What I don't understand then is why it isn't enough for Revit to check that the DLL to be loaded has a valid certificate, and prompt or refuse to load otherwise. Why does the file certificate need to be registered on the machine also? That is only one step more that anyone can do, that doesn't really add anything security-wise, and only makes the install process more complicated.

 

Regards,

Lars Rådman

Message 26 of 70
Anonymous
in reply to: Anonymous

Hi Lars,

This is exactly my point. I'm not suggesting that the DLL's not be signed;
I think that is a good practice. What I'm not understanding is why we're
scaring the user with a warning about the addin even when it is signed!
And then, the resolution is to install our certificate on the user's
machine. To me this adds no additional security and hats where I would
like some clarity: what additional security does it provide to the user for
us to install our certificate on their machine?The code signing I'm on
board with.

Thanks,
Ken
Message 27 of 70
neil.smithline
in reply to: Anonymous

A non-technical analogy might be a good place to start…


Imagine a situation where someone tells you that it is going to rain tomorrow. Should you trust that statement? Questions you might ask yourself are:
• Who is telling me this information?
• Do I trust this person to have accurate data and repeat it accurately to me?


It is easy to imagine ways to answer the first question. You may personally know the speaker, check their ID, have a friend vouch for them, etc… But the second question is trickier. Source credibility has as much to do with the person receiving the data as the person transmitting it. While some people tend to be viewed as more credible than others, nobody is viewed as always credible by everyone. The second question gets even more complex when you start wondering where this person obtained their information. Did they get in a plane and view the weather patterns for themselves? If they got the information from a source, you must now make assumptions about how trustworthy that source is. Generally, determining whether you trust a person is a complex process.

 

Code signing answers the first question. When you load an add-in, Revit can look at the signature and tell you who wrote that code. Assuming that the author's private key hasn't been compromised and that the CA did their job properly, that is an accurate statement. But we can't know if you trust that person/organization or how much you trust them.


There is a famous case of Adobe's code signing key being used by attackers to sign malware. Adobe had incredible security on their private key, keeping it in an HSM. But the attacker was able to infiltrate their infrastructure, get their malware signed, and then distribute the signed malware. If a user had previously checked "always trust from this publisher" during an Adobe installation, the malware would have been installed silently. Users who didn't check that box would have gotten the trust this publisher dialog, and given a chance to wonder why "Adobe" (actually malware) was installing something on their computer.


Clearly the Adobe case is extreme, but I think it helps illustrate the point that determining the trustworthiness of the code signer is not something that can be done programmatically. There is no algorithm for trustworthiness that doesn't involve the user's personal viewpoint (eg: perhaps a government worker trusts things signed by the government while a private citizen may choose to be more circumspect of their government). So we're left prompting you, asking for your opinion on trust.


Ensuring that only trustworthy certs are in the Trusted Publishers cert store is a problem that Windows and users manage outside of Revit. The only way to get a bad cert there is to have malware run on the computer under the current user or for the user to download a cert and install it. At that point, the best option is to consider the computer compromised and to wipe and reinstall the OS (AKA: nuke it from orbit). The trust store is the definitive source of trustworthiness for Revit, and for Windows in general.

 

A similar situation arises in browsers. They have a cert store that tells them whether to trust a CA for signing SSL/TLS certificates. A default set of certs comes with the browser, and users can modify that set. But the browser always trusts the cert store. The infamous Lenovo-Superfish scandal occurred because Lenovo was adding untrustworthy certs to the cert stores on computers that it sold.



Neil Smithline

Revit Software Security Architect
Message 28 of 70
Anonymous
in reply to: neil.smithline

I get all of this however I still have to click "Always Load" for almost all of my add-ins daily, including ones from Autodesk. Is there a file somewhere that is supposed to record that I want to always load these addins so I do not have to click every single one every single day? If not the Always Load and Load Once buttons are kinda pointless....

Message 29 of 70
matthew_taylor
in reply to: Anonymous

You need to create your own signature. Roll your own. You'll always get the dialog if the add-in is unsigned, that's kinda the point.

 

That said, I think the 'always load' label is misleading.

I think the labelling is generally a little odd. It's about trusted publishers, not about trusted add-ins...Well the add-ins are trusted because they have a trusted publisher.

 


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
Message 30 of 70
Anonymous
in reply to: matthew_taylor

This whole thing is so silly. I mean its a Revit addin we are talking about here, not an attempt by Anonymous to destroy everything Revit in architectural firms all over the globe. 

 

I feel better now that I got that out. 😃 LOL

 

Seriously though, how can Autodesk Addins like Roombook for example, not be signed by them? I can see addins by authors who have never had to sign anything up till now, but Autodesk themselves? 

 

I went to the link you sent me and what a PITA it seems to be in order to use any unsigned addins. 

 

I do appreciate your response and this is not targeted at you one bit. Just a general frustration and a general venting. 

 

It isn't a major issue in my firm yet but I know there will come a time where my users will start asking wtf......

Message 31 of 70
matthew_taylor
in reply to: Anonymous

I hear you. It is what it is.

See what happened to AutoCAD with LISP viruses though?

While they make a bit of sense in Revit 2017, this signing will be an invaluable security measure when FORGE takes over the world in the near future... 😉

 

Once you create the certificate for yourself, you can add the certificate to other computers. To me, it was 'would I rather click this button 20 times every time I start up Revit, and put hundreds of my users through the same thing?' When you start talking big numbers, it puts the positives down to time saved (with the bonus of security).

 

If your users click that button every day, what happens when they really need to think about whether they want to load it or not (with an external add-in)?

 

Bite the bullet.


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
Message 32 of 70
neil.smithline
in reply to: Anonymous

Regarding

This whole thing is so silly. I mean its a Revit addin we are talking about here, not an attempt by Anonymous to destroy everything Revit in architectural firms all over the globe. 

as Matthew Taylor points out, that is not the case. The AutoCAD Medre virus stole 100's of thousands of documents and emailed them to China. But the threat being real doesn't justify a lacking implementation on our part.

 

While we made every effort to sign all Autodesk add-ins, it sounds like we missed a few. In general, if an Autodesk add-in is not signed, that should be treated as a bug and reported to Autodesk support so that we can fix it. I'm unfamiliar with the Roombook add-in, but I'll see that it gets signed. 

 

Unlike Windows, Revit has a mechanism for remembering that you've said "Always Load" on an unsigned add-in. If that box isn't working for you, whether the add-in is signed or not, that is a bug (provided that you're not updating the add-in between uses). Besides just being unfriendly, as Matthew points out, repeatedly seeing that dialog leads to user fatigue. This contributes to users making bad security choices when a dialog is presented for a real threat. (Even I find myself reflexively clicking the "OK" buttons on security dialogs - very bad.) In short, I view excessive dialogs as a security problem that we must fix. I'm not exactly how to investigate this problem further. I'll talk to our support organization and someone will get back to you.

 

Neil

 

PS: I think I've already mentioned this, but I'll repeat it: I think that code signing and user prompts are not a great design. They interrupt workflow and rely on users making difficult decisions based on limited information. Not a recipe for success. Unfortunately, code signing and user prompts are state of the art. Windows, Linux, and MacOSX, along with major browsers use this mechanism. We'll continue to fine-tune our implementation and investigate alternative technologies as they become available. 



Neil Smithline

Revit Software Security Architect
Message 33 of 70

Regarding:


@matthew_taylor wrote:

 

That said, I think the 'always load' label is misleading.

I think the labelling is generally a little odd. It's about trusted publishers, not about trusted add-ins...Well the add-ins are trusted because they have a trusted publisher. 


I agree that "Always Load" is a _bit_ misleading when you are prompted for allowing a signed add-in as you are actually permitting all add-ins from this publisher (well, actually from this publisher when signed with this certificate). On the other hand, "Always Load" is exactly what we mean when you are prompted for an unsigned add-in as selecting it will only permit that add-in to be silently loaded in the future. After quite a bit of usability research (we may have spent as much time designing the dialog as we did implementing the cryptography), we felt that this distinction was small and unimportant to most users and that consistency between dialogs for signed and unsigned add-ins was more important than 100% accuracy. 

 

I'd be interested in hearing if you see any serious problems with the wording or dialog design. Especially if you feel that the current design leads to users making bad security decisions. 



Neil Smithline

Revit Software Security Architect
Message 34 of 70
Anonymous
in reply to: neil.smithline

I understand that a certain level of security is needed. My gripe isn't the security, it's more the lack of functionality from a user standpoint. Keep in mind I live in a world where every click on a computer screen is time and time is money. If I could click the appropriate box to "Always Load" and have the software continue to do so silently, unless of course something changes within the code, it wouldn't be an issue.

 

I consider myself pretty technologically literate but when I started to delve into how to dismiss what I thought was a simple dialog box I started to see that it wasn't just an easy click it and its gone process. When you start asking architectural and engineering firms to have to lean on their IT consultant to just run software that was meant to make you more productive and efficient it defeats the purpose to an extent.

 

Like I said earlier I can see if third party publishers do not realize they need to provide signed certificates on their addins, or if they don't charge anything for their addins and can't afford the certification process, but I would have thought all Autodesk addins would be compliant by now.

 

Again my frustration is not the security itself, its the lack of a simple and efficient way to accept it once and move on.

 

Thank you for your responses.

Message 35 of 70
neil.smithline
in reply to: Anonymous

Hey Jason - I've been trying to reproduce the Roombook problems that you are having and can't. The add-in loads silently for me. I also tracked down the responsible party in Autodesk and they are unable to reproduce it as well. I am using Revit 2017 and the Revit 2017 Roombook extension. I'm not sure if it makes a difference, but I downloaded the extension from the Autodesk Desktop App. What versions are you using? Is there any other information that you can think of providing to help us reproduce the problem?



Neil Smithline

Revit Software Security Architect
Message 36 of 70
Anonymous
in reply to: harrymattison

Neil, I will look when I get back in the office tomorrow morning. There are about 7 total I believe that are problematic.
Message 37 of 70

Hi Neil,

Thanks for your comments and clarifications.

 

I'm not particularly bothered by the dialog language or design. It's very hard to describe something technical in a succinct and clear manner, and have it understood by everyone who reads it.

It's my job as a developer to take this complexity out of the user's hands. My people haven't even seen this dialog (with respect to in-house apps).

I think the load for public publishers is heavier, but a necessary risk mitigation exercise.

 

-Matt


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
Message 38 of 70
Anonymous
in reply to: Anonymous

Neil here is a few screenshots...

 

I have 4 or 5 more but i am limited to 3 images in one post so i will add another post with the rest

Message 39 of 70
Anonymous
in reply to: Anonymous

more screenshots....

Message 40 of 70
Anonymous
in reply to: Anonymous

more screenshots....

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community