Difference between revisions of "Anonymizing Yourself"

From /tech/ Wiki
Jump to navigationJump to search
m (Search Engines)
m (DNS)
 
(One intermediate revision by the same user not shown)
Line 100: Line 100:
  
 
== DNS ==
 
== DNS ==
DNS is what allows your computer to convert a domain name (such as cloveros.ga) into an IP address. That process is called resolving.  
+
DNS is a protocol and system by which domain names, e.g., cloveros.ga, are resolved into IP addresses. It is like a phonebook or contact list for the internet.
  
When your computer resolves a domain name it queries a DNS server. Usually this will belong to your ISP if you have not configured it manually. Not all DNS servers are the same — some block queries to certain websites, others hijack queries and redirect them elsewhere, and many log queries. You should look for a DNS server that is close by (for minimum latency) that doesn't log your IP address or queries. In addition, you may want to use DNSCrypt for added protection, and a caching DNS server for reduced privacy exposure and higher performance.
+
When a computer resolves a domain name it queries a DNS server called a recursive resolver, by default, one provided by your internet service provider. The recursive resolver returns a DNS record containing the queried domain's IP address back to the computer which requested it. Malicious actors including those controlling the DNS server itself can hijack this process for their own means.
 +
 
 +
DNS providers may block queries to certain domains or redirect them elsewhere, and many log queries. Queries may be dropped silently to masquerade as a network problem and not overt censorship.
 +
 
 +
