LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Do We Need Secure Boot? (https://www.linuxquestions.org/questions/linux-security-4/do-we-need-secure-boot-4175438831/)

Agon 11-26-2012 08:06 PM

Do We Need Secure Boot?
 
There are ongoing debates on how one needs to protect his/her computer from malicious code which modifies pre-boot process(es). There are also articles and blogs talking about what we (alternative OS users) can do to tackle the troubles secure boot will bring us. However, as long as I understand it, the whole mess is forced down our throat only to cover a single company's a**, who is not doing a good job protecting its crappy flagship product. We don't really have that kind of malware in the *nix land so far which is feasible in a technical perspective, do we?

Also, I'm thinking of replacing my old machine (desktop) and I'm going to build from parts. Are there any new motherboards available out there without the mentioned trouble (i.e. secure boot)?

Ser Olmy 11-26-2012 08:24 PM

"Secure Boot" prevents the boot loader on a motherboard from loading non-signed boot code. No more, no less. If the only malicious software in existence were programs modifying the boot loader then yes, that would protect users from malware.

However, if malicious software can exploit security flaws in the OS or device drivers, then "Secure Boot" offers absolutely no protection. And of course, that's exactly how most malware works.

The idea behind "Secure Boot" is to establish a trust chain from pre-boot to a user session. Users can be prevented from loading software and drivers by OS enforced signing mechanisms, and the OS itself cannot be modified without compromising the boot signature. Result: The user has very little control over the environment in which his/her software runs, and that is the entire point. No way to circumvent DRM.

TobiSGD 11-26-2012 08:26 PM

Quote:

Originally Posted by Ser Olmy (Post 4837605)
Result: The user has very little control over the environment in which his/her software runs, and that is the entire point. No way to circumvent DRM.

And no way to circumvent corporate policies. In corporate environments Secure Boot actually makes sense. Most home users forget that not every machine is standing in a private environment.

Ser Olmy 11-26-2012 08:45 PM

Quote:

Originally Posted by TobiSGD (Post 4837606)
And no way to circumvent corporate policies. In corporate environments Secure Boot actually makes sense. Most home users forget that not every machine is standing in a private environment.

Corporate policies are enforced by the OS. I don't see how Secure Boot improves security in that scenario.

A user who intentionally tries to circumvent corporate policy will probably be able to do so, Secure Boot nonwithstanding, provided he/she has access to the right tools or the knowledge to create them. After all, if malware can exploit security vulnerabilities in the OS (or in drivers or applications) so can a user, especially one with physical access to the hardware.

frankbell 11-26-2012 09:01 PM

Quote:

In corporate environments Secure Boot actually makes sense. Most home users forget that not every machine is standing in a private environment.
That does not justify requiring all machines, even those purchased for home use, to have Secure Boot implemented.

That only justification for that is to conclude that the forces behind Secure Boot are attempting to implement their own walled orchard, a la Apple. Whatever the theoretical dangers of root kits may be, the impulse behind requiring Secure Boot as a condition of sale ("Windows Certified") is clearly anticompetitive.

TobiSGD 11-26-2012 09:18 PM

Quote:

Originally Posted by Ser Olmy (Post 4837613)
Corporate policies are enforced by the OS. I don't see how Secure Boot improves security in that scenario.

A user who intentionally tries to circumvent corporate policy will probably be able to do so, Secure Boot nonwithstanding, provided he/she has access to the right tools or the knowledge to create them. After all, if malware can exploit security vulnerabilities in the OS (or in drivers or applications) so can a user, especially one with physical access to the hardware.

Corporate policies enforced in the OS are worth nothing if a part-time admin is able to boot the machine with a Knoppix CD. This approach does not work, not even after resetting the BIOS with the usual tricks, when Secure Boot is enabled without leaving traces.

Quote:

That does not justify requiring all machines, even those purchased for home use, to have Secure Boot implemented.

That only justification for that is to conclude that the forces behind Secure Boot are attempting to implement their own walled orchard, a la Apple. Whatever the theoretical dangers of root kits may be, the impulse behind requiring Secure Boot as a condition of sale ("Windows Certified") is clearly anticompetitive.
If Secure Boot must be implemented is more or less meaningless when the same standard that enforces the implementation enforces that there must be a possibility to disable it and a possibility to add custom keys.

frankbell 11-26-2012 09:27 PM

Quote:

If Secure Boot must be implemented is more or less meaningless when the same standard that enforces the implementation enforces that there must be a possibility to disable it and a possibility to add custom keys.
The key word there is "must."

The "must" is a marketing requirement of a software company whose marketing practices have long been less than sterling, not the recommendations of a neutral security taskforce or certification organization.

Keywords: marketing requirement.

Whatever the pros of Secure Boot may be, the motives for it are--er--unlikely to result from the disinterested concern of Microsoft in the sterling computer habits of its users.

TobiSGD 11-26-2012 09:43 PM

There are two simple reasons why there must be an option to disable Secure Boot that have nothing to do with marketing:
1. Many of their customers will do the same as always, they will buy Windows 8 licenses with options to downgrade to Windows 7 or Vista (whichever they deploy in their corporate environment). This will not be possible if Secure Boot can't be disabled.
2. The EU would sue the hell out of them for abusing their monopoly, may be even with a prohibition to sell boards that don't have the option. But they have made the option to disable Secure Boot mandatory for their certification program to prevent that.

There are also simple reasons why they have made it mandatory to provide options to implement custom keys: So that larger customers can use their own keys if wanted, may be deploying a Linux or BSD system, may be ordering Windows versions with a different key than the standard key, so that the users aren't able to boot a standard Windows install DVD.

Ser Olmy 11-26-2012 09:49 PM

Quote:

Originally Posted by TobiSGD (Post 4837626)
Corporate policies enforced in the OS are worth nothing if a part-time admin is able to boot the machine with a Knoppix CD. This approach does not work, not even after resetting the BIOS with the usual tricks, when Secure Boot is enabled without leaving traces.

With Secure Boot, you can still boot the system with a Knoppix CD using the Linux Foundation bootloader. And that same, signed bootloader can most likely be installed on the hard drive and used to inject a rootkit into the boot process.

The rule "physical access equals full access" is still valid, and the best solution is still terminal (or possibly web-based) environments and/or physically locked-down clients.
Quote:

Originally Posted by TobiSGD (Post 4837626)
If Secure Boot must be implemented is more or less meaningless when the same standard that enforces the implementation enforces that there must be a possibility to disable it and a possibility to add custom keys.

Exactly. I believe Secure Boot is really all about DRM, and that all talk about "malware protection", "security" and "hacker proofing" are just attempts to obfuscate the issue. Because, as you point out, there's just no way it can possibly work as advertised.

TobiSGD 11-26-2012 10:56 PM

Quote:

Originally Posted by Ser Olmy (Post 4837645)
With Secure Boot, you can still boot the system with a Knoppix CD using the Linux Foundation bootloader. And that same, signed bootloader can most likely be installed on the hard drive and used to inject a rootkit into the boot process.

The rule "physical access equals full access" is still valid, and the best solution is still terminal (or possibly web-based) environments and/or physically locked-down clients.

The signed bootloader from the Linux Foundation is not to make it easier for corporate environments. Corporate admins should be able to learn easily how to handle Secure Boot keys and can easily remove the Linux Foundation key (and any other unwanted keys). In that case, "physical access equals full access" is not longer valid.

Quote:

Exactly. I believe Secure Boot is really all about DRM, and that all talk about "malware protection", "security" and "hacker proofing" are just attempts to obfuscate the issue. Because, as you point out, there's just no way it can possibly work as advertised.
The Windows 8 logo certification requires that it must not be possible to change any Secure Boot key or even disable Secure Boot from Software. So malware or hackers that attack the boot process don't have a chance to get their rootkits into that process.

Ser Olmy 11-26-2012 11:37 PM

Quote:

Originally Posted by TobiSGD (Post 4837668)
The Windows 8 logo certification requires that it must not be possible to change any Secure Boot key or even disable Secure Boot from Software. So malware or hackers that attack the boot process don't have a chance to get their rootkits into that process.

This leaves OS and driver security vulnerabilities, which are by far the most common attack vectors for serious malware (corporate espionage and major fraud rather than annoying "your system is infected by viruses and you must purchase the full version of this bogus tool" trojans). For that reason, I believe Secure Boot is only marginally useful in a corporate security setting.

However, if ones primary concern is not to improve system security or stability, but rather to create a walled garden, restricting users ability to install non-signed low-level drivers (including DRM circumvention tools), Secure Boot may be the answer. (If one chooses to ignore empirical evidence regarding the effectiveness of such measures, that is; the jailbreak community has been quite successful in circumventing similar mechanisms on various smartphones.)

TobiSGD 11-26-2012 11:50 PM

And the jailbreak community are home-users, not corporate users. As I said, at corporate level Secure Boot makes sense. If you want to use it at home is a different thing, but thanks to the Linux Foundation (if you want dual boot with Windows 8) and thanks to Microsoft (if you want to run Linux only or dual boot using your own keys) it shouldn't be such a problem as most people cry it out.

Ser Olmy 11-27-2012 12:19 AM

Quote:

Originally Posted by TobiSGD (Post 4837689)
And the jailbreak community are home-users, not corporate users.

These are actually the same people in different contexts.

My comment about jailbreaking was just meant to illustrate that signed binaries are only as effective as the OS they load, and history teaches us that security vulnerabilities are quite common. One of the first (if not THE first) driver signing circumventions on the Vista x64 platform was related to a buggy (and signed) video driver from AMD.

Quote:

Originally Posted by TobiSGD (Post 4837689)
As I said, at corporate level Secure Boot makes sense.

If circumvention/jailbreaking tools become readily available, which is quite likely, and Secure Boot offers no significant malware protection anyway due to the inevitable discovery of security vulnerabilities in the OS and in applications, how does Secure Boot improve security in a corporate environment?

TobiSGD 11-27-2012 12:38 AM

How do you jailbreak a machine without leaving traces? And if there are traces it will be very likely that you will get fired and maybe sued.

Agon 11-27-2012 02:39 AM

I'm sorry people, but I think my questions still remain:

1) Is there any exploit code that works on Linux which can modify the boot sector without acknowledge of the end user? And how feasible is it?

