Homeserver at Home

Nov 14, 2018 - 5 minutes
What is a Homerserver and why should it be at home? Matrix is a federated messaging network. In other words, matrix is an alternative to IRC (slack, Facebook messenger or WhatsApp if you like), which allows everyone to run their own server. The benefits of running your own server, are your messages are stored on your hardware, this prevents administrators and hosting providers from reading your messages and checking out your contacts. Read more ...

Passmenu and i3

Jan 8, 2018 - 1 minutes
I always forget how to install a dmenu script. They’re simple bash scripts that are only limited by imagination. To ‘install’ them, dump it into your global path. Not sure why I can never remember, but because its such a simple system I can never find much documentation, plenty of scripts, but no docs. Locate the passmenu script, then symlink it to somewhere in $PATH, in my case I use /usr/bin. Read more ...

Syncthing

Jan 7, 2018 - 1 minutes
Happy New Year! - First post of the year. This is a post I had written back in October/2017, but since messing up the move from jekyll to hugo I had not gotten round to posting it. Install syncthing as suggested by their documentation. I like to use their apt repo over my distribution’s. Create directories for your user, so systemd will run it as that user: mkdir -p ~/. Read more ...

Notes from Belfast BSides 2017

Sep 7, 2017 - 2 minutes
Ain’t Nobody Got Time For That: Dynamic Malware Analysis for the Overworked Analyst Presenter: Edmund Brumaghin Software for lab Setting up a malware lab? Here are some tools. IPFire REMnux INETSim (Simulate services) FakeDNS - Might not be the one he was referring to. But you get the idea. RegShot (Registry Snapshot, and Directory contents) Able to identify some IOCs ProcessHacker (Real-time PID monitoring with colours) Read more ...

Zotero Standalone Linux

Jul 25, 2017 - 1 minutes
Download Zotero standalone, unzip to /opt/ Place the following in ~/.local/share/applications/zotero.desktop #!/usr/bin/env xdg-open [Desktop Entry] Type=Application Name=Zotero GenericName=Bibliography Manager Icon=/opt/Zotero_linux-x86_64/chrome/icons/default/default48.png Exec= /opt/Zotero_linux-x86_64/zotero %f Categories=Office Terminal=false By default zotero will place all its data in ~/.zotero. Knowing this you can save any highlighting and comments into the PDF document as long as its in the same location and name, zotero will sync it up. Updates This was written for zotero version 4, they have since updated to version 5. Read more ...

Encrypted Alpine Linux

Jan 28, 2017 - 2 minutes
Setting up basic LUKS encrypted alpine install. Create two partitions One for Boot and one for the rest. Make the boot partition bootable. /dev/sda1 - Boot /dev/sda2 - LUKS Setup Luks Create the encrypted block. cryptsetup -y -v luksFormat /dev/sda2 cryptsetup open /dev/sda2 cryptroot mkfs.ext4 /dev/mapper/cryptroot mount /dev/mapper/cryptroot /mnt Confirm its working as expected. umount /mnt cryptsetup close cryptroot cryptsetup open /dev/sda2 cryptroot mount /dev/mapper/cryptroot /mnt Setup Boot Format the boot partition. Read more ...

pdflatex runs out of memory

Jan 8, 2017 - 1 minutes
Happy New Year! - First post of the year. Error with pdflatex which complains about memory, something like this: 9287453 words of memory out of 18000000 Use lualatex - apparently it is meant to handle memory better. Then increase the allocated memory by editing /etc/texmf/texmf.d/00debian.cnf to include: main_memory=9000000 extra_mem_bot=9000000 font_mem_size=9000000 pool_size=9000000 buf_size=9000000 Update all the things, not sure which of these are needed: fmtutil-sys --all update-texmf texhash If it is still not working, check you have the luatex package installed: Read more ...

Firefox configuration steps

Dec 17, 2016 - 2 minutes
These are my notes for a new Firefox profile. I used to use Ghostry instead of Privacy Badger but decided for a lightweight option which does not push me towards having an account and will not sell my data. I use a separate password manager (see here) and don’t trust PDFs being opened with in firefox. (I like them contained in AppArmour) about:addons Extensions -> Disable Ubuntu Modifications Plugins -> Asks to Activate ‘Shockwave Flash’ Read more ...

Whitelist IP addresses based on SSH origin

Aug 13, 2016 - 1 minutes
Here is how you create a list of IP addresses, to be used with NGINX, based on successful ssh connections. $ cat /usr/bin/auth-list.sh #!/bin/bash WHITELIST=/etc/nginx/conf/whitelist.conf # Make sure that we don't add it more than once. if ! grep -q $PAM_RHOST $WHITELIST; then echo allow $PAM_RHOST\; >> $WHITELIST fi $ cat /etc/pam.d/sshd session optional pam_exec.so seteuid /usr/bin/auth-list.sh Login via ssh and it will add your external IP address to the list. Read more ...

Configuring OwnTrack to work With letsencrypt

Mar 21, 2016 - 1 minutes
These are some notes on getting OwnTracks to work with LetsEncrypt. Install mosquitto (MQTT Broker) and create a username password combination. apt install mosquitto mosquitto-clients mosquitto_passwd -c /etc/mosquitto/passwd <username> Using the letsencrypt client generate certs only as standalone. ./letsencrypt-auto certonly --standalone -d <domain> Navigate to /etc/letsencrypt/live/ and copy them to mosquitto. cp chain.pem /etc/mosquitto/certs/ cp cert.pem /etc/mosquitto/certs/ cat {privkey,fullchain}.pem >> /etc/mosquitto/certs/keyfile.pem In the mosquitto.conf add the following lines. Read more ...