| Post Reply | RetroFed Forums Forum Index » Security Operations |
| Author | Message | ||||||||
|---|---|---|---|---|---|---|---|---|---|
maltfield
monero.town
maltfield@monero.townJoined: 2023-06-12 |
3TOFU: Verifying Unsigned ReleasesBy Michael Altfield This article introduces the concept of "3TOFU" -- a harm-reduction process when downloading software that cannot be verified cryptographically.
TOFUTOFU stands for Trust On First Use. It's a (often abused) concept of downloading a person or org's signing key and just blindly trusting it (instead of verifying it). 3TOFU3TOFU is a process where a user downloads something three times at three different locations. If-and-only-if all three downloads are identical, then you trust it. Why 3TOFU?During the Crypto Wars of the 1990s, it was illegal to export cryptography from the United States. In 1996, after intense public pressure and legal challenges, the government officially permitted export with the 56-bit DES cipher -- which was a known-vulnerable cipher.
But there was a simple way to use insecure DES to make secure messages: just use it three times. 3DES (aka "Triple DES") is the process encrypting a message using the insecure symmetric block cipher (DES) three times on each block, to produce an actually secure message (from known attacks at the time). 3TOFU (aka "Triple TOFU") is the process of downloading a payload using the insecure method (TOFU) three times, to obtain the payload that's magnitudes less likely to be maliciously altered. 3TOFU ProcessTo best mitigate targeted attacks, 3TOFU should be done:
For example, I'll usually execute
The possibility of an attacker maliciously modifying something you download over your ISP's network are quite high, depending on which country you live-in. The possibility of an attacker maliciously modifying something you download onto a VM with a freshly installed OS over an encrypted VPN connection (routed internationally and exiting from another country) is much less likely, but still possible -- especially for a well-funded adversary. The possibility of an attacker maliciously modifying something you download onto a VM running a hardened OS (like Whonix or TAILS) using a hardened browser (like Tor Browser) over an anonymizing network (like Tor) is quite unlikely. The possibility for someone to execute a network attack on all three downloads is very near-zero -- especially if the downloads were spread-out over days or weeks. 3TOFU bash ScriptI provide the following bash script as an example snippet that I run for each of the 3TOFUs.
Here's one example execution of the above script (on a debian DispVM, executed with a VPN).
The TOFU output above shows that the release signing key from the TAILS project is a 4096-bit RSA key with a full fingerprint of " When doing a 3TOFU, save the output of each execution. After collecting output from all 3 executions (intentionally spread-out over 3 days or more), diff the output. If the output of all three TOFUs match, then the confidence of the file's authenticity is very high. Why do 3TOFU?Unfortunately, many developers think that hosting their releases on a server with https is sufficient to protect their users from obtaining a maliciously-modified release. But https won't protect you if:
Generally speaking, publishing infrastructure compromises are detected and resolved within days and MITM attacks using compromised CAs are targeted attacks (to avoid detection). Therefore, a 3TOFU verification should thwart these types of attacks.
ImprovementsThere are some things you can do to further improve the confidence of the authenticity of a file you download from the internet. Distinct DomainsIf possible, download your payload from as many distinct domains as possible. An adversary may successfully compromise the publishing infrastructure of a software project, but it's far less likely for them to compromise the project website (eg ' Use TAILS
If you are a high-risk target (investigative journalist, activist, or political dissident) then you should definitely use TAILS for one of your TOFUs. Signature VerificationIt's always better to verify the authenticity of a file using cryptographic signatures than with 3TOFU. Unfortunately, some companies like Microsoft don't sign their releases, so the only option to verify the authenticity of something like a Windows Still, whenever you encounter some software that is not signed using an offline key, please do us all a favor and create a bug report asking the developer to sign their releases with PGP (or minisign or signify or something). 4TOFU3TOFU is easy because Tor is free and most people have access to a VPN (corporate or commercial or an ssh socks proxy). But, if you'd like, you could also add i2p or some other proxy network into the mix (and do 4TOFU). |
||||||||
| 1 Original | |||||||||
| Post Reply |
Back to top |