2) Are there any newly manufactured motherboards without Secure Boot (not being able to disable the feature) available on the market today?

TobiSGD 11-27-2012 06:59 AM

Quote:

Originally Posted by Agon (Post 4837758)
I'm sorry people, but I think my questions still remain:

1) Is there any exploit code that works on Linux which can modify the boot sector without acknowledge of the end user? And how feasible is it?

All boards with Secure Boot use UEFI, so the boot sector is irrelevant. There is the possibility that an exploit (which gets root privileges) modifies the bootloader itself, which would result in a non-booting system with Secure Boot enabled, unless the modified bootloader is signed with a key that is present in the firmware. It is however (or should be) not possible to change keys from a running OS.
With Secure Boot disabled there is nothing to prevent a hacked system from booting.

Quote:

2) Are there any newly manufactured motherboards without Secure Boot (not being able to disable the feature) available on the market today?
This question does not make much sense in this form. Mainboards without Secure Boot (which are available) do not need a feature to disable Secure Boot.

ntubski 11-27-2012 09:52 AM

Quote:

Originally Posted by TobiSGD (Post 4837626)
Corporate policies enforced in the OS are worth nothing if a part-time admin is able to boot the machine with a Knoppix CD. This approach does not work, not even after resetting the BIOS with the usual tricks, when Secure Boot is enabled without leaving traces.

