openquantumhardware / qick

QICK: Quantum Instrumentation Control Kit
MIT License
192 stars 81 forks source link

Clean up quick-start guide and improve security recommendations #265

Closed meeg closed 4 months ago

meeg commented 4 months ago

This update is motivated by our desire to address the concerns raised in #263 regarding the security weaknesses in the default PYNQ OS configuration; we thank @unprovable for raising these concerns and suggesting mitigations.

unprovable commented 4 months ago

Re: the security update writeup

This is a significant improvement! It's great to see that you're highlighting the risks and asking people to consider explicitly what security steps they may need to take, which is awesome!

Our only comments might be:

We hope these comments help - but also want to thank you for taking the concerns we raised so seriously.

unprovable commented 4 months ago

For one illustrative example - humanly generated passwords tend to get written on whiteboards, whilst SSH keys or computer-generated passwords tend not to be. Here's the Event Horizon team disclosing an admin password in a documentary about their work: https://www.linkedin.com/posts/ken-munro-17899b1_er-thats-the-admin-password-on-the-whiteboard-activity-6523314223945117696-878F

meeg commented 4 months ago

Yes, right, I'm aware - I don't want to be prescriptive about passwords because a password strategy that doesn't fit in a group's flow is more likely to be ignored or applied poorly (e.g. whiteboard).

Password managers, password generators, and SSH keys are good things to mention and will make it in the next time this guide gets updated, but password managers don't mesh very well with SSH, and SSH keys aren't trivial to set up with PuTTY (easy for you and me, but there are some points where a new-to-SSH Windows user can get stuck - and the typical QICK user really is a Windows user who needs a step-by-step walkthrough for anything in the *nix world), so there is no golden path here and these are going to stay at the level of "these are some other options you should consider to enhance security, here are some links to learn about them."

To keep this all in the right context - I think it's important to give users the right security concepts and tools for their toolbox and help them make their systems appropriately secure, but very few QICK systems go on any network other than a private LAN, and I know of no QICK systems where an attacker could accomplish anything other than destroying the QICK (even there it's not obvious that you could do anything more than delete everything, which would ruin a grad student's week but that's it).

unprovable commented 4 months ago

If you can help with us setting up a virtual machine that runs PYNQ, or know of (semi-)official ways of doing so, we will competently demonstrate the risks. We did write a short summary of 4 potential risks on our blog post about this work. Cf. the section "How would an attacker use this bug?".

I'll get to work on creating a demo as I explore this system more. Sadly, as I mentioned, I can't afford a $15k controller, but maybe we can demonstrate in a virtual machine or on a cheaper board like the Kria boards that support PYNQ :)

meeg commented 4 months ago

The thing is, QICK is a research tool - nobody is using QICK to run quantum circuits where the result itself is of value, nobody is renting out QICK-based hardware as a service.

Your blog post is correct on the technical side, and that's what we responded to. Where it speculates about applications and impact, I take issue. The cure for that is not running the OS (it really is pretty much just Ubuntu) or even getting a board, it's reading up on what people are doing with QICK.