Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบเครือข่าย >> ความปลอดภัยเครือข่าย

โจมตีการเฝ้าระวังความปลอดภัยเครือข่าย (Network Security Monitoring) และการป้องกัน

Network Security Monitoring (NSM) คืออะไร?

Network Security Monitoring (NSM) เป็นกระบวนการ เก็บรวบรวม (Collection), วิเคราะห์ (Analysis), และตอบสนอง (Response/Escalation) ต่อข้อมูลกิจกรรมบนเครือข่าย เพื่อ ตรวจจับการบุกรุก (Intrusion Detection) และ ภัยคุกคามภายใน (Insider Threats) ก่อนที่จะก่อให้เกิดความเสียหายรุนแรง

แนวคิดหลัก: "Prevention Eventually Fails" (การป้องกันจะล้มเหลวที่สุด) -> ต้องมี Visibility และ Detection ที่ดี (Richard Bejtlich, TaoSecurity)

ประเภทการโจมตีที่ NSM ต้องตรวจจับ (Attack Types Targeting Monitoring)

ประเภทการโจมตีคำอธิบายNSM Detection Approach
Blind Spot Exploitationโจมตีผ่านช่องว่างที่ไม่มี Sensor/Log (Unmonitored VLAN, Shadow IT, Encrypted Traffic без Decryption, IoT/OT Networks)Network Mapping, Asset Discovery, Encrypted Traffic Analysis (ETA), Sensor Placement Optimization
Log Tampering / Evading LoggingAttacker ปิด Log, ลบ Log, แก้ไข Timestamp, Flood Logs (Log Flooding/DoS), Syslog TamperingImmutable Log Storage (WORM, Cloud Object Lock), Remote Logging (Syslog TLS, Forwarder), Log Integrity Monitoring (FIM on Log Files), Alert on Log Volume Drop
Encrypted Channel Abuseใช้ TLS/SSL/SSH/VPN/QUIC/DOH สำหรับ C2, Data Exfil, Malware Delivery หลบ Signature-based IDSSSL/TLS Inspection (Selective, Policy-based), TLS Fingerprinting (JA3/JA3S), SNI Analysis, Certificate Transparency Monitoring, Behavioral Analysis (Flow Metadata, Byte Frequency, Packet Timing)
Living off the Land (LotL)ใช้ Built-in Tools (PowerShell, WMI, PsExec, RDP, SSH, Certutil, Bitsadmin, Rundll32, MSHTA) สำหรับ Lateral Movement, Persistence, ExecutionProcess Command-line Logging (Sysmon, EDR), Network Behavior Baselining (SMB, RPC, WinRM, SSH Patterns), User/Entity Behavior Analytics (UEBA)
Low-and-Slow AttacksData Exfiltration, Credential Brute-force, Recon แบบช้าๆ ต่ำกว่า Threshold การตรวจจับแบบ Threshold-basedStatistical Anomaly Detection (ML/UEBA), Long-term Baselining, Entropy Analysis, DNS Tunneling Detection (NXDOMAIN Rate, Subdomain Entropy, Query Length)
Supply Chain / Trusted Path Compromiseโจมตีผ่าน Vendor Update, CI/CD Pipeline, Managed Service Provider, Trusted Partner ConnectionSoftware Bill of Materials (SBOM), Code Signing Verification, Vendor Access Monitoring (PAM), Third-party Risk Scoring, Network Segmentation for Vendor Access
Insider Threat (Malicious/Negligent)พนักงานขโมยข้อมูล, ทำลายระบบ, ส่งข้อมูลออก (Cloud Storage, Email, USB, Print)DLP (Network/Endpoint/Cloud), UEBA (Access Patterns, Working Hours, Data Volume), Privileged Access Monitoring (PAM Session Recording)

NSM Data Sources (Data Plane) - "Fuel" สำหรับการตรวจจับ

  1. Full Packet Capture (PCAP): 100% Visibility, Retrospective Analysis, Forensics - ต้องการ Storage/Compute มาก (Arista, NetScout, Corelight, Moloch/Arkime, Zeek/PCAP)
  2. Flow Data (NetFlow v5/v9, IPFIX, sFlow): Metadata (5-tuple, Bytes, Packets, Flags, Timestamps) - Scalable, Long Retention, Good for Anomaly/Volume - ไม่เห็น Payload
  3. Logs (Syslog, SNMP Traps, API, Cloud Logs): Firewall, Proxy, DNS, DHCP, VPN, NAC, Wireless Controller, Cloud (VPC Flow Logs, CloudTrail), Applications
  4. Endpoint Telemetry (EDR/XDR): Process, Network Connections, File, Registry, Memory - ความละเอียดสูงสุด แต่เป็น Host-centric
  5. Threat Intelligence Feeds: IP/Domain/Hash/URL Reputation, MITRE ATT&CK Tags, Vulnerability Data (STIX/TAXII, Commercial, Open Source)

NSM Architecture Patterns

