Anonymity and Privacy For Advanced Linux Users Beac0n
Anonymity and Privacy For Advanced Linux Users Beac0n
Intro
The goal is to bring together enough information in one document for a
beginner to get started. Visiting countless sites, and combing the internet
for information can make it obvious your desire to obtain anonymity,
and lead to errors, due to conflicting information. Every effort has been
made to make this document accurate. This guide is image heavy so it
may take some time to load via Tor.
Thanks!
securityinabox.org
Deepdotweb.com
EFF and EPIC
riseup.net
Table of Contents
1 Intro
2 Some general sources/Big Thanks
3 Technical Information
3.1 Strong Passwords
3.2.5 Browsers
3.2.8 VPN
Technical Information
Strong Passwords
It’s difficult to remember many passwords. First off it’s good to select a
strong password manager. Keepassx is cross-platform, and has good
security features, like encryption by password and using a keyfile. It also
allows you to generate strong passwords, so if you’re not worried about
memorization it’s good practice to let Keepassx generate secure random
passwords.
It’s best not to use services that store your passwords in the cloud. If you
need you can back up your encrypted password database, on a secure
server, in an encrypted directory, and store your keyfile in a separate
location.
Although it’s an annoyance, passwords are the ever present key to what
matters most to you.
Internet Connectivity
No service provider should be presumed to completely protect your
privacy. Even if your VPN/Proxy or other ISP promises no logs, or
identifiable information, time and time again information has been
collected and used against those seeking anonymity. Open-Source
technologies where you are able to examine source, yet trust is still
ultimately placed in the hands of developers, are better than trusting a
Government of other entity with your security.
Consider reading the Terms of Service any time you sign up for a service
or install something.
Also remember that the times you use technology can be used to build a
profile of your location for identification. Consider changing up your
times of connectivity. On forums, chat and other services, it may be
worthwhile to disable the notification that outwardly displays when you
are on line or select invisible mode when applicable.
Firewall
UFW (Uncomplicated Firewall) is a great general firewall for linuux
as some malware may utilize outgoing traffic, like encrypted udp, it may
be worthwhile to limit outgoing ports
you can see I’ve blocked some specific ports in this example
With macchanger-gtk
heck your current mac addresses for future reference
1 macchanger eth0
2 macchanger wlan0
1 macchanger -e wlan0
will change the mac address but keep it as the same vendor. This can be
useful if you’re spoofing your address but you don’t want it obviously
coming from a device not on the network.
This will change the devices MAC to a random MAC of any kind,
regardless of the original device.
you can switch out -A for -r or whatever other configuration you might
want.
1 #!/bin/sh
2
3 MACCHANGER=/usr/bin/macchanger
4
5 [ "$IFACE" != "lo" ] || exit 0
6
7 # Bring down interface (for wireless cards that are up to scan for netwo
8 /sbin/ifconfig "$IFACE" down
9 macchanger -A "$IFACE"
10
Intrustion Detection
The basic premise is monitoring the system for unusual activity. First is
to keep an eye on the logs, and the next step is to consider an IDS like
snort. There’s a learning curve, but here are some useful tools, that with
some research can increase security especially if you allow others to
access the system.
1. logwatch
1. help.ubuntu.com
1. snort
1. snort.org
2. http://manual.snort.org/
2. http://www.ossec.net/?page_id=160
You may want to get yourself acquainted with some of the common
security tools available. Here’s a good list, definitely nmap, tcpdump,
netcat and wireshark are useful.
Disk Encryption
On first install of a linux operating system you should be prompted to
create an encrypted LVM partition, and encrypt your home folder. This is
a good start. For further security there is veracrypt.
Download: veracrypt.codeplex.com/releases/view/56…
Select your encryption algorithm, AES is fine, but you may chose more
secure
Select Hash Algorithm, SHA-512 is sufficient
Select Use Key files and click the key files box… optional:
You will follow the same steps, remember this is the hidden volume
consider it’s security most important.
When complete you will see this warning, read it carefully.
Browsers
Tor Browser
Download at: torproject.org
All Tor network addresses will be followed with .onion, not .com. It is far
more secure browsing .onion services.
Once you’ve download tor browser, expand the zipped file. Then
1 cd tordirectory
2 ./start-tor-browser.desktop
Forbidding javascript and other elements can make web browsing less
convenient, but by allowing more elements you open yourself to
potential vulnerabilities. It’s best to find the best possible security setting
you can withstand while the web browsing experience is still functional.
Privacy and security settings can be easily configured. Click on the Onion
in the top left.
Select “Privacy and Security Settings” Adjust the slider to your desired
level of security.
Noscript basics
Click connect
Pluggable Transports
Pluggable Transports are extensions to Tor which utilize it’s pluggable
transport API. These are more advanced ways to disguise traffic flow, for
instance making it appear as skype traffic or utilizing a flash proxy. Many
are now included in the Bridge Option Menu, so this is a good resource
to learn more about the specifics. Some may require custom installation.
Firefox
If you need to use another browser Firefox is preferred. Here are some
configuration settings and extensions that can be helpful.
Optional Configuration:
geo.enabled = false
network.http.accept.default =
text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
network.http.use-cache = false
network.http.keep-alive.timeout = 600
network.http.max-persistent-connections-per-proxy = 16
network.proxy.socks_remote_dns = true
network.cookie.lifetimePolicy = 2
network.http.sendRefererHeader = 0
network.http.sendSecureXSiteReferrer = false
network.http.pipelining = true
network.http.pipelining.maxrequests = 8
network.http.proxy.keep-alive = true
network.http.proxy.pipelining = true
network.prefetch-next = false
browser.cache.disk.enable = false
browser.cache.offline.enable = false
browser.sessionstore.privacy_level = 2
browser.sessionhistory.max_entries = 2
browser.display.use_document_fonts = 0
dom.storage.enabled = false
extensions.blocklist.enabled = false
Useful plugins:
it’s best to keep plugins at a minimum but here are some to consider
HTTPS Everywhere
Privacy Badger
Close n forget
ublock
Modify Headers
NoScript
RefControl
Adblock plus
You may consider visiting ip-check.info to see what data your browser is
sending.
Router Configuration
It’s recommended to get a router compatible with an open source
firmware. The two major recommended firmwares are Tomato and dd-
wrt. In some cases Tor, or a vpn can be run directly on the router, and
this can be useful if you find yourself forgetting at times to enable your
desired connection. A backup router only used for specific connections
may also be useful to swap in and out when secure connection is
needed.. For the crafty, a Raspberry Pi can be configured as a local
device to route connections through.
dd-wrt
www.dd-wrt.com/site/support/router-data…
Tor: do your own research
Raspberry Pi
raspberrypihq.com/how-to-turn-a-raspber…
makezine.com/projects/browse-anonymousl…
Anonymity Networking
Tor
The stand alone Tor daemon can be be found in the
Ubuntu/Debian/Arch package manager.
However, you may wish to visit this link and add their PPA to get the
latest version.
You can use Tor as a socks proxy once the service is started, either with
the browser bundle or Tor daemon.
Navigate to the Network Settings, and Proxy section of the desired
application.
Select Socks 4 Proxy and enter 127.0.0.1 port 9050.
i2p
Alternative to Tor, not as widely used since it requires some more
dependencies and not as simple setup. i2p addresses always display as
.i2p
Unlike tor i2p is a self contained network, it does not function as a proxy
with traditional exit nodes. It is generally used to browse with the
network of what are called eepsites.
3. for debian
IP Tables
2. sudo iptables -L
UFW
VPN
Community VPNs
Good for activists and journalists:
riseup.net
autistici.org
Paid VPNs
Recommended resource:
torrentfreak comprehensive VPN review (2014) (remember their claims,
are not a promise and even their systems could be vulnerable)
Free VPNs
I don’t recommend these at all but will list one that has been reliable.
You’ll have to search for more.
VPNBOOK.com
Of the free VPNs seems most reliable, please delicately read terms of
service and
utilize Tor on-top of the VPN with any sensitive content. Free VPNs are
often banned
from posting on many services due to trolling. You can search for others
but so far VPNBOOK just works.
Proxy Chains
Sometimes it may be necessary to use a proxy after the Tor exit node,
for instance to appear in a desired location, or if exit nodes are banned
on a service.
You will need to search for public socks proxy lists to populate.
Flash Firmware
Locate the firmware model of the motherboard on your computer and
flash it with a fresh version. Some deeper level attacks embed
themselves in the firmware, so it’s good practice for a clean start.
This guide shows how to install TAILS on a USB Drive from a Virtual
Machine
3. Double click on the extension package and it should open Virtual Box,
click install
4. Download TAILS
Select clone and install and follow the steps for installation
Once you’ve started tails you can create a persistent volume to store
static content
1. Next reboot you will be prompted if you wish to use persistent or not,
only use when necessary.
Linux (image files can be found at http://distrowatch.org)
Recommended base Operating Systems: Archlinux, or Kali, alternatives:
Debian Mint Ubuntu
although just using Tails as a bootable OS and having some persistent
storage is probably better than most can do in terms of hardening their
base system.
3. You may want to verify the file identities using the Signing key see
other sections on this.
Click file import appliance and select the Whonix Gateway .ova file:
Once workstation has finished booting you will see this screen.
You will keep both VM Windows open but all activities will be within the
Whonix-Workstation VM Window
Base System
Essentials:
Disk encryption – LVM Encryption during install, encrypt home directory
Bleachbit – clearing day to day files (RAM wiping is experimental but
worth it on shutdown)
secure-delete package – secure wiping content
2. Arch Security
3. Ubuntu Security
4. Debian Security
BleachBit
easy, less effective
First:
sudo apt-get install bleachbit
sudo bleachbit
You can “Shred” files and folders from the file menu, and wipe free
space, which may remove excess data that still exists, without pointers.
file→Shred files
file→Shred folder
file→wipe free space
DBAN
advanced, boot from usb/cd ideal when discarding a hard drive
Secure-Delete
hard mode, more secure deletion that bleachbit, easier to use if you
want to remove specific partitions or files, rather than complete wipe
with DBAN
you will need to boot off a usb/cd if you wish to wipe your primary hard
drive.
Properly deleting a drive will take time, if you’re in a hurry, you can at
least use fast mode.
First:
1 fdisk-l
1. cat /proc/swaps
if you are strapped for time, use -m for 7 passes or -s for simple 1 pass
“insecure mode”
1 sudo srm file
or
or
1 srm /dev/sddisk#
At the end you may also be interested at the end to wipe memory on the
system.
(-f is fast mode “insecure mode)
Enter:
1 sudo sdmem
Physical Destruction
Try to at least encrypt the disk first, if you have time to spare, follow the
instructions for disk erasure with DBAN.
Open the drive. Find the platter, score it, smash it. Then you will need to
locate any memory chips which may store cached files, and destroy them
as well. This is an important step, and can be missed easily. Remember
not to dispose in normal garbage as it’s not secure. Consider alternate
means of disposable for best measure.
Fun Fact: To “officially” destroy all remnants of magnetic data you’ll need
to heat it to 1500 kelvin.
Cold-Boot Attack
Older attack method recovering encryption keys stored in RAM. If
possible use DDR3 or better memory. When not at the computer always
shut down completely.
Basic Communications
Keep in mind that your use of grammar, spelling and language can be
used as identifying factors. It is possible to single you out based on your
specific ways of communication and link you to other public content
linked to your alternate identities. When attempting to communicate
anonymously remember not to mention nicknames, locations favorite
music, weather or any other information that can be used to reveal your
identity. Something that seems mundane and friendly can quickly be
used for identification.
Images
JPG, JPEG, TIF and WAV files store EXIF data, or Exchangeable image file
format, that can store sensitive information, including GPS-location, and
the unique ID of the device used. It is recommended to always use the
PNG format, and scrub any metadata, if you need to exchange an image.
One option is the Metadata Anonymisation Toolkit that comes with
TAILS, and also available at https://mat.boum.org/
Email Providers
No mail provider can be trusted completely no matter what their security
claims are. Utilize PGP as often as possible and utilize an anonymous
connection when connecting.
protonmail.ch
Protonmail is currently invite only and requires a wait time of anywhere
from a month or more to get in. However, it’s a highly respected secure
email solution. You can employ PGP and encrypted storage. They have a
favorable location
Tutanota.com
Tutanota offers encrypted mail-storage and the use of a one time
password, however PGP has to be done manually as there is no smtp or
imap mail servers. They have a favorable location that is difficult to
retrieve data from with legal orders.
mail2tor.com
While tor based mail providers have had a storied history. If PGP is
utilized for all communications, the threat is eliminated. If you receive
something compromising in plain text, don’t consider this information
secure, and inform any correspondents to employ PGP.
riseup.net
United States based privacy centric collective that offers mail and other
privacy capabilities.
openmailbox.org
free, secure email provider
startmail.com
paid email
pgp webmail client
offshore hosting more protected from spying
vmail.me
free, no personal information
account deletion
encrypted data storage
user details like ip address and user agent stripped from headers
autistici
privacy centric collective offering email, hosting, vpn and other
anonymity service
Jabber_XMPP/OTR
1. sudo apt-get install pidgin
2. go to tools→preferences
4. Go to proxy
5. Select Socks 4
7. Go to this link
8. Under Security
For OTR
1. you will need to generate a unique key
3. Disable logging
6. If a conversation is not private you will see a box saying Not Private
pond (pond.imperialviolet.org)
forward secure, asynchronous messaging for the discerning. Pond
messages are asynchronous, but are not a record; they expire
automatically a week after they are received. Pond seeks to prevent
leaking traffic information against everyone except a global passive
attacker.
scramble.io
secure messaging between scramble users
bitmessage.org
p2p encrypted messaging, like sending messages as Bitcoins
GNUPG/PGP Basics
A PGP Key is a unique identifier, do not re-use across accounts and
especially not with any public address.
Simple PGP On Linux
terminal
Ubuntu- sudo apt-get install gpa gnupg2
Arch- sudo pacman -s gpa gnupg2
Generating Keys-
If you open gpa it will guide you through creating your first key
don’t put real information unless intended, obviously
Either click refresh or restart gpa and the keys will appear
Click the clipboard
1. select your key-pair, and then select keys→export or import keys and
proceed
Verifying a message
gpa
1. select→keys→imports
2. paste the public key
3. Select window→clipboard
5. Click icon with the green key (hover over for title if hard to see)
Verify a file
1. gpa
2. select→keys→import
4. back to terminal
2. Open Thunderbird
3. Open Preferences→enigmail→Preferences
You can also cut and paste your messages from GPA into the message
window.
TAILS PGP
TAILS has an OpenPGP Applet – Visual Guide
Additional reading on PGP
Recommended Best Practices for PGP from Riseup.net or:
http://nzh3fv6jc6jskki3.onion/en/security/message-
security/openpgp/best-practices
Additional Reading:
GnuPrivacyGuardHowto
PGP (Pretty Good Privacy) and GnuPG (GNU Privacy Guard) notes
PGP Versions
PGP Versions can reveal the users operating system, and you should
research strange versions as some PGP Libraries are known to have
weak encryption.
SHA1 Sum
When the file is provided ideally a SHA1/MD5/PGP Sum will be provided.
It will look like a long string of characters.
In Linux terminal type: sha1sum filename
The output should be the same as the supplied string.
MD5 Sum
When a file is provided ideally an SHA1/MD5/PGP Sum will be provided.
It will look like a long string of characters.
In Linux terminal type: md5sum filename
The output should be the same as the supplied string.