How alegrey91/harpoon works
Main Components
a) Core Components:
• CLI Interface (cmd/ directory)
• eBPF Program (ebpf/ directory)
• Internal Services Layer (internal/ directory)
• Analysis Engine (internal/analyzer)
• System Call Capture System (internal/ebpf/probesfacade)
b) Supporting Components:
• ELF Reader (internal/elfreader)
• Archive Management (internal/archiver)
• Seccomp Profile Generation (internal/seccomputils)
┌─ User Interface Layer ─────────────────────┐
• CLI Commands (analyze, build, capture, etc)│
• ┬───────────────────────┘
• ↓
┌─ Core Services Layer ──────────────────────┐
• ┌─────────────┐ ┌──────────┐ ┌─────────┐ │
• eBPF Program │←→│ Analyzer │ │ Archive │ │
• ┘ └──────────┘ └─────────┘ │
• ┬───────────────────────┘
• ↓
┌─ System Integration Layer ─────────────────┐
• ┌──────────┐ ┌────────────┐ ┌──────────┐ │
• ELF Reader│ │Probe Facade│ │Seccomp │ │
• ┘ └────────────┘ └──────────┘ │
• ┬───────────────────────┘
• ↓
┌─ Kernel Interface Layer ───────────────────┐
• System Calls & eBPF Hooks │
• ┘
Important Relationships
a) Data Flow:
• Command flow from CLI to core services
• eBPF program interaction with kernel
• Syscall capture flow from kernel to analysis
• Output generation path
b) Component Dependencies:
• eBPF program dependency on kernel hooks
• Analyzer dependency on eBPF program output
• CLI commands' dependencies on internal services
Technical Details to Highlight
• eBPF program compilation and loading process
• Syscall capture mechanism
• Security profile generation
• Archive management for captured data