GnuPG/PGP and Evolution/Seahorse Private Key Woes

I have a quite simple setup: Fedora 23 on my Desktop, Ubuntu 16.04 on my Notebook and a YubiKey thrown into the mix. I do have my normal GnuPG key DD436203 that I’m using. There’s also an old and revoked key 3F5D00B6 with which I was testing my YubiKey with (note to myself: don’t use an YubiKey-crested private key as you cannot backup it). My main key offers an ElGamal 2048bit subkey – which does not work with the Yubikey (as that only supports 2048bit RSA). So I ’ve added a new subkey on my laptop. ...

December 1, 2016 · 4 min · 676 words · Andreas Happe

How (NOT) to hide OpenVPN behind HTTPS/SSL

Update 2017: Sadly I found out (thanks due to the comments on this blog post) that using port-share does not encapsulates subsequent traffic in normal TLS. So using this method will not fool Deep-Package Inspection Firewalls. If you need to mask all your traffic, this is not an option – you might need to investigate stunnel, information can be found here, here or here. I assume, that the higher success rate of this method could be related to some firewalls checking the target of the initial https request. This would yield a normal website with this setup and might be enough to fool some websites. ...

December 1, 2016 · 6 min · 1175 words · Andreas Happe

Firejail: Chroot on Speed

Firejail describes itself as a SUID program that reduces the risk of security breaches by restricing the running environment of running programs. We’ll just call it chroot or jail (for the BSDers out there). So, it’s SUID? First things first: it’s SUID, so if there’s an error within the firejail binary an attacker can gain root rights. This comes with the territory. How large is Firejail and how many dependencies does it have? It’s written in C and: ...

February 25, 2016 · 8 min · 1548 words · Andreas Happe

pathogen vs vundle

Pathogen was the first vim plugin management system that I’ve known of. The contender is Vundle which seems to be inspired in it’s configuration syntax (and name) by Ruby’s Bundler. So let’s compare those two. Pathogen Pathogen’s workings are quite easy to grasp: each plugin is a directory within “~/.vim/bundle/”; pathogen traverses through the plugin list and includes each one of them. Let’s see a sample directory: [~/.vim]$ ls -l bundle/ drwxr-xr-x 5 andy andy 4096 Sep 8 22:20 ag drwxr-xr-x 5 andy andy 4096 Sep 8 22:20 ctrlp.vim drwxr-xr-x 7 andy andy 4096 Sep 8 22:22 syntastic drwxr-xr-x 13 andy andy 4096 Sep 8 22:23 ultisnips drwxr-xr-x 7 andy andy 4096 Sep 8 22:26 vim-airline ... It gets really powerful when you store you ~/.vim directory within a git repository and share it between multiple computers. If you use git submodules for each plugin you even get versioned plugins for free. ...

February 18, 2015 · 3 min · 547 words · Andreas Happe

Capybara for automating Pen-Tests

After a successful penetration test a re-test is performed. The common approach is that the customer fixes the code and I perform the necessary steps to confirm that that initial security breach was closed. Sometimes it takes the customer a couple of tries to achieve that. Most security problems (XSS, CSRF, SQLi) can easily be automated tested, but I had problems automating server-side authentication and authorization problems. The test would have to emulate multiple parallel user sessions. The tests mostly consists of one session trying to access the resources of another user session. ...

September 9, 2014 · 3 min · 488 words · Andreas Happe

Migrating to Middleman

My blog has a history of migrations. It started as wordpress, then was converted Octopress. After Octopress was missing update-love and jekyll started to be actively maintained again it switched over to jekyll. And now, it finally is based upon Middleman. Sorry for any inconvinient bugs or layout errors that will happen during the migration. Why have I switched to middleman? as I’m a RoR devleoper it seems better suited for me. Jekyll always seemed to be the choice for “web designer that need to add some dynamic content” while middleman seems to incorporate the “web developer that needs some blog”-attitude nice integration with bundler existing plugins for deployment. This replaced a lot of custom cruft that I had to initially write for myself when I was using jekyll While in there I’ve switched from bootstrap to bourbon/neat/bitters. Let’s see how this works out. Wouldn’t mind the framework to be called Islay though. ...

September 9, 2014 · 1 min · 153 words · Andreas Happe

Using a (host) reverse-proxy together with LXC application servers

The basic idea is to move application servers into LXC containers while keeping the HTTP server part (which is also responsible for hosting static files) on the host system. Normally an incoming request would be handled by an HTTP server on the host as well as by an HTTP server on the virtualized client: browser -> http server(host) -> http server (guest) -> app-server (guest) I’m configuring the host HTTP server to directly communicate with the app worker, thus: ...

April 25, 2014 · 2 min · 407 words · Andreas Happe

How to convert an KVM image into a LXC container

KVM was an improvement over Xen for me. Still for many use-cases a LXC are a more performance, light-weight alternative – which also seems to be en vougue nowadays. Through switching to LXC I’ve reduced my overall memory usage a bit – the main benefit is, that processes within an LXC container are separated processes within the host system. This should allow the host system to manage memory (think cache, buffers, swap, etc.) more efficiently. ...

April 7, 2014 · 5 min · 888 words · Andreas Happe

How to use virt-install to install new virtual machines within libvirt/kvm

I’ve been using KVM and virt-install to manage virtual machines on one of my servers, this post shows how to use virt-install. According to the package management system I’m having the following packages installed: root@edgewalker ~ # dpkg -l | grep virt ii libvirt-bin 1.1.1-0ubuntu8.1 amd64 programs for the libvirt library ii libvirt0 1.1.1-0ubuntu8.1 amd64 library for interfacing with different virtualization systems ii munin-libvirt-plugins 0.0.6-1 all Munin plugins using libvirt ii openvpn 2.3.2-4ubuntu1 amd64 virtual private network daemon ii python-libvirt 1.1.1-0ubuntu8.1 amd64 libvirt Python bindings ii qemu-kvm 1.5.0+dfsg-3ubuntu5 amd64 QEMU Full virtualization on x86 hardware (transitional package) ii virt-top 1.0.7-1 amd64 show stats of virtualized domains ii virtinst 0.600.4-2ubuntu2.1 all Programs to create and clone virtual machines Storage-wise I’m using a LVM volume group called ‘vg0’ (which was imported into the libvirt configuration). ...

March 22, 2014 · 2 min · 290 words · Andreas Happe

Rogue Access Point and SSL Man-in-the-Middle the easy way

After I’ve tried setting up a rogue access point using squid and hostapd I’ve seen that KDE’s network-manager offers host access-point functionality. How easy is it to combine this with BURP for an SSL man-in-the-middle attack? Well some GUI clicking and 3 command line invocations.. The Hardware I bought two USB 802.11n wireless adaptorts on deal extrem, so far both of them work as an access point: a small whitish one for $5.55, perfect for working “undercover”. This was supported by a standard Ubuntu 13.10 installation. a larger one for $8.92, should have a better reception as it has an antenna (you see that I’m a software guy). Be aware that you’ll need a recent Kernel for this version, Kernel 3.13 in the upcoming Ubuntu 14.04 supports it. Setting up the Hardware Hostap was rather hard to setup, how is KDE faring? You can add a new “Wireless (shared)” network connection within the network manager (this was done with the network-manger in KDE 4.12, KDE 4.13 looks similar). ...

March 20, 2014 · 2 min · 419 words · Andreas Happe