Two tools, for two different situations. Dangerzone takes a suspicious document and hands you back a safe copy, one click, nothing to learn. A virtual machine is a whole disposable computer inside your computer, for when you need to run or interact with something. Most people need the first and should know the second exists.
01Why a document is dangerous at all
A PDF is not a picture of a page. It is a small program: it can contain fonts, scripts, embedded files and instructions that your reader has to interpret. Office documents have macros. Images are decoded by complex libraries that have had a long history of memory bugs. Every one of those is code processing attacker-controlled input, and that is the definition of an attack surface.
Malicious documents are among the most common delivery methods for commercial spyware, and journalists and human-rights workers are among the most frequently targeted groups. The attachment does not need you to do anything unusual. Opening it is the action.
Note also that a document you open normally can quietly reach the network — remote images and tracking pixels confirm to the sender that you opened it, when, and roughly where you are, before any exploit is involved.
02Dangerzone, the everyday answer
Dangerzone was built for exactly this, by the Freedom of the Press Foundation. You give it a suspicious file; it gives you back a PDF that is safe to open.
The file is opened inside a locked-down, disposable container with no network access, where each page is converted to a plain image — throwing away every script, font, macro and embedded object. Those images are then converted back into a new PDF in a second isolated step. Anything hostile in the original had one place to run, and that place is destroyed immediately afterwards.
-
Install the container engine
Dangerzone needs Docker Desktop on Windows and macOS, or Podman on Linux. On most Linux distributions Dangerzone is packaged and will pull in what it needs. This is the only fiddly part and it is a one-time cost.
-
Install Dangerzone
From dangerzone.rocks. The first run downloads the container image, which takes a few minutes and happens once.
-
Convert the file
Open Dangerzone, select the document, choose where the safe copy goes, and convert. A few seconds to a minute depending on length.
-
Open the safe copy, delete the original
Or keep the original somewhere clearly marked if it is evidence, but never open it again on a machine you care about.
| Handles | Result |
|---|---|
| PDFs | Yes, the main use case |
| Word, Excel, PowerPoint, LibreOffice files | Yes — converted to a safe PDF |
| Images (JPG, PNG, GIF, TIFF) | Yes |
| Text you can select and copy afterwards | Optional OCR, which adds time |
| Video and audio | No, use a VM |
| Archives, installers, executables | No, use a VM, or do not |
The output is images of pages, so the file is larger, the text is not selectable unless you enable OCR, and any form fields or links stop working. For a document you need to read, that is a fair price. For a document you need to fill in and return, it is not, use a VM instead.
03Virtual machines, when you need to interact
A virtual machine is a complete computer simulated in software: its own operating system, its own disk, its own network connection, running in a window. From inside, it looks like an ordinary computer. From outside, it is a folder you can delete.
Use one when you need to:
- Open something Dangerzone cannot handle, an archive, a spreadsheet you must use, a piece of software you were sent
- Fill in and return a form that came from someone you do not know
- Visit a link you do not trust, from an address unconnected to you
- Run a Windows-only application on a Linux machine
- Keep one piece of work sealed off from everything else you do
Setting one up
VirtualBox
Free, open source, and runs on Windows, macOS and Linux. The safe default if you have no preference, every guide and forum answer you will find assumes it.
virtualbox.org ↗VMware Workstation / Fusion
Noticeably faster and more reliable with graphics and USB devices, and free for personal use since Broadcom dropped the licence fee — many people still assume it costs money. Closed source, which is the trade. Workstation on Windows and Linux, Fusion on Mac.
vmware.com ↗GNOME Boxes (Linux)
Simplest of the three on Linux, using the kernel's KVM virtualisation through a small front end. Fewer options are useful on a throwaway machine. Isolation still depends on the guest settings and on keeping the Linux host patched.
apps.gnome.org ↗-
Install one of the three above
Any of them is fine for this purpose. If you are on Linux, Boxes is the least work; if you want the smoothest experience and do not mind closed source, VMware; otherwise VirtualBox.
-
Get an operating system image
A Linux ISO is the easy choice — small, free, no licensing. Take one from the Linux guide. Microsoft also publishes free time-limited Windows images for testing if you specifically need Windows.
-
Create the machine and install
Give it 4 GB of memory and 20–40 GB of disk if you can spare it. Install as you would on a real computer. It will feel slow; it is not meant to be your daily machine.
-
Turn off the conveniences, this is the important step
The features that make a VM pleasant are the same ones that connect it back to your real machine. Disable shared folders, disable shared clipboard, and disable drag and drop. A VM with a shared folder open is not isolation, it is a window with a hole in it.
-
Take a clean snapshot, now
Before you ever put an untrusted file in it, take a snapshot of the fresh, clean state. This is what makes the machine disposable: after each use, roll back and everything that happened inside, including anything that installed itself, is gone in seconds.
-
Get the file in without opening a channel
The cleanest route is to attach the file as a virtual CD (an ISO you build containing just that file), which the VM can read and cannot write back to. A USB device passed through also works, with the obvious caveat that the stick then needs treating as suspect too.
Escaping from a virtual machine to the host is possible and such flaws are found periodically. They are rare, valuable and generally spent on high-value targets rather than on a mailing list. A VM is an excellent answer for ordinary malicious documents and a weak answer against a state-grade adversary who has specifically decided to reach you. If that is your actual situation, the right tool is Qubes, or an air-gapped machine that never touches a network again.
04Which to use, and when
| Situation | Use | Why |
|---|---|---|
| A PDF from a stranger | Dangerzone | One click, and the result is safe to open normally. |
| A document you must edit and send back | VM | Dangerzone's output is not editable. |
| A zip or an installer | VM | Out of scope for Dangerzone; anything executable needs a machine you can throw away. |
| A link you do not trust | VM, or Tor Browser | Depends whether you need to be unlinkable or merely safe. |
| A phone that may be compromised | Neither | Different problem entirely — see the compromised-device section of the main guide. |
| You are a high-value target and know it | Qubes | Compartmentalisation as the design of the whole system rather than a tool you remember to use. |
05The habits that matter more than the tools
- Treat every unsolicited attachment as hostile until it has been through one of these. The sender being a real person does not help, their account may not be theirs any more.
- Prefer a link to a file when you can ask. A document viewed in a browser is handled by the most hardened software on your machine.
- Verify out of band when something feels off. A short message on a different channel — "did you just send me this?" — defeats most of these attacks outright.
- Keep everything updated. Most malicious documents rely on a flaw that was patched months ago.
- Enable macros. Ever, on a document from outside. "Enable content to view this file" is the oldest line in the business.
- Trust the file extension. A name can end in .pdf and be something else entirely; turn on showing full extensions.
- Open it "just quickly" on your phone. The phone is the device carrying your location and your messages.
- Leave shared folders on in a VM you use for this.
- Reuse a dirty VM. Roll back to the clean snapshot every single time.
06Questions people actually ask
Is Dangerzone's output really safe?
The conversion discards everything that could execute, and it happens with no network access in a container that is then destroyed. The remaining risk is a flaw in the conversion pipeline itself, which is why the work is split across two isolated stages. It is not a mathematical guarantee; it is a very large reduction in risk for effectively no effort, which is the right trade for almost everyone.
Can I just use Google Docs or an online viewer instead?
It does protect your machine, since the rendering happens on someone else's computer. It also means uploading the document to a third party, which for a leaked record, a source's material or anything sensitive is the worse outcome of the two. Dangerzone never sends the file anywhere.
Do I need a VM if I already use Linux?
Yes, for untrusted files. Linux reduces your exposure to mass-market malware; it does not make a malicious PDF harmless, and the isolation argument is unchanged. If you want this habit built into the operating system rather than remembered, that is what Qubes is for.
What about the metadata in files I send out?
That is the mirror image of this guide and it matters just as much, what your own files reveal about you. It has its own section in the main guide.
07Sources and further reading
- Dangerzone — official site, by the Freedom of the Press Foundation dangerzone.rocks
- Dangerzone — source code and documentation github.com/freedomofpress/dangerzone
- VirtualBox — free virtual machines on Windows, macOS and Linux virtualbox.org
- VMware Workstation and Fusion — free for personal use vmware.com
- Qubes OS — compartmentalisation as the design of the system qubes-os.org
- Freedom of the Press Foundation — digital security training for journalists freedom.press/training
Last reviewed: 25 September 2026