安全与密码学2016nccgroup.trust
理解并加固 Linux 容器
Understanding and Hardening Linux Containers
进阶 · 约 75 分钟读完前置知识:Linux 系统管理、命名空间与 cgroups、访问控制机制(SELinux/AppArmor)
导读
这是 NCC Group 发布的一份白皮书,系统梳理 Linux 容器(namespaces、cgroups、capabilities、seccomp、SELinux/AppArmor 等)的隔离机制及其安全弱点,并给出加固建议与检查清单。核心在于说明容器默认配置并不等于安全边界,需要逐项收紧。
HN 关注点:它是一份面向实战的容器安全加固参考资料,HN 读者一边认可其工程价值,一边争论其中的技术错误和 Linux 圈子忽视既有方案的问题。
HN 评论精选
这几条评论里:质疑 3 补充 1
质疑指出论文关于 /dev/random 与系统熵池的技术错误。
在容器里暴露 /dev/random 并不会危及系统熵池。这个说法在论文里出现了两次,而且是错的。
tptacek查看英文原文
Exposing /dev/random in containers does not put the system entropy pool at risk. That claim is repeated twice in the paper, and is false.
补充从架构师视角强调容器编排在生产规模化、安全审计和密钥管理上的缺口。
每个打算把容器推上生产的架构师都该把这份材料反复读几遍。规模化后的复杂性是另一回事:Rancher、Mesos/Aurora、Docker Swarm、LXD、OpenStack Containers、Kubernetes/Borg 等编排框架最近才追上容器热潮,竞争模型多得数不清,很多安全性存疑或未经审计,还遗漏了密钥管理等关键需求。容器在工作站或几台服务器上跑起来很容易,但扩展到生产部署完全是另一项挑战——即便假定你的应用栈能被正确“容器化”。
geggam查看英文原文
This..... this is the thing every architect attempting to roll containers out to production needs to read and re read Complexity at scale: Orchestration frameworks (Rancher, MESOS/Aurora, Docker Swarm, LXD, OpenStack Containers, Kubernetes/Borg, etc) are only recently catching up to the container craze, there are too many competing models to list. Many have questionable or unaudited security or leave major requirements out, such as secret management. While containers may be easy to get working within a workstation or a few servers, scaling them up to production deployment is another challenge altogether, even assuming your application stack can be properly ``containerized''
质疑批评论文只聚焦 Linux,忽视 FreeBSD jails、Solaris Zones 等更早的容器方案。
显然作者在这篇论文上花了很多功夫,努力处处可见,向作者致敬。我明白标题是《理解与加固 Linux 容器》,但个人而言,这恰恰说明了我和其他人对 Linux 世界的失望:他们活在自己的小回音室里。Linux 并不是第一个做出安全“容器”的,文中完全没有提及 Linux 之外的方案。其他方案没有这些问题,是因为那些作者真正思考过这个问题。如果 Linux 阵营愿意跳出回音室看看别人此前如何解决这些问题,这篇论文也许根本不必写。看着 Linux 一次又一次拙劣地重造轮子,实在令人沮丧。欢迎来喷。
X86BSD查看英文原文
Obviously the author put a lot of effort into this paper. Hard work shows throughout. Kudos to you sir! Granted I realize the title is "Understanding and Hardening Linux Containers". However, personally, this just illustrates my frustration and the frustration of others with the Linux world. They exist in their own little echo chamber. Linux was not the first to create "containers" that are secure. There is no inclusion of other solutions outside Linux. The reason other solutions do not have these problems is because the authors actually thought about the problem. And if the Linux camp would simply look outside their echo chamber long enough to see how others solved these problems before them this paper might not have been written. It's just simply frustrating to watch Linux reinvent some wheels, poorly, time after time. Flame on!
质疑指出论文把 MirageOS 描述为 Solaris Zones 的重新实现是错误的。
文中说“以及 Mirage OS(Solaris Zones 的重新实现)等其他系统”——我认为这说法完全不对。
nicolast查看英文原文
> and a number of other systems such as Mirage OS (a reimplementation of Solaris Zones). I'd say that's not entirely correct. At all.
相关资源
从这篇论文所有 HN 讨论帖的全部评论里整理出来的链接。
历次讨论
- 2016Hacker News 讨论帖196 分 · 106 评
同领域还值得读
如何入侵一台已关机的电脑:在 Intel ME 中运行未签名代码
How to hack a turned-off computer, or running unsigned code in Intel ME
这篇 Black Hat 2017 白皮书讨论 Intel Management Engine(ME)的安全问题:如何在 ME 中运行未签名代码,以及攻破处于关机状态的电脑的相关…
安全与密码学2017 · 543 分 · 107 评专业 · 约 40 分钟编辑精选比特币:一种点对点的电子现金系统(2008)
Bitcoin: A Peer-to-Peer Electronic Cash System (2008)
中本聪 2008 年发表的比特币白皮书,提出了无需可信第三方的点对点电子现金系统。
安全与密码学2017 · 536 分 · 394 评入门 · 约 45 分钟编辑精选GPRS 加密算法 GEA-1 的密码分析表明存在故意弱点
Cryptanalysis of GPRS Encryption Algorithms GEA-1 suggest intentional weakness
首次公开了对 GPRS 加密算法 GEA-1 和 GEA-2 的密码分析攻击。
安全与密码学2021 · 487 分 · 107 评专业 · 约 90 分钟编辑精选Signal 消息协议的形式化安全分析
A Formal Security Analysis of the Signal Messaging Protocol
用形式化方法分析 Signal 消息协议(TextSecure)的安全性:作者在多阶段密钥交换模型下,借助自动化证明工具对协议的密钥协商与 Double Ratchet 密钥更新…
安全与密码学2016 · 353 分 · 230 评专业 · 约 120 分钟编辑精选A2:模拟恶意硬件
A2: Analog Malicious Hardware
论文研究如何在芯片设计阶段植入模拟电路形式的恶意硬件后门,使其难以被常规检测发现。
安全与密码学2016 · 315 分 · 94 评专业 · 约 75 分钟编辑精选