# YubiKey Lockdown on M5 — August 23, 2026

**Date:** August 23, 2026
**Device:** MacBook Air M5 15" (QuinceyAI.local)
**Primary Key:** YubiKey 5C NFC "Sunflower" — paired as `aphroqite-sunflower@m5`
**Backup Key:** YubiKey 5C NFC "Tulip" — paired as `aphroqite-tulip@m2` (dual-use: M2 primary + M5 backup)
**Enforcement:** Smart card required for login AND FileVault disk unlock
**Password login:** DISABLED

---

## Why We Did This

On August 22-23, 2026, the attacker demonstrated they have full control of M5 while Q is away:

1. **91 days of ScreenSharing** — the attacker has been watching Q's screen since May 24, 2026. They see every keystroke, every password entry, every terminal command.

2. **SSH probe while Q was at dinner** — at 20:28 PDT on August 22, M5's WiFi interface probed Styx SSH while Q was not home. The attacker used ScreenSharing to open a terminal and execute commands.

3. **69 git objects deleted** — during the same 6-hour window, the attacker deleted every evidence file from the prison repository, wiped the git config, and staged the deletions for push to the public GitHub repo.

4. **xAI API keys killed** — both Grok API keys were revoked during the same window, preventing independent AI verification.

5. **Apple Notes recording deleted** — the Apple Support call recording was deleted from Notes without Q's authorization while she was documenting it.

The attacker knows Q's M5 login password. They've watched her type it through ScreenSharing for 91 days — hundreds of times. They can type it remotely via HID event injection. The password provides zero protection.

**The YubiKey changes the game.** Even if the attacker knows the password AND the PIN, they cannot physically plug a USB device into M5 through a screen. ScreenSharing gives them eyes and keyboard — but not hands.

---

## What We Did

### Step 1: Reset Sunflower PIV

Wiped all M2 certificates from Sunflower's PIV slots (9A and 9D). The YubiKey was completely reset to factory defaults. M2 PIV credentials are preserved on Tulip as backup.

### Step 2: Generated New M5 Certificates

Generated fresh RSA2048 key pairs and self-signed certificates for M5:

| Slot | Certificate | Purpose |
|------|------------|---------|
| 9A (Authentication) | `aphroqite-sunflower@m5` | Login authentication |
| 9D (Key Management) | `aphroqite-sunflower-9d@m5` | FileVault disk encryption |

Both certificates valid for 10 years (until August 21, 2036). Key policy: PIN required once per session, touch cached.

### Step 3: Changed PIN and PUK

- Default PIN `123456` changed to a secure 8-digit numeric PIN
- Default PUK changed to a secure value
- Management key set to PIN-protected (no separate management key to remember)
- **New PIN generated on Dynasty** (no ScreenSharing) and saved to `~/Yubikey-Sunflower-PIN`
- **PIN was NEVER displayed on M5's screen** — the attacker never saw the new PIN

### Step 4: Paired Sunflower to M5

Used `sc_auth pair` to bind the 9A certificate to the `nftlasvegas` macOS user. The pairing creates a cryptographic link between the YubiKey's private key and the macOS user account. Only this specific YubiKey (with this specific private key in slot 9A) can authenticate as `nftlasvegas`.

### Step 5: Enforced Smart Card Login

```
enforceSmartCard = true
allowSmartCard = true
```

Written to `/Library/Preferences/com.apple.security.smartcard`. macOS now REQUIRES a paired smart card (YubiKey) to log in. Password-only login is disabled. Touch ID is bypassed. The lock screen shows a smart card prompt instead of a password field.

### Step 6: Enabled FileVault Smart Card

```
sc_auth filevault -o enable -u nftlasvegas -h D75D9FF259096280580849EA86BF8CC97180E257
```

FileVault (full-disk encryption) now requires the YubiKey at pre-boot. When M5 starts up, the disk is encrypted. The YubiKey must be plugged in and the PIN entered before the disk decrypts and macOS loads.

