安全与密码学2018arxiv.org
X.509 的系统化解析:用解析树根除安全问题
Systematic Parsing of X.509: Eradicating Security Issues with a Parse Tree
进阶 · 约 60 分钟读完前置知识:X.509 证书结构、形式文法与解析基础、TLS/PKI 基础
导读
这篇论文系统性地解析 X.509 证书,通过构建解析树来发现证书中违反规范的安全问题。作者对现实中的证书进行了大规模解析分析,统计出最常见的违规类型(如 DNS/URI/email 格式错误),展示了用形式化解析方法消除证书处理中安全隐患的可行性。
HN 关注点:形式化解析(langsec)在安全领域的实际应用,以及证书生态中普遍存在的规范违规问题。
HN 评论精选
这几条评论里:支持 2 质疑 1 补充 1
质疑质疑论文未讨论格式违规的具体内容及规范本身与现实脱节的问题
有一点让我很不安:论文把 DNS/URI/email 格式违规列为最常见的错误,却完全没有讨论这些违规具体是什么类型,甚至没有说明论文认为正确的格式应该是什么。这很遗憾,因为这些参数的格式恰恰是规范常常与现实严重脱节的地方。举个简单例子,有些文档认为 DNS 名不能以数字开头,这完全不符合现实。
jcranmer查看英文原文
There's one thing that gives me pause here: The single most common error is listed as DNS/URI/email format violations. There is absolutely no discussion as to what kinds of violations these break into, nor is there even a discussion as to what the paper thinks the correct formats ought to be. This is unfortunate because the format of these parameters is one thing where specifications often have a view of the world which is completely incongruent with reality. As a simple case, you will sometimes come across documentation that thinks that DNS names cannot start with a digit, which does not match reality at all.
补充推荐 langsec 理念,反思日常代码中临时解析的安全隐患
另见 langsec.org。非图灵完备语言、形式文法和上下文无关解析非常迷人,工具链现状其实很成熟但很零散。我的代码里有太多样板代码和临时拼凑的解析逻辑,直到我问自己:判断一个输入是不是整数或 4 字符字符串,真的需要图灵完备的语言吗?我都不敢想如果 fuzzer 对我的 Python 代码狂轰滥炸会发生什么。
lsh查看英文原文
see also langsec.org non-Turing complete languages, formal grammars and context-free parsing are fascinating and the current state of tooling is really sophisticated but sparse. So much boilerplate code and adhoc parsing exists in my code and I never really appreciated how much until I asked myself if I really needed a Turing complete language to tell me if an input really is an integer or a string of 4 chars, etc. I'm terrified what would happen if a fuzzer ever went to town on my python code.
支持认为该研究揭示了行业的基础性技术债务
这不断提醒我们,可靠工具的发展还处于多么早期的阶段——连这种基础错误都还在被反复犯。我很高兴有这类研究来揭示和识别我们的社会性技术债务。
sneak查看英文原文
It constantly underscores how early we are in the development of reliable tooling that such basic errors as these are still regularly being made. I am glad this sort of research is being done to uncover and identify our societal technical debt.
支持主张用形式文法和解析工具替代手写解析
如今我解析任何比几个逗号分隔的非字符串值更复杂的东西时,默认做法都是写一个文法然后找个解析工具。希望更多程序员也能这样。
nly查看英文原文
My default position on parsing anything more complex than a couple of comma-separated non-string values these days is to write a grammar and pick up a tool. I wish more programmers felt this way.
历次讨论
- 2018Hacker News 讨论帖146 分 · 25 评
同领域还值得读
如何入侵一台已关机的电脑:在 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 分钟编辑精选