Wot Happened; The break in

by Tom Jones age 23 and 1/4

On Saturday the 8th march 2014 we did a run through of the MakeIt-Glo workshop. Afterwards I went to the pub, leaving my bag(laptop and camera) in the space. Ed and Calum stayed in the space.

Charlene text me and awoke the hangover at 0500 on the 9th. Unable to sleep I headed into the space to get my laptop and bag and shit. The time lock was disabled at 0657 when I came in and the main door was open for the world.

I came up the stairs and saw that the door to the kitchen area had been pried open and all round damaged. I saw a guy that I thought was a lock smith(hungover head is optimistic), he pointed at our door and said something like "It is locked". I unlocked the door and walked up to him, I fumbled questions about his name and what was going on. He went to leave, but I saw my (United Pixel Workers) laptop sticker sticking out of the bag.

I said it was my laptop, he put the bag down and I grabbed it, my camera and laptop charger. He placed both the bags he was holding on the floor. I walked across the lab and put my stuff in my bag then pulled out my phone. He said "I've called the police already" my witty retort was "Well I'm doing it again". As the police call center answered he disappeared down the stairs.

Police came and took immediate details and put out a bulletin. Anther robbery happened on king st while the officers where talking with my. Logic ties the two together to both me and the officers. A crime scene officer came and printed the broken door and the items we were sure he had touched.

This bloke didn't wear gloves, tried to break through an unlocked door and didn't manage to grab our beer money jar. He broke into a dentist, I have no idea what he was expecting to steal. The bastard tried to steal our drinks cupboard.

FreeBSD USB Installer

Years ago I got a copy of Designing BSD RootKits by Joseph Kong. A combination of lack of hardware and probably my own ability has stopped me from working through the book so far. But now with 57 North up and running and an influx of free machines I have everything I need.

The machine I have been given is part of an old biomed cluster and is really over powered for what I need. As a 2U server it doesn't have a floppy or CD drive to easily install an OS, but it does have the ability to boot off of a USB stick.

The first thing I tried to get a FreeBSD installer running was burning an ISO image to a USB stick with UNetBootin. I think the project might actually be dead as the newest version of FreeBSD it supports is 8.0. UNetBootin takes forever to set up the USB stick and after the second failed attempt I couldn't stomach another.

I dug around the FreeBSD install guides for a while and then found something that should have been really obvious. FreeBSD supports installation from USB and provides a pre packaged .IMG file to dd to the USB.

All the information is here with the USB stuff near the bottom. FreeBSD is nice enough to include simple instructions that work even from windows. This meant I could test the new media from work and all seems good.

Joining two sets with LINQ

Dealing with a horrible database this last week, I found the need to combine things in a reasonable way. It took a lot of searching to find out how to query on multiple sets. So thought I would put it here.

var roles = (from x in userRoles
                from y in editUser.UserRoles
                where y.SOXRole && y.Id == x.RoleId
                select x).ToList<DBModel.UserToRoles>();

I was pretty happy with it.

c# linq

Posted on

The Sky is not falling

Here is an article that explains in clear simple terms why the CIA Vault7 leaks are not the end of the world. If you consider yourself technical (which you do, you are reading a blog after all) you really have to help constrain the insanity in the face of leaks.

Just because you can read 'breaking signal by attacking the device' it does not mean that signal is broken. You have a responsibility to your friends and family, if they panic when they read the news and fall back to SMS because whatsapp is broken , the world is not becoming a better place.

Read what trusted security people say, validate their comments, help your family.


Reading: Gun Machine, The Difference Engine

Presentations with remarkjs

I enjoyed using mdp to write slides, being able to hammer in markdown gave a satisfying sense of flow and I felt like I was able to get the slides out of my head in a straightforward manner. But I knew for my eurobsdcon presentation I was going to have to include photos of equipment and maybe even demo videos.

Shelling out to vlc or feh for pictures and video wouldn't do, it would throw off both me and the audience. That ruled out using mdp for making slides and it also ruled out using sent from suckless

I canvassed around on mastodon and tried out a bunch of other tools, the main factor in ruling out most of the tools was there handling of very long titles. Something I couldn't avoid when the title of my talk was 84 charactars.

remarkjs was the tool I settled on.

remarkjs can take slides either as an external markdown file if you have a way to serve them to the js, or embedded into a html file. I ended up embedded the slides into the markdown as this was the fastest way to get from nothing to having some slides appearing. remarkjs has a boat of documentation, which I thourghouly ignored until after the presentation, in fact in the days after when I was toying with implementing a presentation view I found remarkjs already has one built in!

remarkjs was great for authoring into, the ability to add style to documents was a big bonus for me too. The fact there was style did mean I had to write some css to get videos into the right place in the slide was annoying, but it worked out well.

Integrating diagrams

My mdp slides included diagrams as most slide decks do, I wanted to add diagrams to this slide deck. The mdp diagrams are just ASCII art, showing ASCII art in a web page is fine, that is show I made a sharable version of the page, but I felt I could do better.

goat can render ascii art diagrams in a restricted set into svg diagrams.

example example example

Gives an svg diagram like:

svg

The svg output is very verbode and really not something you would want to embed in the middle of a slide deck.

svg quoted cut off

For this to be managable I wrote a python script to 'render' the document. The script searches the input for lines starting with 'diagram:' and takes the remainder of the line as a file name to render and substitute.

import sys
import subprocess

filename = sys.argv[1]
infile = open(filename, 'r')
outfile = open('out.html', 'w')

cmd = "cat"
cmd = "goat"

for l in infile:
    if l.startswith('diagram:'):
        if len(l.split(' ')) != 2:
            print('bad line {}'.format(l))
        diagram = 'diagrams/{}'.format(l.split(' ')[1].strip())

        result = subprocess.run([cmd, diagram], stdout=subprocess.PIPE, encoding='utf-8')
        if result.returncode == 0:
            count = 0
            outfile.write('.center[\n')
            for o in result.stdout.split('\n'):
            #    print('    ' + o)
                outfile.write(o + '\n')
            outfile.write(']\n')
        else:
            for o in result.stdout:
                print(o, end='')
            outfile.write(l)
    else:
        outfile.write(l)

infile.close()
outfile.close()

I really like remarkjs

I was happy enough using remarkjs that I was considering adding a presentation mode. However there are some downsides, firefox really struggled when rendering slides, when I had 40MB mp4 video files firefox would peg all cpus, as the slides were just a page the autoplaying video pulled firefox down all the time.

remarkjs "supports" exporting to pdf via chromes print preview, but all I could get chrome to do was hang. Someone else managed to get an export from safari, overall not the best.