If Secure Boot must be implemented is more or less meaningless when the same standard that enforces the implementation enforces that there must be a possibility to disable it and a possibility to add custom keys.

What stops the part-time admin from disabling Secure Boot? It seems like the only way Secure Boot can be useful against an attacker with physical access is if it's impossible to disable it.

Ser Olmy 11-27-2012 09:57 AM

Quote:

Originally Posted by Agon (Post 4837758)
I'm sorry people, but I think my questions still remain:

1) Is there any exploit code that works on Linux which can modify the boot sector without acknowledge of the end user? And how feasible is it?

Sorry for derailing your thread. The answer to the question is yes, such software has existed in the past, exploiting vulnerabilities that have since been fixed.

The boot sector does not enjoy any special protection under Linux (or Windows, for that matter). If you can write to the boot device, you can modify the boot sector. Assuming the user lacks the necessary privileges to write directly to the device, there are two common attack vectors:

1. Application vulnerability > OS privilege escalation vulnerability > boot sector modification
2. Network-exploitable OS vulnerability [ > OS privilege escalation vulnerability ] > boot sector modification

In the first scenario, the user is tricked into opening a specially-crafted file or visiting a compromised website. An application vulnerability causes code in the file/content to be executed. The code exploits an OS vulnerability to gain root privileges and alters the boot sector.

In the second scenario the user isn't really involved at all, but this will only work if the attacker can access a service on the computer remotely. A vulnerability in the OS or a remotely accessible service is exploited to inject malicious code, which then proceeds to obtain root privileges (if necessary). It then modifies the boot sector.

