Linux without running a VM

Work demands that I run a Windows 10 laptop but I no longer need to run a Linux VM on the side. Windows key > “features” Enable “Windows Subsystem for Linux” Probably restart Windows key > store Install Ubuntu 20 And you’re away! Accessing the WSL filesystem Access WSL from Windows: \\wsl$\Ubuntu-20.04 Access the host from WSL /mnt/c/Users Your argument is invalid A very strange problem encountered in Kali on WSL: if sleep doesn’t work you might get really bizarre libc6 errors whilst installing packages. [Read More]

Linux security


Creating a Linux password hash like you find in /etc/shadow.

mkpasswd --method=sha-512 --salt=Kf0TqvhN

Cracking a KeePass2 master password with John the Ripper.

john <(keepass2john easy.kdbx)

Creating a rogue Wi-Fi access point

Using a Kali Linux bootable USB drive

Disclaimer: I think it goes without saying that you should only be doing this sort of caper on networks you own. But if nothing else it should disuade you from using public Wi-Fi networks. Download the latest Kali Linux ISO and create a bootable USB drive. Restart your computer and boot into Kali via the BIOS. You need two network connections so tether your phone with a cable leaving the built-in Wi-Fi for your rogue access point. [Read More]

Resetting a forgotten Windows password

When you’ve misplaced the password to a local Windows account. Seen to work on Windows 2000, 7 and 10. Prerequisites: a 4GB USB stick and a machine capable of creating a USB boot disk (Ubuntu is good). Time to complete: half an hour to download Kali and create the stick and a few minutes to reset a password. Download the latest Kali Linux ISO and create a USB boot disk on another machine. [Read More]

Network analysis

On the Linux command line

For the purposes of this exercise we’re not employing any nefarious means to gain access to packets. Generally Ethernet switches attempt to intelligently direct packets to only the intended host so an ordinary machine sat on a subnet will only receive its own packets and broadcasts. But unsolicited broadcasts will at least show you some other active IPs on the network. You want to get “in the way” of as much data as possible so if you can run these tests on the router then even better. [Read More]

Cloud computing

Play With Docker Amazon Web Services Digital Ocean Google Cloud Hybrid Cloud Cloud9 versus Google Cloud SSH Google’s is slightly slicker, more tightly integrated with the instance browser. The Google web SSH client is so close to the real thing that you quickly forget what’s going on. Cloud9 IDE is quite nice, Sublime-style editor. But slightly odd ctrl codes remind you that you’re not actually typing into a real terminal. [Read More]

Create a Twitter bot

Using twurl and Google Cloud

Prerequisites: a Twitter account, moderate command line and Google Cloud experience. Time to complete: a couple of hours. Alternatively you might consider GitLab hosting. Developer account Apply for a Twitter dev account, create an app and make a note of the two API keys. Keep them to yourself. Google Cloud hosting Create the smallest (and cheapest) Linux instance on Google Cloud. Installation Connect to your instance and install the essentials. [Read More]


A Linux JUCE application that extracts the peak FTT bin from a live audio recording and reports the closest note

Screenshot is highlighting the major 3rd of an A chord: 440, 550 and 660Hz. Note the FFT bin is not a precise pitch so the closest concert pitch is displayed. See the source on GitHub. Note mapping #include <iostream>#include <map>#include <vector> const std::map<double, std::string> notes{ // Catch all for lower bound search {0.0, "Bx"}, // All the notes we're interested in. At the low end a single Fourier bin // will map to multiple notes. [Read More]

Generate a network topology

From a hosts file

tracehost is a bash script that parses a standard hosts files and generates an SVG. The script accepts a standard system hosts file format but actually it only cares about the first host or IP on a line. In fact any line format may be used as long as each line begins with something that can be pinged. localhost # for local people - google # Zero waste The image below is generated as a daily GitLab cron job. [Read More]