You should look for a DNS server that is nearby that doesn't log your IP address or queries. In addition, you may want to use DNSCrypt for added protection, and a caching DNS server for reduced privacy exposure and minimal latency.
  
 
{{Warning|Google DNS and OpenDNS log queries. Google "anonymizes" query information after a period of time, but keeps associated ISP information permanently.<ref>https://developers.google.com/speed/public-dns/faq#privacy</ref> OpenDNS logs IP addresses and may correlate them with other information that is normally non-personally identifying.<ref>https://www.opendns.com/privacy-policy</ref>}}
 
{{Warning|Google DNS and OpenDNS log queries. Google "anonymizes" query information after a period of time, but keeps associated ISP information permanently.<ref>https://developers.google.com/speed/public-dns/faq#privacy</ref> OpenDNS logs IP addresses and may correlate them with other information that is normally non-personally identifying.<ref>https://www.opendns.com/privacy-policy</ref>}}

Latest revision as of 21:27, 23 March 2020

Arguing that you don’t care about the right to privacy because you have nothing to hide is no different than saying you don’t care about free speech because you have nothing to say.

Edward Snowden

Privacy and Anonymity

The terms privacy and anonymity have specific meanings.

  • Privacy is about the secrecy of information.
  • Anonymity is about the secrecy of an identity.

Privacy and anonymity are closely related because information can be identifying and identities are associated with information.

Anonymous networks

Tor.png Tor

  • Tor sets up a SOCKS proxy to the normal internet which allows one to route internet packets without exposing their origin. It does this using a technique called onion routing. Note that Tor does not does encrypt the content of traffic; packets are sent in clear-text unless otherwise encrypted using something like TLS for web browsing or an SSH tunnel.
  • In addition, Tor onion services operate without exposing their IP address.

Tor-browser-bundle-icon.png Tor Browser

  • The Tor Browser is a package designed specifically to visit onion services and to route traffic via the Tor network. It is the safest way to use Tor according to the Tor Project. Yes, you can route arbitrary traffic over Tor so you don't need to use the Tor Browser - but don't be surprised when your DNS leaks or other bad things. It also protects you from fingerprinting.

I2p.png I2P

  • I2P is an anonymous network. Communications within I2P are anonymous; a sender cannot identify a recipient and visa-versa. I2P is primarily used for anonymous file-sharing, IRC, forums, etc. I2P's hidden services are called eepsites and end in the .i2p pseudo-TLD. Unlike Tor, I2P is not designed for accessing clearnet resources, but there are a few HTTP proxies nevertheless.[1]
  • The official I2P implementation is written in Java. tini2p and i2pd are two alternate routers, both written in C++. tini2p is the successor to Kovri which was forked from i2pd by some Monero developers.
  • Two interesting uses of I2P: TAHOE-LAFS and I2P-Bote.
Warning: FreeNet was formerly listed here, but has since been removed. Recent events suggest FreeNet has been at least partially compromised.

Don't use a VPN

VPNs are not a privacy panacea and you probably shouldn't use one.

  • There is no guarantee a provider isn't keeping logs.
  • A provider can see your traffic.
  • A VPN is a likely place for a honeypot.
  • If you still think you need a VPN set one up yourself on a VPS server.

Browsers

Tip: It cannot be stated enough, but for anything serious, use the Tor Browser.

Fingerprinting

Fingerprinting is the process of using otherwise non-identifying information to identify you. When enough non-identifying information is collected, you will stand out among others.

Here is an overview of the various vectors for fingerprinting. A non-exhaustive extract:

  • IP address
  • Screen resolution
  • User Agent
  • System Fonts List
  • System Fonts Enumeration
  • JS.Navigator Parameter
  • WebGL
  • Canvas
  • Audio Fingerprint
  • DNSCrypt[2]

Even worse, attempts to counter fingerprinting are likely to cause fingerprinting. Only "privacy-conscious" users disable vectors for fingerprinting. See how that works?

Disabling JavaScript will give a "no-JS" fingerprint but should prevent leaking through WebGL/Canvas. It identifies you but puts you in a larger subset. It can also be managed on a per-site basis using uMatrix and/or NoScript.

Use Panopticlick to check for fingerprinting.

The Tor Browser solution

In the end, the approach chosen by Tor developers is simple: all Tor users should have the exact same fingerprint. No matter what device or operating system you are using, your browser fingerprint should be the same as any device running Tor Browser.[3]

—Pierre Laperdrix, Browser Fingerprinting: An Introduction and the Challenges Ahead

This "works", but if you use Tor prepare to be treated like a second-class citizen by popular websites which block known Tor outproxies (exit nodes). On top of that, Tor users may find it difficult (impossible?) to fill out CAPTCHA forms, which are near ubiquitous on the internet.

Search Engines

Search engines are middle men between you and the content you're looking for. Search engines should not be used as lazy shortcuts to everything on the internet. The most assured way to use search engines discreetly is to use them for their intended purpose only.

A few techniques can unwean yourself from search engine overuse:

  • Bookmarks
  • Website aliases/shortcuts
  • Search keywords (i.e. instead of searching Google for a Wikipedia article, define a URL keyword to search Wikipedia directly. This cuts out the middle man. In Firefox, to define a keyword right click on any search-box and the option will appear in the menu.

For times when you actually need to use a search engine, naturally use a one which respects your privacy.

DuckDuckGo (privacy policy) (onion)

SearX

  • SearX is a self-hostable meta search-engine.

Qwant (privacy policy)

  • Qwant is a European search engine that claims to respect user privacy.

Disconnect Search (privacy policy)

  • Disconnect Search
Warning: Startpage, which was formally recommended on this page, is now owned by an advertising company.

E-mail

Disposable email addresses are useful for when you need to register for a service but want to avoid linkability. 10minutemail and Guerilla mail (which has an .onion) are two decent options. Disposable Email addresses and their mail are usually deleted after a set time period. Should probably be paired with a password manager as this makes ordinary account recovery impossible.

There are certain privacy conscious email providers:

Tip: Protonmail requires Tor users to provide a phone number or secondary email address during registration. Users paying with Bitcoin can get around this (related: Financial_privacy#xmr.to).

Encrypted email invites new problems for password security. If the same password is used for decryption and authentication then a mail-server could easily decrypt sensitive email. A solution is to split login and decryption into two separate passwords as Protonmail originally did. However, maintaining two passwords is inconvenient. Tutanota and Protonmail have implemented clever methods to securely unify login and decryption passwords. Tutanota salts and hashes login passwords on the client-side; hashes are transmitted and checked against the hash of a hash on the serverside. In this way not only does Tutanota never see user passwords, but server-side hashes cannot be used for authentication.[4] Protonmail uses a related approach, but derives the keys differently and uses SRP for zero-knowledge password authentication.[5]

DNS

DNS is a protocol and system by which domain names, e.g., cloveros.ga, are resolved into IP addresses. It is like a phonebook or contact list for the internet.

When a computer resolves a domain name it queries a DNS server called a recursive resolver, by default, one provided by your internet service provider. The recursive resolver returns a DNS record containing the queried domain's IP address back to the computer which requested it. Malicious actors including those controlling the DNS server itself can hijack this process for their own means.

DNS providers may block queries to certain domains or redirect them elsewhere, and many log queries. Queries may be dropped silently to masquerade as a network problem and not overt censorship.

You should look for a DNS server that is nearby that doesn't log your IP address or queries. In addition, you may want to use DNSCrypt for added protection, and a caching DNS server for reduced privacy exposure and minimal latency.

Warning: Google DNS and OpenDNS log queries. Google "anonymizes" query information after a period of time, but keeps associated ISP information permanently.[6] OpenDNS logs IP addresses and may correlate them with other information that is normally non-personally identifying.[7]

Recommended DNS providers:

Dnscrypt.png DNSCrypt

Main article: DNSCrypt

  • End-to-end encryption for your DNS queries to prevent any intermediaries from monitoring them. Ideally, it should be used with a caching DNS server like Unbound.
  • Another option is DNS over HTTPS with encrypted SNI, but this has some trade-offs.

Unbound.png Unbound

Main article: Unbound

  • Unbound is a high performance validating, recursive, and caching DNS server with a multitude of privacy oriented features. It acts as a local DNS cache which ensures less frequent connections to your DNS server. On top of that, it is able to enforce DNSSEC (prevents DNS spoofing and use clever algorithms to harden your DNS queries.

Unbound is undergoing a security audit, courtesy of OSTIF.

piHole

  • piHole can act as a local DNS cache.

Opennic.png OpenNIC

  • The OpenNIC Project is a privacy-minded collection of volunteer-run servers that also allow you to use extra TLDs such as .geek etc. Also features DNSCrypt support.

Operating systems

Whonix

Whonix is a distribution focused on privacy, anonymity and security that uses an isolation model to prevent IP and DNS leaks. It is divided into two virtual machines: the Workstation and the Gateway. The Workstation can only connect to the internet via the Gateway and is unaware of its external IP address. In this way IP and DNS leaks are rendered impossible even if the VM is compromised. Additionally, Whonix uses pre-configured applications with stream isolation to prevents their respective activities from being tied to one identity (see Anonymizing Yourself#Privacy and Anonymity).

Qubes OS

Qubes OS is a distribution based on Fedora that provides security by compartmentalization. Virtualization is performed by Xen, and requires IOMMU/VT-d.

Subgraph OS

Subgraph OS is a distribution that focuses on security and anti-surveillance. It uses filesystem by default and creates sandboxed containers using OZ (similar to Firejail) around at-risk software. The sandbox system enforces Seccomp filters, Linux Namespaces, Capabilities, and even isolates X11 using XPRA. It ships with a Linux kernel hardened with grsecurity.

Tails

Tails is a live distribution outfitted for secure use of Tor. Tails is a designed to leave no trace of itself on its host computer. Contrary to popular belief Tails does not force all traffic to use Tor. Rather, Tails' network filter drops non-Tor outbound traffic excepting a few cases such as Tor itself.[8] Applications not designed to use Tor (such as Bittorrent) may transmit de-anonymizing information that would compromise the privacy provided by Tor. Tails also bundles a number of useful applications such as Thunderbird (with GPG encyption), a Bitcoin wallet, Pidgin (with OTR for secure messaging), and more. Edward Snowden used Tor when leaking classified documents.

heads

heads is a distribution similar to Tails, based on Devuan. Like Tails, it sends your packets over Tor and leaves the no trace on the computer. Unlike Tails, it is fully Libre, and uses a de-blobbed kernel hardened with grsecurity. Instead of systemd it uses "sysvinit combined with OpenRC". It contains no proprietary drivers, making it run on a limited number of machines.

Accounts and Passwords

Need to scrub some stuff off the internet? We have an article for that. See Account Management.

Insecure passwords can be de-anonymizing. The same password used twice can establish linkability even if the respective accounts are ostensibly unrelated. Make sure you're following good practices by the reading the password etiquette guide. A brief summary of relevant points:

  • Never use the same password more than once.
  • Don't use slight variations of the same password.
  • Use a strong, randomly generated passwords.

Similarly, register different usernames tied to different email addresses.

Tools

Firejail

  • Firejail is an application sandbox that uses Linux namespaces, seccomp-bpf and the latest kernel security features to create a virtual isolated filesystem. It comes with a myriad of profiles by default, which are then used on a per-software basis.

It is important to use sandboxes in order to minimize certain exploits in the software that could otherwise be used to identify you. For instance, in Firefox, Firejail limits its data leaks by replacing the standard temporary file directory with a more secure version, which is completely erased when the Firefox session ends.

MAT2

  • MAT2 (Metadata Anonymization Toolkit 2) is an experimental tool to remove metadata froma wide variety of file formats including the major formats for office docs, images, audio and video.

Exiftool

  • Exiftool is a multi-functional tool to remove, add or edit metadata in major file formats. It runs as a command-line tool and can be used by programmers as well.
  • To remove all metadata from an image, run exiftool -all= yourimage.jpg

PDF Redact Tools

  • PDF React Tools is a toolkit for stripping metadata from PDF files. It also supports an achromatic option to counter printer dots.

Anonymouth

  • Anonymouth is another experimental tool designed to anonymize writing so that the author cannot be identified by his or her word choice, grammar, theme, tone, etc. Here is an article on anti-stylometry (the scientific study of literary style) discussing it, and here is another article. The anonymouth program has not been updated in over six years but there are some maintained forks.

kloak

Cryptpad

  • Cryptad is a service for private-by-default realtime collaboration. Decryption keys are generated clientside.

dhcpcanon

Routers

A router that supports free software firmware is recommended over one provided by your ISP. ISP routers often come preloaded with software that can compromise your privacy and security. Linux based firmware is available for common routers:

Openwrt

  • OpenWrt is a Linux distribution for embedded devices. It is optimized for minimal storage and RAM usage to fit on home routers.
    • LibreCMC is a fork of OpenWrt with all non-free software removed.

DD-WRT

  • DD-WRT is a firmware foccussed on the Linksys WRT54G series routers.

pfsense

OpenBSD

  • can be used as a router.
Warning: A firmware called PORTAL, which was formally recommended on this page should be avoided. PORTAL routes all traffic over Tor which may sound private, but can potentially compromise OPSEC. Recommended alternative is to use TAILS which drops non-Tor traffic.

For more detailed information see: Routers. You can also use a computer as a router.

Private payment

At some point you will have to pay for things. To achieve privacy in doing so you should familiarize yourself with the various anonymous cryptocurrencies by reading the overview at the dedicated article. Important points:

  • Bitcoin is not anonymous.
  • Monero is anonymous.
  • Route Monero over Tor.
  • You can use Monero to acquire Bitcoin anonymously.

Filesharing

Android and cell phones

Warning: If compromising on privacy/security is not an option, or anything serious is at stake (e.g. political activism or journalism in a sensitive area), it is advised to avoid using a telephony-enabled device at all. -Replicant.

Android (AOSP) Distributions

  • Replicant is a distribution that aims to replace all proprietary components of Android. Only works on some old Samsung phones.
  • LineageOS is the successor to cyanogenmod and supports a wide variety of devices.
    • LineageOS for MicroG is a build of LineageOS modified to support MicroG, a project that reverse engineers Google's proprietary libraries to replace them with free components. MicroG will not work on standard LineageOS.
  • Graphene is a distribution focused on security and privacy. Google Pixel is the only supported device at the moment. It is the successor to CopperheadOS.

In order to install a custom ROM you will need a supported phone capable of unlocking the bootloader.

Non-AOSP

  • Librem 5 is a phone developed by Purism that ruins their Linux distribution PureOS. The Librem 5 sports hardware switches for Wi-Fi, Bluetooth, camera and microphone if you really are that paranoid. The developer of GrapheneOS had some negative things to say about it which are worth reading.
  • postmarketOS is a non-Android distribution for older phones.

Application Replacements

Default applications should be replaced with more privacy-friendly alternatives.

  • F-Droid is a software repository that only contains free software and informs users of any "anti-features".
    • FOSSdroid is a web-UI for F-Droid's repositories that tries to mimic Google Play.
  • Simple Mobile Tools are minimal replacements for stock applications. Available on F-Droid.
  • Aurora Store is a replacement for Google Play store app.
  • OsmAnd~ OsmAnd+ is a map application that uses OpenStreetMap crowd-sourced data. Supports offline (per-downloaded) maps.
  • GApps Browser allows one to use Google web-apps (maps, news, etc) without a logged-in Google account.

Self Signing

Printers

All modern printers leave subtle yellow dots or other identifiable information on printed documents so they can be traced. You might be able to buy a thermal printer or an old (1980s or early 90s) dot matrix printer that lacks this anti-feature.

OPSEC/Operational Security

All the software in the world won't help you if ignore the human element. Obvious no-nos:

  • Using the same username everywhere;
  • Using the same email address everywhere;
  • Using the same password everywhere;
  • Logging into the same accounts through your real IP and a proxy/VPN/tor;
  • Posting photos or images which can be traced back to you via a reverse image search or EXIF meta-data.

Ross Ulbricht was brought down by many of the above points.

More subtle no-nos:

  • Discussing personal preferences, or knowledge of specific locations such as a school, shop or town;

Steve Rambam gave an excellent talk at the HOPE hacker conference which summarizes many of the techniques that you/private investigators/LEA can use to determine someone's identity.

To err is human. As clever as you think you are, all it takes is one connection from your real IP address to de-anonymize you. One day when you're distracted/tried/stressed/drunk/high/panicked/surprised or when something out of the ordinary is happening, you will mess up. Putting up many automated layers of anonymity/security will help protect you from yourself.

External links

See also

  • https://geti2p.net/en/faq#outproxy
  • [1]
  • https://blog.torproject.org/browser-fingerprinting-introduction-and-challenges-ahead
  • https://tutanota.com/blog/posts/innovative-encryption/
  • https://protonmail.com/blog/encrypted_email_authentication/
  • https://developers.google.com/speed/public-dns/faq#privacy
  • https://www.opendns.com/privacy-policy
  • https://tails.boum.org/contribute/design/Tor_enforcement/Network_filter/