Quote:

Originally Posted by Agon (Post 4837758)
2) Are there any newly manufactured motherboards without Secure Boot (not being able to disable the feature) available on the market today?

There are lots of motherboards without Secure Boot. Any non-UEFI board will do, as well as boards supporting UEFI versions older than 2.2.

jens 11-27-2012 09:57 AM

Do you need it?
No

Is it useful?
Yes

NyteOwl 11-30-2012 03:07 PM

Frankly a motherboard manufacturer would be foolish to NOT have SecureBoot available in their UEFI products. Without it Windows 8 will not run and they will loose out on what is unarguably their largest market segment.

As I understand it SecureBoot is only enabled by default in systems sold with Windows 8 preinstalled, and even then there is a BIOS option to disable it (though Win 8 will refuse to boot if you do).

The biggest problem is for those who wish to dual boot Win 8 and Linux.

TobiSGD 11-30-2012 07:44 PM

Quote:

Originally Posted by NyteOwl (Post 4840443)
Frankly a motherboard manufacturer would be foolish to NOT have SecureBoot available in their UEFI products. Without it Windows 8 will not run and they will loose out on what is unarguably their largest market segment.

As I understand it SecureBoot is only enabled by default in systems sold with Windows 8 preinstalled, and even then there is a BIOS option to disable it (though Win 8 will refuse to boot if you do).

The biggest problem is for those who wish to dual boot Win 8 and Linux.

I have to correct that. Windows 8 will run fine without Secure Boot and also on non-UEFI machines (you can easily test that with Virtualbox). Microsoft wouldn't leave the market of people that are upgrading the OS on their older machines behind.

In order to get the Windows 8 Logo certification, so that you can put a sticker on the box, the mainboard must use UEFI, support Secure Boot (with an option to disable it on non-ARM systems) and has to be shipped with enabled by default Secure Boot (not true for servers, Secure Boot may be disabled).
That means that a machine that ships with Windows 8 pre-installed can be shipped without having UEFI or Secure Boot, but can also be shipped with Secure Boot enabled without an option to disable it, as long as it does not have the Windows 8 Logo certification.

Sounds counter-intuitive and a little bit ironic, but having a Windows logo is the best way to make sure that you can install Linux.

NyteOwl 12-01-2012 05:01 PM

You are of course correct regarding older systems, and self-built. I had based it on what seemed to be a discussion of commercially purchased systems with Windows pre-installed. I daresay with the possible exception of smaller makers such as local shops and such, all the major players are going to be certified/logo bearing products.

sundialsvcs 12-02-2012 10:57 PM

I don't get the impression that Secure Boot / UEFI was designed by seasoned cryptologists. I'm not persuaded that it will prove to be as technically successful as hoped, and I will hereby wager a beer that it will be gone from Windows-8 as a requirement by, say, June of 2013.

jens 12-03-2012 08:44 AM

Quote:

Originally Posted by NyteOwl (Post 4840443)

The biggest problem is for those who wish to dual boot Win 8 and Linux.

Having signed (and free of cost) Windows keys can be useful for Linux as well.
It's not just the bootloader but the entire boot chain that needs to work with it.

Handling UEFI Secure Boot in smaller distributions:
http://mjg59.dreamwidth.org/17542.html
https://www.suse.com/blogs/uefi-secure-boot-details/
https://github.com/mjg59/shim/tree/mok

NyteOwl 12-03-2012 03:10 PM

Really - depending on Microsoft for the ability to use Linux is, at least for me, NOT an option.

sundialsvcs 12-12-2012 05:56 PM

Quote:

Originally Posted by NyteOwl (Post 4841977)
Really - depending on Microsoft for the ability to use Linux is, at least for me, NOT an option.

Yeah, the problem with all such crypto-based systems is ... who do you trust as "the ultimate authority?" Alas, there really isn't an acceptable solution, not even in the world of SSL, where a few companies (e.g. Thawte) found themselves "in the right place at the right time" business-wise, but tasked with a role that realistically can't be met. (It is centralized in a way that probably has no real-world meaning.) Microsoft might dream of being the big-man on campus in this new space that they'd like to carve out for themselves, but I don't think that "Secure Boot" is going to survive for long as a technologically viable strategy. There are simply too many points of vulnerability, although it might be better than nothing-at-all... (which is the situation right now).


All times are GMT -5. The time now is 10:23 AM.