Sun, 19 Feb 2017
Hello friends.
While the overall telos of this blog is to, generally speaking, convey code snippets and inspire the personal projects of others, today we’re going to do something a smidgeon different.
This will be a layman’s look at varied dimensions of information security from a comfortable distance. Over the years, I’ve secured servers, operating systems, medical data, networks, communications and I’ve unsecured many of these same things. The topics are too sprawling to be covered in a quick summary — but let’s find a point of entry.
Those of us who are passionate about information security are well aware of how daunting is the situation. For newcomers, it sometimes seems rather impossible. Pick any subject and there are probably well-informed and convincing experts in diametric equidistance from any “happy medium”.
Let’s imagine that (like most of us) you don’t have anything spectacular to protect. However, you dislike the idea of our ever-dissolving privacy. Therefore you want to encrypt communications. Maybe you begin to use Signal. However, there are criticisms that there is a “backdoor” (there is not). Further, there are accusations that open source projects are coded by those who can’t get real jobs. Conversely, open source projects are widely open for peer review. If it worries one enough they are free to review code themselves.
PGP can encrypt content but concerns surround algorithmic selections. Some are worried about metadata crumbs. Of course, there’s nothing preventing the frequent switching of keys and email addresses. You could use BitMessage, any number of chat solutions or drop at paste bins.
Let’s leave those concerns aside for when you’ve figured out what you’re intending to protect. These arguments surround any subject in information security and we’re not going to investigate them on a case by case basis. Least, not in this post.
At the coarsest granularity, the question is analogous to the practicality of locking your doors or sealing your post envelopes. Should I take measures toward privacy?
My opinion is rather predictable: of course you should!
There’s a very pragmatic explanation. If there ever comes a day when you should like to communicate privately, that’s a terrible time to start learning.
Take the easy road and start using some of the myriad tools and services available.
Should you decide to take InfoSec seriously, you’ll need to define a threat model.
That is: What am I protecting? From whom am I protecting? (e.g. what are probable attack vectors?)
That’s where you need to make choices about trusting products, protocols, methods, algorithms, companies, servers, et cet. Those are all exciting subjects to explore but all too often brushing up against them can be exasperating and cause premature burn-out.
That in mind, let’s employ the philosophy that any effort toward security is better than none and take a look at a few points where one might get wetted-toes.
If you have questions or want specific advice, there are several ways below to initiate a secure conversation with me.
Secure your browser:
Privacy Badger: Block tracking
HTTPS Everywhere: Increase your encryptioning
uBlock: Advertisements are for others
Secure communications:
Mailvelope: PGP email encryption for your major webmail provider (e.g., Gmail) | contact | pubkey
Tutanota: Encrypted webmail | Kontakt
Protonmail: Well-established provider of PGP encrypted webmail, featuring 2FA | kontakta
BitMessage: P2P encrypted communications protocol | contact: BM-2D9tDkYEJSTnEkGDKf7xYA5rUj2ihETxVR | Bitmessage channel list
[
Bitmessage in a Docker container ]
BitMessage.ch: BitMessage email gateway | contact
BitMsg.me: Online BitMessage service
Keybase.io: Keybase maps your identity to your public keys, and vice versa
Signal: PGP encrypted TXT messages
Wire: Encrypted chat, video and calls
RIOT: Open-source, IRC-based, Matrix; run your own server
Wickr: Encrypted ephemeral chat
[
n.b. Wickr’s .deb package seeks a unicode library (libicu52) which is not available to a recent Kali (or anything) install; .deb file is based on Ubuntu’s 2014 LTS release. Wickr in a Docker container ]
Explore alternate nets (e.g., Deep Web, Dark Net):
MaidSafe: Promising new alt-web project
Qubes: a reasonably secure operating system
FreeNet: Alt-net based primarily on already knowing with whom you intend to collaborate
Bitmask: VPN solution to anonymize your traffic
TAILS: A live operating system based on the Tor network
TorBrowser: Stand-alone browser for Tor (less secure than TAILS)
Whonix: the most secure (and complex) way to access the Tor network
i2p: an other approach to creating a secure and private alternate web
Morph.is: fun alt-net, aimed at producing The World Brain. Although, it’s future looks a lot less promising since the lead dev was killed.
ZeroNet: one more encrypted anonymous net
Have fun and compute safely!
Tags: 2FA, Bitmask, BitMessage, chat, EFF, encryption, FreeNet, HTTPS Everywhere, i2p, infosec, Kali, Keybase, MaidSafe, Mailvelope, Morph.is, paste bin, PGP, privacy, Privacy Badger, Protonmail, pubkey, Qubes, Signal, snarf.info, TAILS, threat model, TorBrowser, Tutanota, uBlock, Ubuntu, WhisperSystems, Whonix, Wickr, ZeroNet
Permalink: 20170219.privacy.prespective.primer
Sat, 25 Jan 2014
My primary machines are *nix or BSD variants, though I certainly have some Windows-based rigs also. Today we’re going to share some love with Windows 7 and PowerShell.
One of my favorite utilities is Synergy. If you’re not already familiar it allows to you seamlessly move from the desktop of one computer to another with the same keyboard and mouse. It even supports the clipboard so you might copy text from a GNU/Linux box and paste it in a Windows’ window. Possibly, they have finished adding drag and drop to the newer versions. I am not sure because I run a relatively old version that is supported by all of the machines that I use regularly.
What’s the problem, then? The problem was that I was starting my Synergy client by hand. Even more disturbing, I was manually typing the IP address at work and at home, twice or more per weekday. This behavior became automated by my brain and continued for months unnoticed. But this is no kind of life for a geek such as myself, what with all this superfluous clicking and tapping!
Today, we set things right!
In my situation, the networks that I use happen to assign IP addresses from different subnets. If you’ve not the convenience of that situation then you might need to add something to the script. Parsing an ipconfig/ifconfig command, you could possibly use something like the Default Gateway or the Connection-specific DNS Suffix. Alternatively, you could check for the presence of some network share, a file on server or anything that would allow you to uniquely identify the surroundings.
As I imagined it, I wanted the script to accomplish the following things
- see if Synergy is running (possibly from the last location), if so ask if we need to kill it and restart so we can identify a new server
- attempt to locate where we are and connect to the correct Synergy server
- if the location is not identified, ask whether to start the Synergy client
This is how I accomplished that task:
# [void] simply supresses the noise made loading 'System.Reflection.Assembly'
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
# Define Synergy server IP addresses
$synergyServerWork = "192.168.111.11"
$synergyServerHome = "192.168.222.22"
# Define partial IP addresses that will indicate which server to use
$synergyWorkSubnets = "192.168.111", "192.168.115"
$synergyHomeSubnets = "192.168.222", "192.168.225"
# Path to Synergy Client (synergyc)
$synergyClientProgram = "C:\Program Files\Synergy\synergyc.exe"
# Path to Syngery launcher, for when we cannot identify the network
$synergyLauncherProgram = "C:\Program Files\Synergy\launcher.exe"
# Remove path and file extension to give us the process name
$processName = $synergyClientProgram.Substring( ($synergyClientProgram.lastindexof("\") + 1), ($synergyClientProgram.length - ($synergyClientProgram.lastindexof("\") + 5) ))
# Grab current IP address
$currentIPaddress = ((ipconfig | findstr [0-9].\.)[0]).Split()[-1]
# Find the subnet of current IP address
$location = $currentIPaddress.Substring(0,$currentIPaddress.lastindexof("."))
function BalloonTip ($message)
{
# Pop-up message from System Tray
$objNotifyIcon = New-Object System.Windows.Forms.NotifyIcon
$objNotifyIcon.Icon = [System.Drawing.Icon]::ExtractAssociatedIcon($synergyClientProgram)
$objNotifyIcon.BalloonTipText = $message
$objNotifyIcon.Visible = $True
$objNotifyIcon.ShowBalloonTip(15000)
}
#main
# If Synergy client is already running, do we need to restart it?
$running = Get-Process $processName -ErrorAction SilentlyContinue
if ($running) {
$answer = [System.Windows.Forms.MessageBox]::Show("Synergy is running.`nClose and start again?", "OHNOES", 4)
if ($answer -eq "YES") {
Stop-Process -name $processName
}
Else {
exit
}
}
# Do we recognize the current network?
if ($synergyWorkSubnets -contains $location) {
BalloonTip "IP: $($currentIPaddress)`nServer: $($synergyServerWork)`nConnecting to Synergy server at work."
& $synergyClientProgram $synergyServerWork
exit
}
ElseIf ($synergyHomeSubnets -contains $location) {
BalloonTip "IP: $($currentIPaddress)`nServer: $($synergyServerHome)`nConnecting to Synergy server at home."
& $synergyClientProgram $synergyServerHome
exit
}
Else {
$answer = [System.Windows.Forms.MessageBox]::Show("Network not recognized by IP address: {0}`n`nLaunch Synergy?" -f $unrecognized, "OHNOES", 4)
if ($answer -eq "YES") {
& $synergyLauncherProgram
}
}
Then I saved the script in "C:\Program Files\SynergyStart\"
, created a shortcut and used the Change Icon button to make the same as Synergy’s and made the Target:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -WindowStyle Hidden & 'C:\Program Files\SynergyStart\synergy.ps1'
Lastly, I copied the shortcut into the directory of things that run when the system starts up:
%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup
Now, Synergy connects to the needed server at home and work. If it can’t figure out where it is, it asks if it should run it at all.
As they say, a millisecond saved is a millisecond earned.
This post was very nearly published without a Linux equivalent. Nearly.
Same trick for bash/zsh:
#!/bin/zsh
# Define Synergy server IP addresses
synergyServerWork="192.168.111.11"
synergyServerHome="192.168.222.22"
# Define partial IP addresses that will indicate which server to use
synergyWorkSubnets=("192.168.111" "192.168.115")
synergyHomeSubnets=("192.168.222" "192.168.225")
# Path to Synergy Client (synergyc)
synergyClientProgram="/usr/bin/synergyc"
# Path to QuickSyngery, for when we cannot identify the network
synergyLauncherProgram="/usr/bin/quicksynergy"
# Remove path and file extension to give us the process name
processName=`basename $synergyClientProgram`
# Grab current IP address, assumes '192' is in use. (e.g., 192.168.1.1)
currentIPaddress=`ip addr show | grep 192 | awk "{print $2}" | sed 's/inet //;s/\/.*//;s/ //g'`
# Find the subnet of current IP address
location=`echo $currentIPaddress | cut -d '.' -f 1,2,3`
for i in "${synergyWorkSubnets[@]}"
do
if [ "${i}" = "${location}" ]
then
break
fi
done
#main
# If Synergy client is already running, do we need to restart it?
running=`ps ax | grep -v grep | grep $processName`
if [ $running ]
then
if `zenity --question --ok-label="Yes" --cancel-label="No" --text="Synergy is running.\nClose and start again?"`
then
pkill $processName
else
exit
fi
fi
# Do we recognize the current network?
for i in "${synergyWorkSubnets[@]}"
do
if [ "${i}" = "${location}" ]
then
notify-send "IP:$currentIPaddress Server:$synergyServerWork [WORK]"
$synergyClientProgram $synergyServerWork
exit
fi
done
for i in "${synergyHomeSubnets[@]}"
do
if [ "${i}" = "${location}" ]
then
notify-send "IP:$currentIPaddress Server:$synergyServerWork [HOME]"
$synergyClientProgram $synergyServerHome
exit
fi
done
if `zenity --question --ok-label="Yes" --cancel-label="No" --text="Network not recognized by IP address: $currentIPaddress\nLaunch Synergy?"`
then
$synergyLauncherProgram
fi
To get it to run automatically, you might choose to call the script from /etc/init.d/rc.local
.
Download here:
PowerShell:
synergy.ps1
GNU/Linux:
synergy.sh
Tags: PowerShell, script, Syngery
Permalink: 20140125.network_aware_synergy_client
Thu, 13 Jun 2013
Last we were discussing the structure and design of your own CLI-centric blog platform, we had some crude methods of starting and resuming posts before publishing.
Today, let’s explore a little more into setting up a bloging-friendly environment because we need to either make the experience of blogging easy or we’ll grow tired of the hassle and lose interest.
We can reasonably anticipate that we won’t want to beleaguered with repetitious typing of HTML bits. If we’re going to apply paragraph tags, hyperlinks, codeblocks, etc. with any frequency, that task is best to be simplified. Using Vim as our preferred editor, we will use Tim Pope’s brilliant plug-ins ‘surround’ and ‘repeat’, combined with abbreviations to take away the tedium.
The plug-ins just need dropped into your Vim plugin directory (~/.vim/plugin/
). The directory may not exist if you don’t have any plug-ins yet. That’s no problem, though. Let’s grab the plugins:
cd ~/.vim/
wget "http://www.vim.org/scripts/download_script.php?src_id=19287" -O surround.zip
wget "http://www.vim.org/scripts/download_script.php?src_id=19285" -O repeat.zip
Expand the archives into the appropriate directories:
unzip surround.zip
unzip repeat.zip
Ta-da! Your Vim is now configured to quickly wrap (surround) in any variety of markup. When working on a blog, you might use <p>
tags a lot by putting your cursor amid the paragraph and typing yss<p>
. The plug-in will wrap it with opening and closing paragraph tags. Move to your next paragraph and then press .
to repeat.
That out of the way, let’s take advantage of Vim’s abbreviations for some customization. In our .vimrc
file, we can define a few characters that Vim will expand according to their definition. For example, you might use:
ab <gclb> <code class="prettyprint lang-bsh linenums:1">
Then, any time you type <gclb>
and bress <enter>, you’ll get:
<code class="prettyprint lang-bsh linenums:1">
The next time that we take a look at blogitecture, we will focus on making the posts convenient to manage from our CLI.
Tags: abbreviations, blogitecture, repeat.vim, surround.vim, Vim
Permalink: 20130613.blogitechture.continued
Sun, 09 Jun 2013
In an effort to promote practical privacy measures, when I send people links to search engines, I choose ixquick. However, my personal settings submit my search terms via POST data rather than GET, meaning that the search terms aren’t in the URL.
Recently, I’ve found myself hand-crafting links for people and then I paste the link into a new tab, to make sure I didn’t fat-finger anything. Not a problem per se, but the technique leaves room for a bit more efficiency. So I’ve taken the ‘A Search Box on Your Website’ tool offered by ixquick and slightly modified the code it offers, to use GET variables, in a new tab where I can then copy the URL and provide the link to others.
You can test, or use, it here — I may add it (or a variant that just provides you the link) to the navigation bar above. First, though, I’m going to mention the need to the outstanding minds at ixquick because it would make a LOT more sense on their page than on mine.
Tags: ixquick, search
Permalink: 20130609.ixquick.search
Thu, 30 May 2013
In this writer’s opinion, it is vitally important that we take reasonable measures now to help insure anonymity, lest we create a situation where privacy no longer exists, and the simple want of, becomes suspicious.
Here’s how to configure your browser to automatically use a search engine that respects your privacy.
Chrome:
- Click Settings.
- Click “Set pages” in the “On startup” section.
- Enter
https://ixquick.com/eng/
in the “Add a new page” text field.
- Click OK.
- Click “Manage search engines…”
- At the bottom of the “Search Engines” dialog, click in the “Add a new search engine” field.
- Enter
ixquick
ixquick.com
https://ixquick.com/do/search?lui=english&language=english&cat=web&query=%s
- Click “Make Default”.
- Click “Done”.
Firefox:
- Click the Tools Menu.
- Click Options.
- Click the General tab.
- In “When Firefox Starts” dropdown, select “Show my home page”.
- Enter
https://ixquick.com/eng/
in the “Home Page” text field.
- Click one of the English options here.
- Check box for “Start using it right away.”
- Click “Add”.
Opera:
- Click “Manage Search Engines
- Click “Add”
- Enter
Name: ixquick
Keyword: x
Address: https://ixquick.com/do/search?lui=english&language=english&cat=web&query=%s
- Check “Use as default search engine”
- Click “OK”
Internet Explorer:
_ ___ _ __ ___ _ _____ ___
| | / _ \| |\ \ / / | | |_ _|__ \
| | | | | | | \ \ /\ / /| | | | | | / /
| |__| |_| | |__\ V V / | |_| | | | |_|
|_____\___/|_____\_/\_/ \___/ |_| (_)
(This is not a good strategy for privacy.)
Congratulations!
\o/
You are now one step closer to not having every motion on the Internet recorded.
This is a relatively small measure, though. You can improve your resistance to prying eyes (e.g., browser fingerprinting) by using the Torbrowser Bundle, or even better, Tails, and routing your web usage through Tor, i2p, or FreeNet.
If you would like more on subjects like anonymyzing, privacy and security then drop me a line via email or Bitmessage me: BM-2D9tDkYEJSTnEkGDKf7xYA5rUj2ihETxVR
Tags: \o/, anonymous, Chrome, Firefox, FreeNet, i2p, ixquick, LOLWUT, Opera, privacy, security, Tails, Tor, TorBrowser, TorBrowser-Bundle
Permalink: 20130530.hey.you.get.offa.my.data