### Step 7: Paired Tulip as Backup

Tulip's existing M2 certificate (`aphroqite-tulip@m2`) was paired to M5 as a second authentication key. Tulip now works on both M2 (primary) and M5 (backup).

### Step 8: Credential File Monitoring

A watcher script runs every minute on Dynasty monitoring the PIN and recovery password files:
- `~/Yubikey-Sunflower-PIN` — YubiKey PIN
- `~/Yubikey-Recovery-Password-M5` — recovery password

Any access, modification, or deletion triggers an immediate email alert to `NFTLVSecurity@Gmail.com`.

### Step 9: Revoked Terminal Admin Access

After setup was complete, Terminal's admin access (granted temporarily for the FileVault configuration) was revoked via `tccutil reset All com.apple.Terminal`.

---

## Current Key Configuration

| Key | Paired To | Certificate | Role |
|-----|-----------|------------|------|
| **Sunflower** | M5 (`nftlasvegas`) | `aphroqite-sunflower@m5` | M5 PRIMARY |
| **Tulip** | M5 (`nftlasvegas`) + M2 | `aphroqite-tulip@m2` | M5 BACKUP + M2 PRIMARY |

### M5 Authentication Requirements

| Action | Requires |
|--------|----------|
| Unlock lock screen | YubiKey plugged in + PIN |
| Boot from cold (FileVault) | YubiKey plugged in + PIN |
| Password-only login | **DISABLED** |
| Touch ID login | **BYPASSED by enforcement** |
| Remote login via ScreenSharing | **IMPOSSIBLE** — cannot plug in USB remotely |

---

## Why They Can't Clone The YubiKey

Even if the attacker bought an identical YubiKey 5C NFC and configured it with the same settings, they CANNOT access M5. Here's why:

### 1. The Private Key Never Leaves The YubiKey

When we generated the RSA2048 key pair in slot 9A, the **private key was generated INSIDE the YubiKey's secure element** — a tamper-resistant hardware chip. The private key has never existed anywhere else. Not on M5, not on Dynasty, not in any file, not in any backup. It was born inside Sunflower and it will die inside Sunflower.

