The Freedom of the Press Foundation's Dangerzone project writes about its tool that converts untrusted documents into safe PDFs, plus container isolation.
HN commenters recommend Dangerzone as a free tool for sanitizing suspicious PDFs and office documents, and for stripping metadata, though one calls it overkill for simple metadata cleaning.
(Hi, disclaimer: I'm one of the current dangerzone maintainers)
You are correct: that's basically what Dangerzone is doing!
The challenges for us are to have a sandbox that keeps being secure and make it possible for non-tech folks (e.g. journalists) to run this in their machines easily.
About the sandbox:
- Making sure that it's still updated requires some work: that's testing new container images, and having a way to distribute them securely to the host machines ;
- In addition to running in a container, we reduce the attack surface by using gVisor¹ ;
- We pass a few flags to the Docker/Podman invocation, effectively blocking network access and reducing the authorized system calls ;
Also, in our case the sandbox doesn't mount the host filesystem in any way, and we're streaming back pixels, that will be then written to a PDF by the host (we're also currently considering adding the option to write back images instead).
The other part of the work is to make that easily accessible to non-tech folks. That means packaging Podman on macOS/Windows, and providing an interface that works on all major OSes.
¹ https://dangerzone.rocks/news/2024-09-23-gvisor/
From the tool description linked:
> Dangerzone works like this: You give it a document that you don't know if you can trust (for example, an email attachment). Inside of a sandbox, Dangerzone converts the document to a PDF (if it isn't already one), and then converts the PDF into raw pixel data: a huge list of RGB color values for each page. Then, outside of the sandbox, Dangerzone takes this pixel data and converts it back into a PDF.
With this in mind, Dangerzone wouldn't even remove conventional watermarks (that inlay small amounts of text on the image).
I think the "freedomofpress" GitHub repo primed you to think about protecting someone leaking to journalists, but really it's designed to keep journalists (and other security-minded folk) safe from untrusted attachments.
The official website -- https://dangerzone.rocks/ -- is a lot more clear about exactly what the tool does. It removes malware, removes network requests, supports various filetypes, and is open source.
Their about page ( https://dangerzone.rocks/about/ ) shows common use cases for journalists and others.
Related:
https://dangerzone.rocks/
https://github.com/freedomofpress/dangerzone
> Take potentially dangerous PDFs, office documents, or images and convert them to safe PDFs.
From the learn more about page:
> Dangerzone was inspired by TrustedPDF but it works in non-Qubes operating systems, which is important, because most of the journalists I know use Macs and probably won’t be jumping to Qubes for some time.
> It uses gVisor sandboxes running in Linux containers to open dangerous documents, instead of virtual machines. And it also adds some features that TrustedPDF doesn’t have: it works with any office documents, not just PDFs; it uses optical character recognition (OCR) to make the safe PDF have a searchable text layer; and it compresses the final safe PDF.
Previously (announcement and details of gVisor sandboxing etc):
Safe Ride into the Dangerzone: Reducing Attack Surface with GVisor
https://news.ycombinator.com/item?id=41630076
Freedom of the Press Foundation is looking for an ONSITE Senior IT/Infra Engineer for its New York City (Brooklyn) offices, with the flexibility to work from home on select days.
Salary is $105,000-$130,000, depending on experience. Benefits include health, vision & dental insurance, generous paid leave policy, 401(k) match.
FPF is a ~40 person org, with a bit less than half of that being engineering -- we're an unusually tech-forward nonprofit, maintaining projects like SecureDrop (https://securedrop.org/) and Dangerzone (https://dangerzone.rocks/). This role is tasked with internal IT engineering leadership, as well as additional infra support to the whole org.
More info / apply here: https://grnh.se/2d57657e5us
This is mentioned on the release page (https://ddosecrets.com/wiki/Roskomnadzor) as well:
> Users are advised to be extra careful as some directories, like ПОЧТА Приемная, appear to contain large numbers of email attachments. Email attachments are often a vector of malware and phishing attempts, so use caution and tools like Dangerzone (https://dangerzone.rocks/) and others.
> This dataset was released in the buildup to, in the midst of, or in the aftermath of a cyberwar or hybrid war. Therefore, there is an increased chance of malware, ulterior motives and altered or implanted data, or false flags/fake personas. As a result, we encourage readers, researchers and journalists to take additional care with the data.
Micah Lee also made Dangerzone [1] a tool to safely convert untrusted pdf files to safe-to-open pdf files, wrote the book Hacks, Leaks, and Revalations [2] and he made Tor-Browser-Launcher [3] and he's a respected investigative journalist: https://micahflee.com/
[1] https://dangerzone.rocks/
[2] https://hacksandleaks.com/
[3] https://github.com/torproject/torbrowser-launcher