views:

161

answers:

4

There are a few questions (C#, Java) that cover how one might implement automatic updates. It appears initially easy to provide automatic updates, and there are seemingly no good reasons not to provide automatic updates for most software.

However, none appear to cover the security aspects of automatic updates.

  • How safe are automatic updates now?
  • How safe should they be?
  • How safe can they be?

My main issue is that the internet is, for all intents and purposes, a wild west where one cannot assume anything about any data they receive. Automatic updates over the internet appears inherently risky.

A company computer gets infected, spoofs the DNS (only a small percentage of which win), and makes the other company computers believe that the update server for a common application is elsewhere, they download the 'new' application and become infected.

As a developer, what possible attacks are there, and what steps should I take to protect my customers from abuse?

+2  A: 

The most obvious attack would be an attacker supplying changed binaries through his "evil" update server. So you should ensure that the downloaded data can be verified to originate from you, using a digital signature.

To ensure security, obviously you should avoid distributing the key for the signature. Therefore, you could implement some variation of RSA message signing

driis
+6  A: 

With proper use of cryptography your updates can be very safe. Protect the site you distribute your updates from with SSL. Sign all your updates with GPG/PGP or something else, make your clients verify the signature before applying the update. Takes steps to make sure your server and keys are kept extremely secure.

Adequate, is very subjective. What is adequate for a internet game, maybe completely inAdequate for the security system for our nuclear missiles. You have to decide how much potential damage could occur if someone managed to break your security.

Zoredache
+1  A: 

Connecting to your update server via SSL can be sufficient, provided your client will refuse to connect if they get an invalid certificate and your server requires negotiating a reasonable level of connection security (and the client also supports that).

However realistically almost anything you do is going to be at least as secure as the route via which your users get the first install of your software anyhow. If your users initially download your installer via plain http, it is too late to start securing things on the updates.

This is also true to some extent even if they get your intial software via https or digitally signed - as most users can easily be persuaded to click OK on almost any security warning they see on that.

frankodwyer
+1  A: 

there are seemingly no good reasons not to provide automatic updates for most software.

There are good reasons not to force an update.

  1. bug fixes may break code
  2. users may not want to risk breaking production systems that rely on older features
Milhous
That's a good point - reasons for avoiding automatic updates are covered fairly well here:http://stackoverflow.com/questions/558535/should-a-web-app-have-automatic-updates
Adam Davis