Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatic updates - what is 'adequate' security?

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?

-Adam

like image 312
Adam Davis Avatar asked Feb 23 '09 17:02

Adam Davis


2 Answers

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.

like image 185
Zoredache Avatar answered Sep 29 '22 22:09

Zoredache


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

like image 21
driis Avatar answered Sep 29 '22 21:09

driis