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
Mon, 17 Feb 2014
Prereqruisites: Docker, Git, SSHFS.
Today we’re going to look at using Docker to create a WordPress installation with the Project Largo parent theme and a child theme stub for us to play with.
Hart Hoover has established an image for getting a WordPress installation up and running using Docker. For whatever reason, it didn’t work for me out-of-box but we’re going to use his work to get started.
Let’s make a place to work and move into that directory:
cd ~
mkdir project.largo.wordpress.docker
cd project.largo.wordpress.docker
We’ll clone the Docker/Wordpress project. For me, it couldn’t untar the latest WordPress. So we’ll download it outside the container, untar it and modify the Dockerfile to simply pull in a copy:
git clone https://github.com/hhoover/docker-wordpress.git
cd docker-wordpress/
ME=$(whoami)
wget http://wordpress.org/latest.tar.gz
tar xvf latest.tar.gz
sed -i 's/ADD http:\/\/wordpress.org\/latest.tar.gz \/wordpress.tar.gz/ADD \.\/wordpress \/wordpress/' Dockerfile
sed -i '/RUN tar xvzf \/wordpress\.tar\.gz/d' Dockerfile
Then, build the project which may take some time.
sudo docker build -t $ME/wordpress .
If you’ve not the images ready for Docker, the process should begin with something like:
Step 0 : FROM boxcar/raring
Pulling repository boxcar/raring
32737f8072d0: Downloading [> ] 2.228 MB/149.7 MB 12m29s
And end something like:
Step 20 : CMD ["/bin/bash", "/start.sh"]
---> Running in db53e215e2fc
---> 3f3f6489c700
Successfully built 3f3f6489c700
Once the project is built, we will start it and forward ports from the container to the host system, so that the Docker container’s site can be accessed through port 8000 of the host system. So, if you want to see it from the computer that you’ve installed it on, you could go to ‘HTTP://127.0.0.1:8000’. Alternatively, if your host system is already running a webserver, we could use SSHFS to mount the container’s files within the web-space of the host system.
In this example, however, we’ll just forward the ports and mount the project locally (using SSHFS) so we can easily edit the files perhaps using a graphical IDE such as NetBeans or Eclipse.
Okay, time to start our Docker image and find its IP address (so we can mount its files):
DID=$(docker run -p 8000:80 -d $ME/wordpress)
DIP=$(docker inspect $DID | grep IPAddress | cut -d '"' -f 4)
docker logs $DID| grep 'ssh user password:' --color
Copy the SSH password and we will make a local directory to access the WordPress installation of our containter.
cd ~
mkdir largo.mount.from.docker.container
sshfs user@$DIP:/var/www $HOME/largo.mount.from.docker.container
cd largo.mount.from.docker.container
PROJECT=$(pwd -P)
Now, we can visit the WordPress installation and finish setting up. From the host machine, it should be ‘HTTP://127.0.0.1:8000’. There you can configure Title, Username, Password, et cet. and finish installing WordPress.
Now, let’s get us some Largo! Since this is a test project, we’ll sacrifice security to make things easy. Our Docker WordPress site isn’t ready for us to easily install the Largo parent theme, so we’ll make the web directory writable by everybody. Generally, this is not a practice I would condone. It’s okay while we’re experimenting but permissions are very important on live systems!
Lastly, we’ll download and install Largo and the Largo child theme stub.
ssh user@$DIP 'sudo chmod -R 777 /var/www'
wget https://github.com/INN/Largo/archive/master.zip -O $PROJECT/wp-content/themes/largo.zip
unzip $PROJECT/wp-content/themes/largo.zip -d $PROJECT/wp-content/themes/
mv $PROJECT/wp-content/themes/Largo-master $PROJECT/wp-content/themes/largo
wget http://largoproject.wpengine.netdna-cdn.com/wp-content/uploads/2012/08/largo-child.zip -O $PROJECT/wp-content/themes/largo-child.zip
unzip $PROJECT/wp-content/themes/largo-child.zip -d $PROJECT/wp-content/themes
rm -rf $PROJECT/wp-content/themes/__MACOSX/
We are now ready to customize our Project Largo child theme!
Tags: Docker, Git, INN, Project Largo, SSHFS, Ubuntu, WordPress
Permalink: 20140217.project.largo.docker
Wed, 26 Jun 2013
The other day, I was updating one of my systems and I noticed that it had decided to communicate with me in Chinese. Since I don’t know a lick of Chinese, it made for a clumsy exchange.
It was Linux Mint (an Ubuntu variant), so a snip of the output from an ‘apt-get upgrade’ looked like this:

I’m pretty sure I caused it — but there’s no telling what I was working on and how it slipped past me. Anyway, it’s not a difficult problem to fix but I imagine it could look like big trouble.
So, here’s what I did:
> locale
The important part of the output was this:
LANG=en_US.UTF-8
LANGUAGE=zh_CN.UTF-8
If you want to set your system to use a specific editor, you can set $EDITOR=vi
and then you’re going to learn that some programs expect the configuration to be set in $VISUAL
and you’ll need to change it there too.
In a similar way, many things were using the en_US.UTF-8
set in LANG
, but other things were looking to LANGUAGE
and determining that I wanted Chinese.
Having identified the problem, the fix was simple. Firstly, I just changed it in my local environment:
> LANGUAGE=en_US.UTF-8
That solved the immediate problem but, sooner or later, I’m going to reboot the machine and the Chinese setting would have come back. I needed to record the change somewhere for the system to know about it in the future.
> vim /etc/default/locale
Therein was the more permanent record, so I changed LANGUAGE
there also, giving the result:
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE=”en_US.UTF-8”
LC_MONETARY=en_US.UTF-8
LC_MESSAGES=”en_US.UTF-8”
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=
And now, the computer is back to using characters that I (more-or-less) understand.
Tags: Chinese, CLI, LinuxMint, locale, terminal, Ubuntu
Permalink: 20130626.terminal.suddenly.chinese