[Cryptography] How to solve the hen-and-egg problem

Ralf Senderek crypto at senderek.ie
Sat Aug 1 03:10:58 EDT 2015


On Fri, 31 Jul 2015 23:53:27 Tom Mitchell writes:

> On Fri, Jul 31, 2015 at 1:34 PM, Ben Laurie <ben at links.org> wrote:
>      On Thu, 30 Jul 2015 at 08:37 Ralf Senderek <crypto at senderek.ie>
>      wrote:
>      While static code analysers will work with C code, they might be less
>      valuable when it comes to reviewing the ksh scripts. These scripts
>      represent the logic of the message encryption scheme and a review
>      needs to focus on the security of the ideas, they're based on.
>
>
> Perhaps you should consider writing those scripts in a language that 
> lends itself to analysis?
>
>
> How are the scripts being used?

> Scripts that run with SUID/SGID permissions are difficult.
> Many *nix disable the SGID/SGID permission bit for scripts because of 
> the security challenges.
> http://stackoverflow.com/questions/18698976/suid-not-working-with-shell-script 
> [stackoverflow.com]
> 
> If SUID/SGID is not an issue then never mind...

No, there is no SUID/SGID set on any of the scripts.
While the GUI is beeing installed the name of the user is
required and only this user will be put into /etc/sudoers
to be able to run the main script "cbcontrol", which has
(700 root root) permissions. This script calls all others.

There are a number of advantages:

   1) The masterkey can have root read-only permission when
      it is stored on the USB, so read access to the filesystem
      as the user would not reveal the masterkey to an attacker
      that gains access via the network.

   2) Using the cbcontrol program by an attacker that has gained
      execute permission as the user would require his login
      password (asked for by sudo via openssh-askpass).

   3) Anyone with the intention to subvert the installed
      Crypto Bone software would need execute permission
      as root, in which case the battle is already lost,
      in case all-in-one mode is used.

   4) In REAL mode, even then the Crypto Bone software is safe.

The cbcontrol script will handle the commands that are
generated by the GUI either by itself (if it is in
all-in-one mode) or sent it to the real, separate Crypto Bone
if it is in REAL mode. To do the later, the ssh private key
need to be used, which is also stored with (400, root root)
permissions.

The next step might be to use a mobile phone as an decryption
oracle for the measterkey and the local key, so that
both can be stored encrypted on the local computer.

I hope that answers your question.

      --ralf


More information about the cryptography mailing list