Skip to content
All writing

Tagged

#rust

19 posts

Technical · 8 min

Attacking the Lies About Disk Layout

A flag hidden in the RAM disk with no name, a crafted directory entry that reads it right out, and the one-field fix that turns 'in the image' into 'in the data.' A bounds check is only as trustworthy as the bound it compares against.

Read
Technical · 10 min

The confused deputy

I planted a flag on a kernel-only page and wrote a ring-3 program to steal it. The CPU stopped the direct read cold — then my own syscall handed the flag over the moment it dereferenced a caller-chosen pointer. The one door the hardware cannot guard for you.

Read
Technical · 9 min

The first wall

Ring 3, a syscall gate, and the two bits that turn 'the kernel is the only program' into 'the kernel runs code it doesn't trust.' The first time in this project that the hardware, not my kernel's goodwill, holds code back.

Read
Technical · 10 min

The whole point, arrived at

Subdirectories, cd/pwd/ls/cat, and the moment the core arc — boot, memory, tasks, shell, files — is complete. Along the way I learned the hard way that a termination proof is not a safety proof: my validator provably terminated and still hid two denial-of-service bugs.

Read
Technical · 9 min

Files are just convincing lies about disk layout

I built a read-only filesystem for my from-scratch kernel, and the lesson is what a 'file' actually is: a directory table of {name, offset, length} over a flat run of bytes. The hard, security-relevant code isn't the reading — it's the refusing.

Read
Technical · 9 min

It has a prompt now

My from-scratch kernel runs its first interactive program: a shell, spawned as an ordinary task on the scheduler. The keyboard interrupt shrinks to 'enqueue one byte and return' — and the 'interactive code can't be tested' excuse falls apart.

Read
Technical · 9 min

Multiple things at once, sort of

I gave my from-scratch kernel a timer and its first scheduler. Two tasks take turns on one CPU — first politely, then by force — and the preemption step turned out to be a concurrency trap wearing a simple mechanism's face.

Read
Technical · 7 min

Room to grow

Milestone 8 of my AI-assisted OS build: the heap allocator. The kernel gains dynamic memory — Vec, Box, and String start working with no operating system underneath.

Read
Technical · 7 min

The illusion of memory

Milestone 7 of my AI-assisted OS build: paging and virtual memory. The kernel stops using the map the bootloader handed it and starts drawing its own — and survives the CR3 switch on the first try.

Read
Technical · 6 min

It knows what it has now

Milestone 6 of my AI-assisted OS build: physical memory management. The kernel finally learns how much RAM the machine has, and hands it out one 4 KiB frame at a time.

Read
Technical · 5 min

It Listens Now

Milestone 5 of my from-scratch Rust kernel: PS/2 keyboard input — the first time the machine reacts to the outside world instead of just talking at it. Remapping the PIC, enabling interrupts for the very first time, and learning why forgetting one EOI makes the keyboard die after exactly one keypress.

Read
Technical · 4 min

Teaching It to Fail Gracefully

Milestone 4 of my from-scratch Rust kernel: the IDT and exception handling — where the machine stops silently rebooting on a mistake and starts telling me what went wrong. The whole thing lives or dies on assembly and Rust agreeing about the shape of the stack.

Read
Technical · 4 min

Setting Up to Build Nothing

I'm building an x86-64 operating system from scratch in Rust, and this is milestone zero: a toolchain and an empty kernel that compiles for a machine that isn't my machine. No boot, no output — just the unglamorous groundwork where most OS projects quietly die.

Read
Technical · 9 min

Ten Rounds of Breaking My Own App: The Tools, and the Lessons

The bespoke tooling that made a ten-round self-pentest possible, the attacks that failed, the full round-by-round scoreboard, and the lessons that outlive the app. Part 4 of a four-part series.

Read
Technical · 11 min

The Flagship Encryption Feature That Never Actually Turned On

The eighth round of a self-pentest found MoodHaven's flagship 'encrypted at rest' feature had never engaged on any build — then a custom attack tool and a fix-the-fixes round closed the campaign. Part 3 of a four-part series.

Read
Technical · 11 min

The Bugs I Found Attacking My Own Journaling App — and the Bugs My Fixes Created

The confirmed vulnerabilities from a ten-round self-pentest of MoodHaven Journal: a readable database, silently lost edits, keys leaking over the LAN — and the critical bugs my own fixes introduced. Part 2 of a four-part series.

Read
Technical · 8 min

How I Tried to Break My Own Encrypted Journaling App — Ten Times

Why I ran a ten-round penetration test against my own privacy-first journaling app — the attack lab, the AI-orchestrated workflow, and the rules of engagement. Part 1 of a four-part series.

Read
Technical · 9 min

Changing a Password Is a One-Liner — Unless You Encrypt Everything

Crash-safe master-password rotation in a zero-knowledge journaling app: re-encrypting across two layers and two runtimes with a single atomic flip a kill -9 can't corrupt.

Read
Technical · 18 min

Seven Months of Vibe Coding: How I Built a Privacy-First Journal App with an AI Pair Programmer

Building MoodHaven Journal from scratch as a non-developer — zero-knowledge encryption, a Wear OS companion, peer sync, and what it actually takes to learn while you ship.

Read

Newsletter

Notes from building & climbing

New essays and short notes — privacy-first software, AI, security, and the occasional rambling from the trail. Every other week, no filler.