Everything is a file

Intro I’ve been programming in C on unix for a long time - too long in fact. I was reminded recently by someone that everything is a file in Linux / Unix. Tip I am going to use the term Linux to cover off both Unix and Linux from here on I thought that I would write about this with some code examples, and given I’m currently working for a security company, I thought it would be useful to point out how to use this functionality for evil rather than good from a security perspective....

October 23, 2022 · 5 min · codecowboy.io

Code first api development

Intro I recently had a discussion with a friend about what was better with regards to creating API’s. Design First or Code First. The approaches are radically different. We debated back and forth a bit, and I decided what better way to figure this out than to do two four hour sprints and write about the results. This post is about the first sprint that I did which was the Code First approach....

July 22, 2022 · 11 min · codecowboy.io

Follow the white rabbit - Monitoring the network of a single process

Intro I was recently challenged with the single task of being able to monitor all connectivity in and out of a process. At first thought this is actually fairly easy. “I’ll just use tcpdump” I thought to myself. That single sentence lead me down a rabbit hole of processes, namespaces and the linux kernel. I thought that I would share my experiences of how to do this. Why do this at all?...

June 23, 2022 · 9 min · codecowboy.io