Tor Browser protects what happens inside Tor Browser. The moment you download a file and open it in something else, a PDF reader, Word, a video player, an archive tool, you've stepped outside that protection. That application doesn't know or care that the file came over Tor, and if the file tells it to fetch something from the internet, it will usually do so over your normal connection, with your real IP address.

That's the core problem with downloads from onion sites, and it applies even when the file contains no malware in the usual sense.

Files that phone home

A lot of document formats can reference external resources. A Word document can include an image hosted on a remote server. Some PDF readers will follow links or load remote content embedded in a PDF. Media files and playlists can point at streams. Office files can contain macros that do whatever the author likes, if you allow them.

When you open one of these outside Tor, your machine makes a direct request to the author's server. The author learns your IP address, the time, and often details about your software. For someone trying to identify who is reading a particular document, that's all they need. It's a technique that has been used against Tor users by both criminals and investigators, and it's the reason Tor Browser shows a warning when you try to open certain downloaded files with an external application. The warning says, in effect, that this file may cause other applications to connect without Tor. People click through it constantly.

Actual malware

Then there's the ordinary kind. Onion sites, especially the ones offering anything "free" that normally costs money, hand out a lot of it:

Executables dressed up as tools, "cracks", leaked software or hacking kits. A file promising to hack something for you is very often a file that hacks you. Remote access trojans and password stealers are standard payloads, and so are clipboard hijackers aimed at people who hold crypto.

Password-protected archives. A ZIP or RAR with the password on the download page gets past many antivirus scanners, because the scanner can't see inside. That's precisely why malware distributors like them.

Leaked data dumps. Datasets advertised as stolen databases or "leaks" are sometimes padded with malicious files or are malware outright. Researchers who handle this material treat it as hostile by default.

Documents with double extensions or misleading icons, like report.pdf.exe on a Windows system that hides known file extensions. Turn extension display on if you haven't.

Exploits against the browser itself

Less common, but it has happened: a site serves code that exploits a bug in Tor Browser directly, no download required. The best-known case is the 2013 attack connected to Freedom Hosting, where JavaScript exploiting a Firefox vulnerability was used to make visitors' computers reveal their real IP addresses. That was an investigation by the FBI, and later cases have followed the same broad approach. Keeping Tor Browser updated and raising the security level to Safer or Safest, which restricts or disables JavaScript, cuts down that exposure a lot.

Opening files more safely

The safest download is the one you don't open. If you need to read something, here are better options, roughly from easiest to most thorough.

Open it offline. Disconnect the machine from the network (Wi-Fi off, cable out) before opening the file, and close the application before reconnecting. This stops the phone-home trick, though not malware that waits for a connection later.

Use Tails. Tails routes everything through Tor and blocks applications from connecting directly, so a document that tries to call home goes through Tor or not at all. Tails also starts clean every boot. It's not a sandbox against everything, but it removes most of the risk for ordinary documents. See our overview of Tails.

Use a disposable VM. Qubes OS makes this almost trivial: open the file in a disposable qube with networking turned off, and the whole VM is destroyed when you close it. Whonix gives you a similar setup inside VirtualBox or KVM, with the workstation only able to reach the network through Tor.

Convert it with Dangerzone. Freedom of the Press Foundation's Dangerzone takes a PDF, office document or image, renders it inside an isolated container with no network, and gives you back a flattened PDF made of pixels. Anything active in the original, links, scripts, embedded content, is gone. It's made for journalists handling documents from unknown sources, and it's the tool I'd point most people to.

Checking a file without opening it

For software, the right check is the developer's own signature or checksum, fetched from the developer's official site, not from wherever you got the file. If the onion site you downloaded a program from isn't the developer's own, you should be asking why you aren't downloading it from the developer. That goes double for Tor Browser itself, which gets faked a lot; see fake Tor Browser downloads.

Online scanners like VirusTotal can tell you if a file is known malware. Be careful what you upload, though: files submitted there can be downloaded by paying users of the service, so uploading a sensitive document effectively publishes it. Searching by the file's SHA-256 hash instead is safer:

# Linux / macOS
sha256sum suspicious-file.pdf
shasum -a 256 suspicious-file.pdf

# Windows PowerShell
Get-FileHash .\suspicious-file.pdf -Algorithm SHA256

A hash search that comes back clean only means nobody has reported that exact file. New or custom malware won't show up.

If you've already opened something and you're worried, the honest answer is that a reinstall from known-good media is the only way to be confident the machine is clean. Change passwords from a different device afterwards.

#malware #downloads #deanonymization #dangerzone