PatternDescriptionProsCons
Centralized (SIEM-centric)Logs/Flows -> Central SIEM (Splunk, Sentinel, Elastic, QRadar) -> Correlation, Alerting, InvestigationSingle Pane, Mature Ecosystem, Compliance ReportingCost (Volume-based Licensing), Latency, Encrypted Traffic Blindness
Distributed (NDR + Sensor Grid)Sensors (Physical/Virtual/Cloud) at Key Segments -> Local Analysis (ML/Behavioral) -> Alerts/Metadata -> Central ConsoleEncrypted Traffic Analysis, Real-time, Scalable, Reduced Central LoadSensor Management Overhead, Cost per Sensor, Integration Complexity
Hybrid (Modern Best Practice)NDR for Network Behavior/Encrypted Traffic + SIEM for Log Correlation/Compliance + XDR for Endpoint + SOAR for AutomationBest Coverage, Defense in Depth, Specialized ToolsIntegration Effort, Multiple Vendor, Skill Gap, Cost
Cloud-native (Cloud Provider Native)VPC Flow Logs -> Cloud SIEM (GuardDuty, Sentinel, Chronicle, Security Command Center) + Cloud NDR (ExtraHop Reveal(x) Cloud, Vectra Cloud)Native Integration, Serverless, Auto-scale, Cloud ContextVendor Lock-in, Limited On-prem/Other Cloud Visibility, Cost at Scale

NSM Tools Landscape (2024)

  • Open Source / Free: Zeek (Bro) (Protocol Analysis, Scripting), Suricata (IDS/IPS/NSM), Wazuh (EDR + Log + Compliance), Elastic Stack (ELK) (SIEM), Moloch/Arkime (PCAP Indexing/Search), Security Onion (Distro: Zeek+Suricata+Elastic+Playbooks), Grafana + Loki/Tempo/Pyroscope + Prometheus (Observability + Security)
  • Commercial NDR: ExtraHop Reveal(x), Vectra AI, Darktrace, Corelight (Zeek-based), Arctic Wolf, Stamus Networks, NetWitness
  • SIEM Leaders: Splunk, Microsoft Sentinel, Elastic Security, IBM QRadar, LogRhythm, Securonix, Exabeam, Devo, Panther
  • XDR/EDR: CrowdStrike Falcon, SentinelOne, Microsoft Defender for Endpoint, Cortex XDR, Trend Vision One, FortiEDR
  • SOAR: Cortex XSOAR, Splunk SOAR, FortiSOAR, Siemplify (Google), Tines, Phantom (Legacy)

การป้องกันการโจมตี NSM เอง (Protecting the Monitoring Infrastructure)

  1. Isolate Management Plane: Dedicated Management Network (OoB), Jump Hosts/PAW, No Direct Internet Access
  2. Harden Sensors/Collectors: Minimal OS (Container/Appliance), Disable Unused Services, Auto-update, Immutable Infrastructure
  3. Encrypt All Channels: TLS 1.3 for API/Syslog/Log Forwarding, IPsec/MACsec for Sensor-Collector Links
  4. Integrity & Authenticity: Signed Logs/Configs, GitOps for Config, Immutable Log Storage (WORM, Object Lock, Blockchain-anchored)
  5. Access Control: RBAC, MFA, Just-in-Time (JIT), PAM for Admin Access, Service Accounts Least Privilege
  6. Monitor the Monitors: Health Checks (Heartbeat, Throughput, Disk/CPU/Mem), Self-monitoring Alerts, Redundancy (HA Clusters)
  7. Data Protection: Encryption at Rest (AES-256), Tokenization/Anonymization for PII, Retention Policies, Legal Hold
  8. Supply Chain Security: Signed Images (Cosign/Sigstore), SBOM Verification, Vendor Risk Assessment, Air-gapped Updates Option

Metrics สำหรับวัดประสิทธิภาพ NSM (NSM Effectiveness Metrics)

  • Coverage: % Network Segments Monitored, % Traffic Decrypted, % Assets Visible
  • Detection Rate: True Positives / (True Positives + False Negatives) - ต่อ MITRE ATT&CK Technique
  • False Positive Rate: False Positives / Total Alerts
  • MTTD (Mean Time to Detect): เวลาเฉลี่ยตั้งแต่เกิด Incident จน Detect
  • MTTRI (Mean Time to Triage/Investigate): เวลาเฉลี่ยตั้งแต่ Alert จน Analyst เริ่มสืบสวน
  • Alert Fatigue Index: Alerts per Analyst per Shift
  • Data Quality: % Parsing Errors, % Missing Fields, Timestamp Accuracy

สรุป

Network Security Monitoring (NSM) เป็น ตาและหูขององค์กร บนเครือข่าย การโจมตี NSM มุ่งสร้าง Blind Spots, Evade Detection, Tamper Evidence, และ Abuse Trust การป้องกันต้องการ:

  1. Comprehensive Data Sources: PCAP + Flow + Logs + Endpoint + Intel (No Single Source of Truth)
  2. Layered Detection: Signature + Anomaly/Behavioral (ML/UEBA) + Threat Hunting + Threat Intel Matching
  3. Encrypted Traffic Visibility: Selective Decryption + TLS Fingerprinting + Behavioral Flow Analysis
  4. Resilient Monitoring Infrastructure: Hardened, Isolated, Encrypted, Monitored, Immutable Logs
  5. Automated Enrichment & Response (SOAR): Reduce MTTD/MTTR, Combat Alert Fatigue
  6. Continuous Improvement: Purple Teaming, Detection Engineering, Rule Tuning, Coverage Gap Analysis

"You can't protect what you can't see. You can't detect what you don't monitor. You can't respond to what you don't detect."