
हल्का macOS डिटेक्शन एजेंट जो Santa के एंडपॉइंट सिक्योरिटी टेलीमेट्री पर आधारित है।

macOS के लिए हल्का डिटेक्शन साइडकार Santa जो स्थानीय रूप से CEL नियमों के साथ एंडपॉइंट सुरक्षा टेलीमेट्री का मूल्यांकन करता है और केवल मिलान किए गए डिटेक्शन सिग्नल को बैकएंड सर्वर पर अग्रेषित करता है।
प्रायोगिक. होम लैब और छोटे फ्लीट के लिए बनाया गया। प्रारंभिक रिलीज़ – बग और API परिवर्तनों की उम्मीद करें।
Santaman Santa के protobuf टेलीमेट्री स्ट्रीम को पढ़ता है, CEL अभिव्यक्तियों का उपयोग करके डिटेक्शन नियमों का मूल्यांकन करता है, और सुरक्षा सिग्नल को बैकएंड पर भेजता है। कच्ची टेलीमेट्री एंडपॉइंट पर रहती है—केवल डिटेक्शन ही अग्रेषित किए जाते हैं।
मुख्य क्षमताएं:
Santaman Santa के लिए एक डिटेक्शन साइडकार है, कोई और ESF क्लाइंट नहीं।
एक कस्टम ESF टूल बनाने के लिए Apple के प्रतिबंधित एंटाइटलमेंट, प्रोविज़निंग प्रोफाइल, और उच्च-मात्रा वाले एंडपॉइंट सुरक्षा घटनाओं के सावधानीपूर्वक हैंडलिंग की आवश्यकता होती है। Santa पहले से ही ऐसा करता है और उत्पादन में युद्ध-परीक्षित है।
Santamon का मूल्य:
Santa एंडपॉइंट सुरक्षा घटनाओं को विश्वसनीय और सुरक्षित रूप से ग्रहण करने का भारी काम संभालता है; Santamon डिटेक्शन तर्क और सिग्नल गुणवत्ता पर ध्यान केंद्रित करता है।
Santa Spool → Watcher → Decoder → Rules Engine → Signal Generator → Shipper → Backend
↓ ↓
┌────────────────────────┐
│ State DB (BoltDB) │
│ • Correlation windows │
│ • Baseline tracking │
│ • Signal queue │
└────────────────────────┘
Process lineage: in-memory cache (1h TTL, 50K max)
डेटा प्रवाह:
/var/db/santa/spool/new/) की निगरानी करता हैस्पूल जीवनचक्र:
santa.archive_dir (डिफ़ॉल्ट: /var/lib/santamon/spool_hits) में संग्रहीत किया जाता हैप्रक्रिया वंशावली:
tcc_modification के लिए macOS 15+ आवश्यक है)configs/examples/santa-config.mobileconfigSanta को protobuf घटनाएँ लिखने के लिए कॉन्फ़िगर किया जाना चाहिए। प्रदान की गई कॉन्फ़िगरेशन प्रोफ़ाइल का उपयोग करें:
# Review and customize, then install via System Settings
open configs/examples/santa-config.mobileconfig
# Verify
santactl status | grep "Log Type"
# Should show: Log Type | protobuf
git clone https://github.com/0x4d31/santamon.git
cd santamon
make build
sudo make install
यह स्थापित करता है:
/usr/local/bin/santamon/etc/santamon/config.yaml और rules.yaml/Library/LaunchDaemons/com.santamon.plist/var/lib/santamon//etc/santamon/config.yaml संपादित करें:
shipper:
endpoint: "https://your-backend.example.com:8443/ingest"
api_key: "${SANTAMON_API_KEY}"
LaunchDaemon plist में API कुंजी सेट करें:
# Generate strong API key
openssl rand -hex 32
# Edit LaunchDaemon
sudo nano /Library/LaunchDaemons/com.santamon.plist
# Add under EnvironmentVariables:
<key>SANTAMON_API_KEY</key>
<string>your-generated-key-here</string>
# Start service
sudo make start
# Monitor logs
make logs
मुख्य कॉन्फ़िग: /etc/santamon/config.yaml
agent:
id: "${HOSTNAME}"
shipper:
endpoint: "https://backend.example.com:8443/ingest"
api_key: "${SANTAMON_API_KEY}"
santa:
spool_dir: "/var/db/santa/spool" # Santa spool location
archive_dir: "/var/lib/santamon/spool_hits" # Archive spool files that produced alerts
stability_wait: "2s" # Wait before reading new files
rules:
path: "/etc/santamon/rules.yaml" # File or directory
state:
db_path: "/var/lib/santamon/state.db"
sync_writes: true # Fsync after writes (safer but slower)
first_seen:
max_entries: 10000 # LRU cache for baseline rules
windows:
max_events: 1000 # Max events per correlation window
shipper:
batch_size: 100 # Signals per batch
flush_interval: "30s" # Time between flushes
timeout: "10s" # HTTP request timeout
tls_skip_verify: false # NEVER true in production
सभी विकल्पों और विस्तृत टिप्पणियों के लिए configs/santamon.yaml देखें।
नियम CEL अभिव्यक्तियाँ हैं जो Santa घटनाओं का मूल्यांकन करती हैं। तीन प्रकार समर्थित हैं: सरल, सहसंबंध, और बेसलाइन।
rules:
- id: SM-014
title: "Non-interactive process invoking curl/wget"
description: |
Non-terminal, non-package-manager process launching curl or wget.
expr: |
kind == "execution" &&
event.execution.target.executable.path in ["/usr/bin/curl", "/usr/bin/wget"] &&
// Exclude interactive shells
!(
event.execution.instigator.executable.path.startsWith("/bin/bash") ||
event.execution.instigator.executable.path.startsWith("/bin/zsh") ||
event.execution.instigator.executable.path.startsWith("/bin/sh")
) &&