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

Intrusion Detection System (IDS) ในความปลอดภัยเครือข่าย: หลักการ ประเภท และการเลือกใช้

Intrusion Detection System (IDS) คืออะไร?

ระบบ/เทคโนโลยีที่ Monitor, Detect, และ Alert เมื่อพบกิจกรรมน่าสงสัยหรือการโจมตีในเครือข่าย/ระบบ Listen-Only Device (ไม่ Block Traffic เอง - นั้นคือ IPS)

IDS ทำงานอย่างไร?

  1. Data Collection: Network Packets (SPAN/TAP) หรือ Host Logs/Agents
  2. Analysis: Signature-based (Known Patterns) + Anomaly-based (Deviation from Baseline)
  3. Detection: Match Attack Signatures หรือ Behavioral Anomalies
  4. Alerting: Notify SOC/Analysts (SIEM, Email, Dashboard, Ticket)
  5. Logging: Store Evidence สำหรับ Investigation/Forensics

ประเภท IDS หลัก

ประเภทย่อตำแหน่งMonitor อะไรข้อดีข้อจำกัด
Network-based IDSNIDSNetwork Strategic Points (DMZ, Core, Internet Edge)Network Traffic (Packets, Flows)ครอบคลุมกว้าง, ไม่ต้อง Agent, ไม่กระทบ PerformanceEncrypted Traffic ไม่เห็น (ยกเว้น SSL Decrypt), High Volume = Resource Heavy
Host-based IDSHIDSบน Host/Server/Endpoint (Agent)System Calls, File Integrity, Logs, Registry, Processเห็น Encrypted Traffic (หลัง Decrypt), File Integrity, Rootkit Detectionต้อง Deploy Agent ทุก Host, Resource Overhead, Maintenance
Perimeter IDS-Network BoundaryInbound/Outbound TrafficFirst Line of DefenseMiss Internal/Lateral Traffic
VM-based IDS-Virtual Environment (Hypervisor/Tap)VM Traffic (East-West)Cloud/Virtualized Env VisibilityComplex Deployment

IDS vs IPS (Intrusion Prevention System)

FeatureIDSIPS
ModePassive (Out-of-Band / SPAN/TAP)Inline (In-Band)
ActionDetect & Alert OnlyDetect, Alert, & Block/Prevent
RiskNo False Positive ImpactFalse Positive = Block Legitimate Traffic
PlacementAnywhere (SPAN Port)Critical Path (Must be High Availability)
LatencyNoneAdds Latency (Inspection)

IDS/IPS ใน Firewall (UTM/NGFW)

NGFW/UTM รวม IDS/IPS Engine เข้าไป (Integrated) ใช้ Signature Database เดียวกัน ตั้งค่า Mode: Detect Only (IDS) หรือ Prevent (IPS) ต่อ Rule

IDS Examples / Tools

  • Open Source: Snort, Suricata, Zeek (Bro), Security Onion
  • Commercial Network: Cisco Secure IDS/IPS (Firepower), Palo Alto Networks, FortiGate (FortiGuard), Check Point IPS, Trend Micro TippingPoint
  • Host-based: OSSEC/Wazuh, CrowdStrike, SentinelOne, Microsoft Defender for Endpoint, Carbon Black
  • Cloud/Managed: AWS GuardDuty, Azure Defender, Google Cloud IDS, AlienVault USM

Network IDS (NIDS) Architecture

  1. Deploy ที่ Strategic Points (Internet Edge, DMZ, Data Center Core, Segment Boundaries)
  2. Traffic Mirror (SPAN/Port Mirror) หรือ Network TAP
  3. Engine Analyze: Protocol Decode, Signature Match, Anomaly Detection
  4. Alert → SIEM → Analyst Triage

Functions ของ IDS

  • Detect: Known Attacks (Signatures) + Unknown (Anomalies)
  • Log: Full Packet Capture / Metadata สำหรับ Forensics
  • Alert: Real-time Notification (Severity, Context, MITRE ATT&CK Mapping)
  • Report: Compliance, Trends, Threat Intelligence

IDS Attack Policy Examples

  • Sudden Spike in TCP Connections (Port Scan/DoS)
  • Specific IPv6 Address/Range + Limited IP Options + All Ports
  • Known Exploit Payloads (CVE-2021-44228 Log4j, etc.)
  • Malware C2 Beaconing Patterns (DNS, HTTP, HTTPS)
  • Data Exfiltration Patterns (Large Uploads to Rare Destinations)

Intrusion Detection & Prevention (IDP/IDPS)

รวม IDS + IPS ใน Platform เดียว Detect → Alert → (Optional) Prevent ทำได้ทั้ง Inline และ Tap Mode

IPS Types

  1. NIPS (Network-based IPS): Inline บน Network, Analyze Protocol Activity
  2. WIPS (Wireless IPS): Detect/Prevent Wireless Threats (Rogue AP, Deauth, Evil Twin)
  3. HIPS (Host-based IPS): Agent บน Host, System Call/Behavior Monitoring
  4. Network Behavior Analysis (NBA): Anomaly-based (Flow/Behavior)

จำนวนประเภท IDS

แบ่งได้ 5 แบบหลัก: NIDS, HIDS, Perimeter IDS, VM-based IDS, Application-based IDS (Web App Firewall / API Security)

IPS ใน Firewall หมายถึงอะไร?

Intrusion Prevention System - Engine ที่ Inspect Traffic Inline, Detect Vulnerability Exploits, และ Block ก่อนถึง Target

ควรเลือก IDS หรือ IPS?

  • IDS: ต้องการ Visibility, Forensics, Compliance, Low Risk Tolerance สำหรับ False Positive Blocking
  • IPS: ต้องการ Active Prevention, Automated Blocking, Compliance Require Prevention
  • Best Practice: เริ่ม IDS (Tune Rules, Reduce False Positives) → เปิด IPS Mode เฉพาะ High-Confidence Rules → Full IPS
  • NGFW ทำได้ทั้งคู่ใน Box เดียว

Firewall vs IDS

  • Firewall: Allow/Deny ตาม Rules (IP, Port, App, User) - Policy Enforcement
  • IDS: Detect Anomalies/Attacks ใน Traffic ที่ Allowed ผ่าน Firewall - Detection
  • Firewall = Gatekeeper, IDS = Security Camera + Alarm
  • ต้องมีทั้งคู่ (Defense in Depth)