View Suspicious Documents Safely with Dangerzone

A standard piece of advice for staying safe online is to avoid opening attachments from people you don’t know or attachments that seem suspicious. It’s good advice, since PDFs and office documents can contain JavaScript and macros that present a security risk, or they could be maliciously crafted to take advantage of vulnerabilities in common apps to execute code on your computer.

But in the real world, unless the document is attached to a message that is obviously spam, it’s difficult to know whether you should be worried. If you could just look at the document, you might be able to tell, but how can you do that without opening it?

Enter Dangerzone, an open source app created by the nonprofit Freedom of the Press Foundation. The impetus for creating it came from journalists who need to review attachments from possibly untrustworthy sources while protecting themselves from hacking and retaliation from powerful corporate and government interests.

Dangerzone won’t tell you whether or not a document is safe. Instead, when you drop a document on its window, it creates a PDF image of the document that contains nothing of the original other than the visual representation of its pixels. Think of Dangerzone as a virtual photocopier—it makes a visual copy.

But Dangerzone is a highly sophisticated virtual photocopier, since it has to work with malicious documents without allowing them to cause harm. Behind the scenes, Dangerzone first creates a Linux container to keep the document away from your Mac. Within the container, it then creates a sandbox to protect the Linux kernel. Then it uses open source tools—LibreOffice and PyMuPDF—to convert the original document to a PDF, split that PDF into individual pages, and convert each page to RGB pixels—just colored dots. Then it quits the sandbox since the file has been sanitized, and if possible, it converts the RGB pixel data into a compressed, searchable PDF. Finally, it saves the PDF to the specified folder and archives the original file. You can process only one file or batch of files at a time to ensure that the entire secure conversion environment starts fresh each time.

Here are the document types that Dangerzone can convert into safe PDFs:

  • PDF (.pdf)
  • Microsoft Word (.docx, .doc)
  • Microsoft Excel (.xlsx, .xls)
  • Microsoft PowerPoint (.pptx, .ppt)
  • ODF Text (.odt)
  • ODF Spreadsheet (.ods)
  • ODF Presentation (.odp)
  • ODF Graphics (.odg)
  • EPUB (.epub)
  • JPEG (.jpg, .jpeg)
  • GIF (.gif)
  • PNG (.png)
  • SVG (.svg)
  • TIFF (.tif, .tiff)
  • Other image formats (.bmp, .pnm, .pbm, .ppm)

You won’t want to use Dangerzone on every document you receive in email. There’s no reason to fuss with it for attachments that come from people you know, in contexts where it makes sense that they’re sending you something. But if you get an attachment out of the blue that makes you think, “Why is this person sending me a document?” run the document through Dangerzone to make sure it’s safe.

(Featured image by iStock.com/shironosov)


Social Media: Got a suspicious attachment? Dangerzone converts potentially dangerous PDFs and Office docs into safe, pixel-only copies you can view without risk. Think of it as a virtual photocopier that strips any hidden malware, JavaScript, or macros.

Similar Posts

  • Black History Month – Thurgood Marshall

    Way before Barack Obama broke the color barrier to become president of the USA, Thurgood Marshall broke that barrier for another of the most powerful and important positions in the country, that of Supreme Court Justice. After graduating from high school with honors he applied to the University of Maryland law school where he was not accepted because he was black. Instead, he went to Howard University and received his law degree in 1933.

    Before being appointed Supreme Court Justice, he had a stellar career from 1934 to 1961 as a lawyer for the NAACP where he won landmark civil rights cases. Beginning in 1940, Marshall won 29 of 323 US Supreme Court cases. One of his first big cases was Smith vs. Allwrite in 1944 which overthrew the South’s “White Primary”. The White Primary was a practice of excluding African Americans from the Democratic Party. It was most common in a state where that party controlled the state government.

    In 1954 Marshall achieved a landmark victory with the case of Brown vs. Board of Education of Topeka. This Supreme Court decision demolished the legal basis for segregation in the USA. It also made state-enforced racial segregation in public schools invalid.

    In 1961 he was appointed the the US Court of Appeals by President Kennedy. He was the first African American on the Court of Appeals and went on to be appointed to the Second Court of Appeals. President Johnson made him the Solicitor General in 1965 and later in 1967 President Johnson nominated him for the Supreme Court.

    On the Supreme Court he was a steadfast supporter of positive gender and racial action policies and in his 24 years on the court he became a vocal liberal on a conservative-dominated court. He was an ardent supporter of Constitutional protection of individual rights, in particular the rights of criminal suspect versus the government. Marshall’s backing of Affirmative Action led to his strong dissent in the Regents of the University of California vs. Blake in 1978. Justice William Brennan was Marshall’s most reliable confederate who voted with him against the death penalty.

    Citing poor health, Thurgood Marshall stepped down from the court in 1991 and remained a vocal critic of the court until his death in 1993 at the age of 84.

  • Holiday Guide for People with Everything

    Shopping for the people who “already have everything” is kind of our hobby. Here are a few of the personalities we see all…