If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

ELF Executable Signing/Verification Comes For Linux

01-16-2013, 05:00 AM

Phoronix: ELF Executable Signing/Verification Comes For Linux

Vivek Goyal of Red Hat has published the initial Linux patches for implementing ELF executable signing and verification. This support is similar to Linux kernel module signature verification and is necessitated with the arrival of SecureBoot...

Comment

It would be if the distribution signed all their compiled binaries.
Then you can verify the integrity of the system by searching for binaries that are not signed by the distribution.

A tool that lists all non-signed binaries, and all non-distribution signed binaries.

all RPM based distributions have got that ability out-of-the-box. or maybe not exactly that- rpm -V doesn't check is a binary signed (or not), but it checks the checksum of package- if binary was modified (stripped etc), than it will notify you.
Making the list of all executables, than comparing it to the listed packages will let you know if they are executables that were not installed via rpm... you can always of course check their signatures etc.
So, in short- thing like that is already possible.

But ad rem- i'd like to be able to, let say, automatically run un-signed executables in SELinux's sandbox. Of course- I should be able to either disable it, or to add my own signature to the signature-database.

Comment

Then you can verify the integrity of the system by searching for binaries that are not signed by the distribution.

But in order to have a system with verifiable integrity, you'll also need to disable the root user (he can bypass checks), third party kernel modules (you can't sign them with the distribution's key when you build them), scripts (they can't be signed) or their interpreters (python, java, php... bash...).

I think that this feature is more useful for users to be sure of the author of binaries rather than as a lock-down measure.

Comment

So exist an key management or something like that? "One Key to Rule them all" is not an great idea and i would like it that Software Vendors can sign there own Binary. Our administrators have only to allow that Vendor and we don't have to Sign all binary by ourself.

Under Windows its easy to do that and we use this Feature with our own Workstations. You can only execute programs that are signed from Vendors that are in an white list.

Comment

Since the content is protected by license (GPL) and not technical obfuscation, this is a very welcomed feature.
Even on regular systems it makes sense as it will provide protection against bitrot and damage, even before the binary is executed.

Comment

all RPM based distributions have got that ability out-of-the-box. or maybe not exactly that- rpm -V doesn't check is a binary signed (or not), but it checks the checksum of package- if binary was modified (stripped etc), than it will notify you.
Making the list of all executables, than comparing it to the listed packages will let you know if they are executables that were not installed via rpm... you can always of course check their signatures etc.
So, in short- thing like that is already possible.

But ad rem- i'd like to be able to, let say, automatically run un-signed executables in SELinux's sandbox. Of course- I should be able to either disable it, or to add my own signature to the signature-database.

Sweet!
I wish these feature were available on .deb / apt-based distributions too.

Comment

Sweet!
I wish these feature were available on .deb / apt-based distributions too.

It's there, it's called debsums. Don't know if you need to install it seperately.

But these methods are not for data integrity. MD5 has collisions and so two different executables can be created with the same checksum.

This technology is about a checksum inside the programs 'physical' file which is probably signed/hashed/encrypted by some certificate (or key or whatever). Hence, it's possible to use the public (root) certificates to check this.

I find these integrity mechanisms flawed, as a vulnerable signed executable is still vulnerable. It gives a false sense of security. One might argue that you are reducing the attack surface but I would say that is not the case. Say, you exploit Java, which is relatively easy, and then root exploit into Linux. Simply place a python script and make it start at boot with a new entry into a boot script (both of which are not covered by this mechanism) and you are good to go.

And did I mention the fallacy's of Turktrust and Diginotar? Perfectly signed binaries ... now with trojans!