4 ms·
Is there something like this for formats other than ZIP like jpeg or pdf?
by ducktective 4y ago
Is there something like this for formats other than ZIP like jpeg or pdf?
- jwilk 4y agoFor tar: https://github.com/ferivoz/alquitran https://github.com/ferivoz/alquitran
- _vvhw 4y agoI wanted to do this for those formats in particular, as well as Office files. Fastmail were going to sponsor some of this work to extend Pure, and I was chatting with the folks at Hey, but I couldn't get enough other sponsors to fund the work. The idea is to use Pure to have a "Zero-Day Defense Mode" button for your email provider that you can push, if you want static analysis on 90% of the file formats coming and going, so that you can have stronger assurance on email attachments that you open. For example, I believe that Pure would have prevented last year's zero-click traversal against Apple Mail. There are also so many ways to use file format anomalies to take out AV engines, so Pure can act as a first line of defense, before hostile data gets to them. For example, protecting them from the David Fifield zip bomb. What I find most interesting with these checks, is that they're looking for explicit bleeds or explicit overflow bounds. So the signal to noise ratio is high. Mostly, if people are interested, I would really love to move this all to Zig, to benefit from the checked arithmetic and spatial safety, since otherwise everything is all single-threaded run-to-completion.
- deleted 4y ago[deleted]
- tgv 4y agoIdk, but there's an interesting project, wuffs: a programming language specifically aimed at efficiently and safely parsing document structure. There is a PNG decoder [2]. 1. https://github.com/google/wuffs https://github.com/google/wuffs 2. https://news.ycombinator.com/item?id=26714831 https://news.ycombinator.com/item?id=26714831
- _vvhw 4y agoPDF is also a minefield, for how many ways there are to mess with the format: https://blog.didierstevens.com/2008/04/29/pdf-let-me-count-the-ways/ https://blog.didierstevens.com/2008/04/29/pdf-let-me-count-t...