
Qubes OS: A reasonably secure operating system - ploggingdev
https://www.qubes-os.org/
======
magnat
Joanna's (Qubes OS Founder) blog [1] is a gold mine when it comes to hardware-
software boundary security. Especially "State considered harmful" [2] and "x86
considered harmful" [3] papers are eye-openers.

[1] [https://blog.invisiblethings.org/](https://blog.invisiblethings.org/)

[2]
[https://blog.invisiblethings.org/papers/2015/state_harmful.p...](https://blog.invisiblethings.org/papers/2015/state_harmful.pdf)

[3]
[https://blog.invisiblethings.org/papers/2015/x86_harmful.pdf](https://blog.invisiblethings.org/papers/2015/x86_harmful.pdf)

~~~
jstewartmobile
That's why I don't get Qubes. She knows what a steaming pile PC hardware is,
and decides to write a spinoff OS for it???

Seems like she'd have more effect designing hardware.

~~~
dillon
I believe I remember reading she aims at solving the issue of hardware and
software vulnerabilities. I can't find the source, but she mentions that
there's too much code out there that it would be impossible to secure
everything.

Qubes' design means hardware and software are all separated so a vulnerability
in one doesn't mean exposing another.

I like that in their docs they mention an approach they take and when it isn't
secure[0]

That being said the main point of security contention is the admin (dom0).

[0]: [https://www.qubes-os.org/doc/copy-paste/](https://www.qubes-
os.org/doc/copy-paste/)

~~~
jstewartmobile
But those two things are not independent. If your hardware is fundamentally
broken, hypervisors can only paper over so much.

Between the twilight of Moore's law, and the success of open-source software,
I just don't see that much long-term value left in x86+PC.

------
AaronFriel
I'm very excited that Microsoft is moving in the same direction. The feature
Windows Defender Application Guard (WDAG) runs Windows applications, right now
only the Edge browser, in a virtualization isolated container[1]. Under the
hood it's using what Microsoft calls "Hyper-V Containers", which are
lightweight virtual machines that share some host resources such as a read-
only filesystem. The closest open source analogues to that are Intel(R) Clear
Containers[2] and Qubes.

The closest you can get to Qubes on Windows would be to follow Microsoft's
Privileged Access Workstation (PAW) guide, but it requires a lot of additional
infrastructure[3]. That infrastructure allows you to do remote attestation of
the virtual machines, but makes it costly to deploy in a SMB or homelab
environment.

I don't expect it'll be very long before PAW and WDAG are usable at the same
time, with colored window borders indicating the origin virtual machine. I
hope this is on Microsoft's roadmap.

Video on privileged access workstation use, starting at a demo:
[https://youtu.be/3v8yQz2GWZw?t=41m48s](https://youtu.be/3v8yQz2GWZw?t=41m48s)

Video on privileged access workstation setup:
[https://www.youtube.com/watch?v=aPhfRTLXk_k](https://www.youtube.com/watch?v=aPhfRTLXk_k)

[1] [https://docs.microsoft.com/en-us/windows/threat-
protection/w...](https://docs.microsoft.com/en-us/windows/threat-
protection/windows-defender-application-guard/wd-app-guard-overview)

[2] [https://clearlinux.org/features/intel®-clear-
containers](https://clearlinux.org/features/intel®-clear-containers)

[3] [https://docs.microsoft.com/en-us/windows-
server/identity/sec...](https://docs.microsoft.com/en-us/windows-
server/identity/securing-privileged-access/privileged-access-workstations)

~~~
mtgx
I'm only half-excited about this because I worry Microsoft has no intention to
do either one of these:

1) Support anything other than Edge/its own apps

2) Allow the feature to be accessed by users of all Windows editions

I understand for now it's still experimental and whatnot, but I'm not getting
my hopes up.

------
Jeaye
What I'd really love to see is a marriage between NixOS and Qubes, allowing
for full-system declarative configuration, including the various systems which
will be running under Qubes.

NixOS has containers that show how this could work, but they're only via
systemd-nspawn, so not as jailed as Qube's domUs.

~~~
akavel
Me, I'd like to see such a marriage between NixOS and GenodeOS (which provides
capabilities management and has the advantage of using a microkernel as base,
so much smaller attack surface, aka TSB, than Xen + Linux)

[http://www.genode.org/about/index](http://www.genode.org/about/index)

~~~
ohpauleez
Genode now has its own package management system with the 17.05 and 17.08
releases, informed/inspired by the work from Genode/Nix (linked in the other
comment).

This means you can run Genode on NOVA with VirtualBox 5 fully integrated as
the VMM, all with the improved Noux/POSIX interop components in place, and
have a decent package management solution (that handles API compatibilities,
multiple version installs, src vs binary deps, packages, and more). There's
also Xen support with the most recent release (for cloud appliance work with
Genode)

What's more, based on the roadmap and challenges, they should be bringing
VirtualBox5 support to the seL4 kernel, and they even have a goal for being
the virtualization foundation of QubesOS.
[https://genode.org/about/challenges](https://genode.org/about/challenges)

With the recent toolchain update and new package management system, its easier
than ever to cook up your own Genode-based systems.

~~~
akavel
Interesting, thanks for the info! Though from the article about the system
([https://genode.org/documentation/developer-
resources/package...](https://genode.org/documentation/developer-
resources/package_management)), it's not clear to me how to:

a) tweak compilation flags of libraries & apps

b) describe full set of runtime config files of an app

and thus build a single full configuration of a whole system, like in NixOS.

Hm; or can this maybe somehow be solved with the "run scripts" mentioned at
the end of the article? I'm even less than a noob with regards to Genode, so
I'm not sure about that.

Or does the package manager only provide Nix-like functionality, with no way
for NixOS-like features?

------
xtanx
I've been running Qubes 3.2 for about 10 months on a intel skull canyon nuc. I
love it.

I have separate vms for media and browsing, for music (spotify), development
(python, rust), skype, personal email, work email and password manager.

It needs 16gb of ram to be able to run all of these at once and about 150gb of
disk if you actually create separate template vms.

My only real pain was coping and pasting between all of these vms (you need to
ctrl+c then ctrl+shift+c for copy and the ctrl+shift+v, ctrl+v for paste [1])

I solved that with a custom solution that automatically distributes the
clipboard contents (for text only) to multiple vms (depending on the source of
the clipboard change). I know it defeats the purpose of isolation for the
clipboard but it's ok for my use case.

[1] [https://www.qubes-os.org/doc/copy-paste/](https://www.qubes-
os.org/doc/copy-paste/)

------
snvzz
Their weakest point is the hypervisor, Xen, which while a better choice than
Linux/KVM, is still extremely bloated and has a poor security history.

Thankfully, better designs such as seL4's VMM do exist, although it might need
a little more work [1] until usable for the purpose.

[1] [https://sel4.systems/Info/Roadmap/](https://sel4.systems/Info/Roadmap/)

~~~
mmrezaie
Xen's hypervisor's size is very small. Qubes is about security and
trustability of the whole system. In operating systems for measuring the
trustability of the system, one very important measure is the lines of the
code. Xen has a smaller footprint in the hypervisor part. Additionally, Xen
has a robust model isolation for the drivers. That's why they went for Xen not
KVM. But boy I wish to see more seL4. It was sad to see Gnu Hurd/seL4 didn't
make it.

~~~
xyzzyz
The problem with Xen is that no major industry player is backing it,
especially with Amazon going KVM now.

(disclaimer: working at Google on virtualization security)

~~~
ryacko
Any chance Google will sponsor secure processor architecture standards?

I mean, the US government no doubt had influence on the Trusted Computing
Group (too bad the EFF totally shunned it), and through the magic of product
binning and chip fab costs, we all have trusted platform modules.

ASLR currently seems wimpy.

I'm certain you are in a position to accomplish a great deal, no matter where
you are in the hierarchy. Maybe the future is x86 hardware emulation for user
mode processes.

~~~
standupstandup
It's Intel pushing that stuff forward, with SGX.

~~~
ryacko
Then from recent Defcon and Black Hat talks, they are an absymal failure. (
[https://www.youtube.com/watch?v=lR0nh-
TdpVg](https://www.youtube.com/watch?v=lR0nh-TdpVg) Memory Sinkhole -
Unleashing An X86 Design Flaw Allowing Universal Privilege Escalation ) (I
don't understand it beyond what everyone says it can achieve)

Intel should be considered to be totally unreliable and incompetent.

I mean, no one buys office store safes and expects their things to be secure
in them. But a processor is a little more expensive than a cheap safe and
holds more valuable things.

Edit: and besides, Fortezza is an SSL protocol option.

~~~
ryacko
>SGX is designed to shield software against SMM exploits.

Perhaps if we add one more thing, x86 will finally be secure. You are right,
Intel should be left to their own devices.

~~~
standupstandup
I'm not arguing that x86 will ever really be secure. However you handwaved a
hypothetical "secure processor architecture". Realistically the way you do
that is by making a very simple CPU, however, that would then be too slow to
be usable for many applications. As a consequence nobody is doing so.

SGX is at least a middle ground - it integrates the memory access checks very
deep into the memory access circuitry, sufficiently deep to block all other
privilege levels on the CPU. Whilst there may well be implementation flaws in
SGX itself so far most attacks have been mounted via side channels, not
directly exploiting CPU bugs.

In this sense my original statement was correct. Intel is pushing secure CPUs
forward more than any other vendor.

~~~
ryacko
I think a secure processor is very complex, not very simple. The smartest
person's working memory cannot operate on more than a few hundred lines of
code. A high performance processor that induces a fault when a programming
error occurs is certainly very complex.

It is the wrong sense. Intel is playing catchup more than any other vendor and
are selling a product that is nothing more than a bunch of cobbled together
features, my opinion in the view of the statement that AMD is glued together.

~~~
nickpsecurity
They're actually pretty simple if you're mostly trying to defeat
software/firmware attacks. You just add some part to run in parallel with the
processor, which can be arbitrarily simple or complex, that checks certain
things about the data such as length or data type. The first one was
implemented in 1961 hardware with it being secure from code injection until
the invention of ROP. That's a long time. I'll add a modern take on that which
led to a flexible mechanism that can do a dozen or maybe more policies.

[http://www.smecc.org/The%20Architecture%20%20of%20the%20Burr...](http://www.smecc.org/The%20Architecture%20%20of%20the%20Burroughs%20B-5000.htm)

[http://www.crash-safe.org/papers.html](http://www.crash-safe.org/papers.html)

A more complex one is below that was also designed by one person for his
dissertation. Knocks out all kinds of issues without modifying the processor.
It has stuff to improve for sure but it think it proves the point pretty well.
The stuff corporate teams were designing comes nowhere near this because they
don't know much about high-security design. A critical part of that isn't
features so much as a balancing act between what protection mechanisms do and
don't that tries to minimize complexity to low as is possible.

[https://theses.lib.vt.edu/theses/available/etd-10112006-2048...](https://theses.lib.vt.edu/theses/available/etd-10112006-204811/unrestricted/edmison_joshua_dissertation.pdf)

And one open-source one on MIPS for capability-based security that runs
FreeBSD:

[https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/](https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/)

A company or group of hardware volunteers could develop this into something at
least as usable as a multi-core ARM CPU on RISC-V or OpenSPARC. It wouldn't
take tons of money esp if they worked their way up in complexity. The hard
stuff is already done. People just need to apply it. They could even pay these
academics to do it for them with open-sourced results. They even get a huge
discount on the EDA tools that can be six digits a seat.

You're right that Intel is screwing up and playing catchup cobbling together
features. There was stuff in the available literature better than most of what
they're doing. They even have a separation kernel from Wind River they're not
employing. Managers without security expertise must be pushing a lot of this
stuff.

~~~
gggvvh
Ain’t no problem that couldn’t be solved by adding another layer of
indirection, eh?

~~~
nickpsecurity
Maybe in web or application software. In hardware, it all runs in parallel.
The mechanism of something like SAFE becomes another component receiving input
in the CPU pipeline. A conditional of sorts is added so the final write back
to whatever memory doesn't happen unless the safety/security checks passed.
The failure mode might also do an interrupt for OS so it could log the where
and why of the failure. As in, application flaws could be patched quickly.

------
drawnwren
I ran Qubes on a laptop for a while. 1) It's a huge battery hog. 2) It's a
real pain to run a non rolling release distro (i.e. Arch). Some dependency is
going to try and upgrade itself that can't and it will brick your whole
distro. Even being locked to a specific release proved a bit of a pain. It
just adds a lot of complexity to your day to day operations (i.e. opening a
program is a tiny bit more complicated) that turned out to be a huge drain for
me.

~~~
kakarot
Running an HVM with a separate kernel should alleviate those problems. Qubes
is phasing out PV support anyway.

I encounter an equal amount of complexity in my KVM workstation as I did in my
Qubes workstation, and _more_ problems.

For example, lack of a secure copy/paste mechanism, meaning I must type
passwords by hand to avoid every VM being exposed to the clipboard.

------
notfed
Note that while Qubes OS uses full-disk encryption, it runs on Xen, which does
not support hibernate.

This means that, if you use this OS on a laptop, you'll be vulnerable to cold-
boot attacks, even after you close your lid, unless you configure it to
shutdown on lid close. (I.e., if a highly skilled adversary steals your laptop
then, even if your laptop lid is closed, they will be able to read your RAM
and therefore decrypt your entire hard drive.)

Despite the major security implications, it doesn't sound like a fix will be
implemented any time soon. [1]

[1] [https://github.com/QubesOS/qubes-
issues/issues/2414](https://github.com/QubesOS/qubes-issues/issues/2414)

~~~
bearbearbear
If a highly skilled thief wants to break into my house they could jimmy the
latch on the window and let themselves in.

I don't have any bars on my windows to prevent that.

You need to draw the line somewhere.

~~~
carlmr
Yeah, I'd say it depend on if you're a normal user or Edward Snowden. Do you
have really sensitive data that could cost you your life? Then you have to
worry about these edge cases. Are you a normal guy who wants to browse for
porn safely, then this is already pretty good privacy.

~~~
notfed
Do you consider your credit card number sensitive? Your username and passwords
to all of your, bank accounts, social media accounts, and email accounts? Your
personal photos? Your personal notes with personal information about your
family? Your track record of your interests and hobbies?

I do. And, if I have a choice, I'd rather not have to wonder if this data is
in the hands of a stranger after my laptop is stolen.

~~~
carlmr
It has to be stolen a) while it's on, and b) by someone who immediately knows
what to do.

I'm quite sure if you look at your average thief and multiply these to chances
together that's less than one in a million chance to happen. Assuming you're
not some high profile person where the right person is out to get you and
knows which OS you use, and knows how to steal from you.

------
spiraldancing
Whatever happened to the Qubes-Purism marriage? They were on track to start
Qubes-certifying Librems, and selling Librems with Qubes pre-installed ...
then they cancelled the plans, and I never heard why?

~~~
xkarga00
FWIW, it seems that when you buy a Purism laptop there is an option to include
a Qubes live usb in the deal. I just came across it while skimming through
their website[1], not sure about anything else.

[1] [https://puri.sm/shop/librem-13/](https://puri.sm/shop/librem-13/) \- see
the Operating System choice

~~~
spiraldancing
Thanks. I know about that. They used to sell Librems that had Qubes pre-
installed, and they were on-track to get Librems to be the first officially
certified hardware for Qubes. Then they canceled the whole thing, and now, as
some kind of consolation/compromise, they offer Qubes-on-a-stick purchase
option.

------
superasn
Can it also protect against key-loggers, i.e. if i'm running an app in a qube,
can an app in a different qube read my keystrokes?

~~~
0x17A
Yes, it will protect against keyloggers. Unless you install the keylogger on
both qubes.

You can have a separate "qube" that is not connected to the network where you
would store your passwords, etc.

------
jnwatson
10 years ago, I helped design a similar system. It was a capabilities based OS
on a formally modeled microkernel.

I'm still not sure than there's a market for this stuff. It must be free, and
it's hard to build a business model around that.

~~~
nickpsecurity
When Joanna said nothing like Qubes existed, I told her INTEGRITY PC was doing
it around 2005 using separatiom kernel approach with stronger security. You
must have worked on that one given 10 years remark. Im curious about your
experiences with that. Email me if you want details confidential. Rarely meet
folks doing the kinds of architectures I research and push for further
adoption.

------
tonetheman
I wish there was a way I could try it. The hardware requirements ...

[https://www.qubes-os.org/doc/certified-hardware/](https://www.qubes-
os.org/doc/certified-hardware/)

Is anyone running this on a laptop? I get the feeling after reading that page
that this is really strictly desktop only. Maybe the page has not been updated
in a bit?

~~~
hyperfekt
I'm running Qubes 3.2 on my laptop right now (Dell Latitude E5470) and it also
fulfills all the requirements to run 4.0.

The _certification_ requirements are higher, but that's basically if people
want to stick the Qubes-certified label on their devices, signaling to
customers that it measures up to the highest standards of security.

They're not necessary to run Qubes, they're just ideal.

------
txgvnn
How about Subgraph OS? It has grsecurity patch, tor network, container
isolate, firewall. It's another good choice also

[https://subgraph.com](https://subgraph.com)

------
bsdnoob
openbsd vs qubes os, which one will you prefer?

~~~
JoachimSchipper
As an OpenBSD fan: consider Qubes instead if you want a "desktop" experience.
OpenBSD works fine, but the open-source desktop is quite vulnerable (consider
how many things need to go wrong for
[https://scarybeastsecurity.blogspot.nl/2016/12/redux-
comprom...](https://scarybeastsecurity.blogspot.nl/2016/12/redux-compromising-
linux-using-snes.html)), and a lot of OpenBSD's hardening is in the (simpler)
base system, not in GNOME / KDE / Firefox / Chrome / ...

Alternatively, consider not running a full-blown desktop or using Windows,
which has grown a _lot_ more secure since the Windows XP pre-SP2 days.

~~~
rebuilder
Wow, your recommendation for desktop security is either not running a full-
blown desktop or running Windows? As in, Windows beats the popular Linux
distros in desktop security?

------
jlgaddis
Damn, I was really hoping this was an (early) announcement for 4.0 (or at
least an -rc3).

~~~
0x17A
Same here. I'm waiting for 4.0.

------
known
I use
[https://en.wikipedia.org/wiki/Lightweight_Portable_Security](https://en.wikipedia.org/wiki/Lightweight_Portable_Security)

------
partycoder
QubesOS won't protect you from Intel ME though.

~~~
bluepirate
Purism laptops do.

~~~
morganvachon
I wouldn't trust that company at all, they lied and misrepresented themselves
for nearly three years before finally claiming to make good on what they sold
their customers. Beyond that, they didn't fix it themselves as they say, they
relied on the work of other projects then claimed they did it alone.

Considering the researchers who actually disabled IME require physical access
to the machine[1], Purism's claim that they can do it to previously sold
devices with only a software update[2] stinks of BS to me.

[1]
[https://wiki.gentoo.org/wiki/Sakaki%27s_EFI_Install_Guide/Di...](https://wiki.gentoo.org/wiki/Sakaki%27s_EFI_Install_Guide/Disabling_the_Intel_Management_Engine)

[2] [https://puri.sm/posts/purism-librem-laptops-completely-
disab...](https://puri.sm/posts/purism-librem-laptops-completely-disable-
intel-management-engine/)

~~~
floatboth
IIRC they didn't really lie, everything was always worded like "will be free
in the future".

Also the post you linked to directly gives credit to me_cleaner and Positive
Technologies.

The reason the researchers required physical access:

> Although some systems do allow the full contents of the BIOS flash chip to
> be reprogrammed using software tools only (so called 'internal flashing'),
> on most PCs this facility is either completely unavailable, or can only
> write to the unprotected areas of the flash filesystem (excluding the ME
> area), or will only write vendor-signed images. Accordingly, we will
> describe the approach of using 'external' flashing in this guide, as that is
> the most reliable.

Purism being, uhhhh, the vendor, allowed full write access.

~~~
morganvachon
> _" Purism being, uhhhh, the vendor, allowed full write access."_

If that was the case they could have shipped IME-free machines from the start.
They are selling whitebox machines for an exorbitant markup with their own
spin on a Linux distro.

~~~
cyphar
That's incorrect. Allowing internal flashing just requires setting certain
parameters in the flash to being read-write, and doesn't require any of the
flash modification necessary to disable IME.

Disabling IME can have other impacts, and Purism even has a blog post
explaining what the issues were and how they resolved them -- once they
figured out what IME modules were needed for their laptop to work properly
they _could_ disable IME with a software update.

I don't know if that's how they did it, but you're misunderstanding the
difference between disabling IME and enabling internal flashing.

------
mtgx
Version 4.0 should be out soon (at RC2 now):

[https://www.qubes-os.org/news/2017/10/23/qubes-40-rc2/](https://www.qubes-
os.org/news/2017/10/23/qubes-40-rc2/)

Some exciting changes are coming:

[https://www.qubes-os.org/news/2017/10/03/core3/](https://www.qubes-
os.org/news/2017/10/03/core3/)

[https://www.qubes-os.org/doc/releases/4.0/release-notes/](https://www.qubes-
os.org/doc/releases/4.0/release-notes/)

EDIT: Downvotes for providing relevant sources, really?

~~~
ZenoArrow
> "EDIT: Downvotes for providing relevant sources, really?"

Sometimes the downvotes on HN make no sense. Looking through your comment
history there are a number of recent comments that were unfairly downvoted.
Just a guess, but I wouldn't be surprised if it was the same people doing it.

~~~
Drdrdrq
It would be interesting if HN detected such behaviour... Then it could ignore
some downvotes. I know it doesn't sound like much, but undeserved downvotes
hurt...

------
qrbLPHiKpiux
Fun fact. The developer does not believe in using a password on her private
keys.

~~~
trizinix
If you have your keys on an air gapped computer with an encrypted hard-disk, I
don't see the need to use an additional password on the private keys.

~~~
hateduser2
If they somehow break the encryption on your hard disk it’s just more
security.. isn’t that what security’s all about? Getting the most safety you
can get? What need is there to have an encrypted hard drive if your computer
is air gapped? It’s just a better safer idea, no?

~~~
avar
Security is not about getting the most safety you can get. Otherwise why stop
there? You could store the password protected private key itself as an
encrypted file on the encrypted disk, and add one more layer, or double-
encrypt it and add yet another layer etc.

