7.2 KiB
BigBrother Condo Daemon: Implementation Plan
Status Summary
The BigBrother daemon has been running since March 25 but is completely non-functional. All modules fail silently. Root cause: 5 cascading issues blocking module startup.
DevTrack Items Created
- #187: Issue 1 — Auto-detect active network interface
- #188: Issue 2 — Instantiate CaptureBus in Engine
- #189: Issue 3 — Seed database tables
- #190: Issue 4 — Track module startup state
- #191: Issue 5 — Diagnose LUKS encrypted storage
Issue Analysis & Fix Strategy
Issue 1: Wrong Network Interface (CRITICAL - Hard Blocker)
Current State:
CaptureBus.__init__defaults to"eth0"PacketCapture.DEFAULT_INTERFACE="eth0"bigbrother.yamlhasprimary_interface: "auto"but auto-detection doesn't propagate- Condo Pi is on
wlan0(10.0.0.0/24).eth0has no carrier → capture fails
Root Cause:
- No active interface detection function exists
- Hardcoded defaults override config values
- Config "auto" value is never resolved
Files to Change:
core/capture_bus.py— Remove hardcoded "eth0", accept interface param in initmodules/passive/packet_capture.py— Remove DEFAULT_INTERFACE, read from configcore/engine.py— Adddetect_active_interface()callbigbrother.py— Resolve "auto" before passing to Engine
Parallel Capability: Independent before Issue 2.
Issue 2: CaptureBus Never Instantiated (CRITICAL - Hard Blocker)
Current State:
core/capture_bus.pyexists and is well-implementedcore/engine.pyhas NO code to instantiate CaptureBus or inject into module configs- 15+ passive modules call
self.config.get("capture_bus")→ all get None → bail
Affected Modules:
- dns_logger, host_discovery, credential_sniffer, traffic_analyzer, tls_sni_extractor, os_fingerprint, quic_analyzer, rdp_monitor, smb_monitor, ldap_harvester, kerberos_harvester, vlan_discovery, network_mapper, cloud_token_harvester, auth_flow_tracker
Files to Change:
modules/base.py— Addrequires_capture_bus = Falseclass attributemodules/passive/*.py(15 files) — Setrequires_capture_bus = Truecore/engine.py— Instantiate CaptureBus, start it, inject into module configsbigbrother.py— Document dependency
Parallel Capability: Depends on Issue 1. Module prep work (flags) can run in parallel.
Issue 3: Database Tables Not Seeded (CRITICAL - Blocking 2 modules)
Current State:
ja3_spooferreads fromja3_profilestable → doesn't exist → crashesmac_managerreads frommac_profilestable → doesn't exist → crashesscripts/build_data.pydoesn't seed these tables
Files to Change:
scripts/build_data.py— Addcreate_ja3_profiles_db()+create_mac_profiles_db()setup.sh— Ensure new functions are called
Parallel Capability: Independent. Can run in parallel with Issues 1+2.
Issue 4: Module Status Never Written (BLOCKING Status Checks)
Current State:
- Modules crash before calling
state.set_module_status("running") - Engine returns True (process created, not "running") before module actually initializes
statuscommand shows "No modules registered"
Files to Change:
core/state.py— Ensure states: pending, starting, running, failed, stoppedcore/engine.py:start()— Write pending/starting states, catch initialization failurescore/engine.py— Add health check loop to detect process death
Parallel Capability: Depends on Issues 1+2. Can implement state machine separately.
Issue 5: LUKS Encrypted Storage Module (Lower Priority)
Current State:
encrypted_storagemodule fails to create LUKS container- Requires sudo access to condo Pi to diagnose
- Storage directory is root-owned, inaccessible without sudo
Action:
- Postpone until Issues 1-4 are fixed and deployed
- Then SSH to condo with sudo and investigate
Parallel Capability: Blocked by sudo access requirement.
Implementation Sequence
Phase 1 — Module Prep (Parallel, independent streams)
Stream A: Interface Detection
- Create
utils/network.pywithdetect_active_interface() - Commit
Stream B: Module Flags
- Add
requires_capture_bus = Trueto 15 passive modules - Add
modules/base.pyclass attribute - Commit
Stream C: Database Seeding
- Update
scripts/build_data.pywith JA3 + MAC table seeding - Update
setup.shto call both - Commit
Convergence: All three streams complete independently, zero merge conflicts.
Phase 2 — Engine Core Changes (Sequential)
Step 1: Engine initialization
- Add interface detection call in Engine.init
- Resolve config["network"]["primary_interface"] from "auto" to actual interface
- Commit
Step 2: CaptureBus instantiation & injection
- Instantiate CaptureBus(interface=resolved_iface) in Engine.init
- Inject into configs of modules with requires_capture_bus=True
- Commit
Step 3: Graceful lifecycle
- Call capture_bus.start() before start_all()
- Call capture_bus.stop() in stop_all()
- Commit
Step 4: Module startup state tracking
- Write "pending" before proc.start()
- Write "starting" after proc.start()
- Catch exceptions and write "failed"
- Add health check loop
- Commit
Phase 3 — Testing & Deployment
- Run pytest suite
- Deploy to condo with setup.sh
- SSH to condo: verify
bigbrother statusshows all modules "running" - Spot-check: verify dns_logger capturing DNS
- Mark DevTrack items for user approval
Conflict Risk Assessment
| Issue | Parallel | Risk | Reason |
|---|---|---|---|
| 1+2 | No | HIGH | Engine init depends on interface detection |
| 1+3 | Yes | LOW | Independent file changes |
| 1+4 | No | HIGH | Status tracking needs working modules (Issue 2 first) |
| 2+3 | Yes | LOW | Independent subsystems |
| 2+4 | No | MEDIUM | Both touch engine.py, but different sections |
| 3+4 | Yes | LOW | Database seeding independent of engine state |
File Inventory
NEW FILES
utils/network.py— Interface detection utilities
MODIFIED FILES (Core)
core/engine.py— Interface detection, CaptureBus instantiation, state trackingcore/capture_bus.py— Accept interface param (minimal change)core/state.py— Ensure state enum (minimal change)bigbrother.py— Config resolution (minimal change)modules/base.py— Add class attributes (minimal change)
MODIFIED FILES (Module Flags)
- 15 ×
modules/passive/*.py— Addrequires_capture_bus = True(1-line each) modules/active/ja3_spoofer.py— Flag (minimal)modules/active/mac_manager.py— Flag (minimal)
MODIFIED FILES (Data Seeding)
scripts/build_data.py— Add JA3 + MAC seeding functionssetup.sh— Ensure new functions called
Total Scope
- ~30 file edits (most are 1-line flag additions)
- 3 new functions
- 1 new file
- ~200 lines of logic in engine.py
- ~50 lines in build_data.py
- Zero new dependencies
Success Criteria
bigbrother statusshows all 15+ passive modules as "running"dns_loggeris capturing and logging DNS queries- No "requires capture_bus" errors in logs
- No database table errors from ja3_spoofer or mac_manager
- Graceful stop_all() terminates all modules and CaptureBus cleanly