File Integrity Monitoring
Cara Kerja
- Baseline dibuat saat instalasi — SHA-256 hash semua file di path yang dikonfigurasi
- inotify monitor perubahan realtime
- Event dikirim ke panel jika ada modifikasi, penghapusan, atau pembuatan file
Anti-Tamper Binary Guard
Guard terpisah memantau binary agent itu sendiri:
// Setiap 30 detik
func checkBinaryIntegrity(cfg Config, expectedHash string) {
currentHash := hashFile(cfg.BinaryPath)
if currentHash == "" {
RestoreFromBackup(cfg) // Binary hilang, restore
return
}
if currentHash != expectedHash {
log.Printf("ALERT: Binary integrity violation!")
}
}