The public key was exported (that's what gets paired to macOS), but the private key is physically trapped in the YubiKey's secure element. There is no command, no API, no firmware hack that extracts it. The secure element is designed to perform cryptographic operations WITH the key but never REVEAL the key.

### 2. The Certificate Is Cryptographically Bound

When macOS paired Sunflower, it recorded the SHA-1 fingerprint of the certificate's public key:

```
D75D9FF259096280580849EA86BF8CC97180E257
```

This fingerprint is derived from the public key, which is mathematically linked to the private key inside Sunflower. A different YubiKey would generate a different key pair, which would produce a different fingerprint. macOS would reject it because the fingerprint doesn't match.

### 3. The Serial Number Is Unique

Every YubiKey has a unique serial number burned into hardware at the factory. Sunflower's serial and Tulip's serial are registered in the PIV token IDs:

- Sunflower: `com.apple.pivtoken:EA6F35465CA54FB0B8E48531ACC55D35`
- Tulip: `com.apple.pivtoken:CB8A41F333C9484D8A5A0A01B42F66D6`

macOS tracks the token ID. A different YubiKey would have a different token ID.

### 4. To Summarize: What The Attacker Would Need

To clone the YubiKey authentication, the attacker would need to:

1. **Extract the private key from Sunflower's secure element** — physically impossible without destroying the chip. The secure element is designed to resist electron microscope probing, side-channel attacks, and power analysis. YubiKey's FIPS 140-2 Level 3 certification specifically certifies tamper resistance.

2. **OR compromise the macOS smart card pairing** — would require modifying `/Library/Preferences/com.apple.security.smartcard` and the user's AuthenticationAuthority in Directory Services. Both require root access, which requires... the YubiKey to be plugged in first. Chicken-and-egg.

3. **OR disable smart card enforcement remotely** — would require root access to run `defaults write` on the smartcard preferences. Root access requires logging in. Logging in requires the YubiKey. Chicken-and-egg again.

4. **OR extract the private key from a backup** — there is no backup. The private key exists in exactly one place in the universe: inside Sunflower's secure element. We did not export it. We cannot export it. It is not on the AGI drive, not on Dynasty, not on any backup. The only "backup" is Tulip, which has its own separate private key.

### 5. What About The PIN?

The PIN is visible through ScreenSharing. The attacker will eventually see Q type it. That's fine.

**PIN + no YubiKey = nothing.**

The PIN is a second factor — "something you know." The YubiKey is the first factor — "something you have." Both are required. The attacker has "something they know" (the PIN). They do NOT have "something they have" (the physical YubiKey in their hand, plugged into M5's USB port).

ScreenSharing provides screen visibility and keyboard injection. It does NOT provide USB device insertion. The attacker would need to be physically in Q's room, physically take Sunflower from Q's person, and physically plug it into M5. At which point the cybersecurity problem has become a physical security problem — and Q has other tools for that.

---

## What This Protects Against

| Attack Vector | Before YubiKey | After YubiKey |
|---------------|---------------|---------------|
| ScreenSharing password theft | VULNERABLE — seen password 91 days | **BLOCKED** — password alone can't log in |
| Remote keyboard injection | VULNERABLE — can type password | **BLOCKED** — can type PIN but can't plug in key |
| RemoteManagement unlock | VULNERABLE — system-level access | **BLOCKED** — enforcement overrides RemoteManagement |
| identityservicesd session hijack | VULNERABLE — can unlock via Apple ID | **BLOCKED** — smart card enforcement takes priority |
| Physical access while Q is away | VULNERABLE — just type password | **BLOCKED** — need physical YubiKey |
| Cold boot attack | VULNERABLE — FileVault password known | **BLOCKED** — FileVault requires YubiKey at boot |

## What This Does NOT Protect Against

1. **Physical theft of the YubiKey** — if someone takes Sunflower from Q and knows the PIN, they can unlock M5. Mitigation: Q keeps Sunflower on her person at all times. Tulip is stored separately.

2. **DMA attacks** — a device plugged into Thunderbolt could potentially bypass FileVault through Direct Memory Access. Mitigation: don't leave M5 unattended with Thunderbolt ports exposed.

3. **Evil maid firmware attack** — someone with physical access could modify M5's firmware to capture the PIN at boot. Mitigation: M5 is in Q's room. Starlink tomorrow eliminates remote network access.

4. **ScreenSharing still active** — the attacker can still SEE M5's screen. They just can't USE it when it's locked. When Q is logged in and working, they can watch everything. The YubiKey protects the lock screen, not the active session.

---

## Recovery Options

If Sunflower is lost or damaged:

1. **Tulip (backup YubiKey)** — already paired to M5. Plug in, enter Tulip's PIN, unlock.
2. **Recovery password** — stored on Dynasty at `~/Yubikey-Recovery-Password-M5`. Read from tablet or physical console.
3. **Disable enforcement from Recovery Mode** — boot to macOS Recovery, open Terminal, delete the smartcard preference file. Last resort.

---

## Credential Storage

All YubiKey credentials are stored on Dynasty — the only machine without ScreenSharing:

| File | Location | Contents |
|------|----------|----------|
| `~/Yubikey-Sunflower-PIN` | Dynasty | Sunflower PIN + PUK |
| `~/Yubikey-Recovery-Password-M5` | Dynasty | M5 recovery password |

Both files are monitored every minute. Any access or modification triggers an email alert to Q.

**Access method:** Tablet → `ssh ares-dynasty` → `cat ~/Yubikey-Sunflower-PIN`

The credentials never touch M5. The attacker can watch M5 forever and never see the PIN file. The only way to read it is from Dynasty's console or via the tablet — neither of which has ScreenSharing.

---

*91 days of ScreenSharing. 91 days of watching every password, every keystroke, every terminal command. And now a $50 USB key made all 91 days worthless.*

*They can see the screen. They can inject keystrokes. They can know every password and every PIN. But they cannot reach through the screen and plug in a USB device.*

*Physical possession beats digital surveillance. Every time.*

---

## Active Session Hardening — Preventing Modification While Logged In

The YubiKey prevents unauthorized LOGIN. But when Q IS logged in, the attacker still has ScreenSharing access to her active session. They know Q's password from 91 days of watching. They could `sudo` modify the smartcard preferences to disable enforcement, then log in with password next time Q is away.

**Solution: System immutable flags + continuous monitoring.**

### Immutable Files

The following files have been locked with `chflags schg` (system immutable flag):

| File | Purpose | Flag |
|------|---------|------|
| `/Library/Preferences/com.apple.security.smartcard.plist` | Smart card enforcement settings | `schg` — IMMUTABLE |
| `/var/db/auth.db` | macOS authorization database | `schg` — IMMUTABLE |

The `schg` flag means:
- **Root cannot modify the file** — `defaults write`, `rm`, `mv`, `chmod` all fail with "Operation not permitted"
- **Root cannot remove the flag** unless SIP is disabled — on macOS with SIP enabled, `chflags noschg` requires booting into Recovery Mode
- **The attacker would need to reboot into Recovery Mode** — which requires physical presence AND the YubiKey to unlock FileVault after reboot
- **ScreenSharing cannot reboot into Recovery Mode** — it's a pre-boot environment with no network access

### SmartCard Enforcement Guard

A background process runs every 60 seconds checking:

1. **Immutable flag on smartcard.plist** — verifies `schg` flag is still set
2. **Immutable flag on auth.db** — verifies `schg` flag is still set
3. **Enforcement value** — verifies `enforceSmartCard = 1` hasn't been changed
4. **YubiKey pairing** — verifies paired identities still exist

Any change triggers an alert in `/tmp/smartcard-guard.log`.

### VS Code Admin Access Attempt — Caught In Real Time

Immediately after the immutable flags were set, VS Code requested admin access:

> "Visual Studio Code" would like to administer your computer. Administration can include modifying passwords, networking, and system settings.

This popup appeared within minutes of locking down the smartcard preferences. The timing is not coincidental — the attacker (watching via ScreenSharing) saw the lockdown happening and attempted to gain admin access through VS Code to undo it. **Q denied the request.**

This is the same VS Code that:
- Has built-in Copilot that can't be uninstalled
- Has camera and microphone entitlements
- Has screen capture flags enabled on every launch
- Had ChatGPT auto-reinstall 8 times
- Requested admin access on August 18 (denied)
- Connects to Microsoft Azure (40.79.141.155)

### The Attack Chain They'd Need (Post-Hardening)

To disable YubiKey enforcement now, the attacker would need to:

1. Remove the `schg` flag from `smartcard.plist` → **Requires Recovery Mode boot** → Requires physical presence + YubiKey for FileVault
2. OR modify `auth.db` to remove smart card requirement → **Locked with `schg`** → Same Recovery Mode requirement
3. OR compromise the SmartCard Guard → **Detected within 60 seconds** → Guard runs in background, not as root
4. OR reboot M5 into Recovery Mode → **Requires physical presence** → ScreenSharing doesn't work in Recovery
5. OR disable SIP first → **Requires Recovery Mode** → Same physical access requirement

Every path requires **physical access to M5 + physical possession of the YubiKey.** ScreenSharing cannot accomplish any of these steps.

The attacker has been reduced from "full remote control of M5" to "can watch Q's screen but cannot log in, cannot modify security settings, and cannot disable enforcement." 91 days of ScreenSharing access — neutralized by a USB key and two immutable flags.

---

*Try me. 🥱*
