Intrusion Detection System (IDS) คืออะไร?
ระบบ/เทคโนโลยีที่ Monitor, Detect, และ Alert เมื่อพบกิจกรรมน่าสงสัยหรือการโจมตีในเครือข่าย/ระบบ Listen-Only Device (ไม่ Block Traffic เอง - นั้นคือ IPS)
IDS ทำงานอย่างไร?
- Data Collection: Network Packets (SPAN/TAP) หรือ Host Logs/Agents
- Analysis: Signature-based (Known Patterns) + Anomaly-based (Deviation from Baseline)
- Detection: Match Attack Signatures หรือ Behavioral Anomalies
- Alerting: Notify SOC/Analysts (SIEM, Email, Dashboard, Ticket)
- Logging: Store Evidence สำหรับ Investigation/Forensics
ประเภท IDS หลัก
| ประเภท | ย่อ | ตำแหน่ง | Monitor อะไร | ข้อดี | ข้อจำกัด |
|---|---|---|---|---|---|
| Network-based IDS | NIDS | Network Strategic Points (DMZ, Core, Internet Edge) | Network Traffic (Packets, Flows) | ครอบคลุมกว้าง, ไม่ต้อง Agent, ไม่กระทบ Performance | Encrypted Traffic ไม่เห็น (ยกเว้น SSL Decrypt), High Volume = Resource Heavy |
| Host-based IDS | HIDS | บน 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 Boundary | Inbound/Outbound Traffic | First Line of Defense | Miss Internal/Lateral Traffic |
| VM-based IDS | - | Virtual Environment (Hypervisor/Tap) | VM Traffic (East-West) | Cloud/Virtualized Env Visibility | Complex Deployment |
IDS vs IPS (Intrusion Prevention System)
| Feature | IDS | IPS |
|---|---|---|
| Mode | Passive (Out-of-Band / SPAN/TAP) | Inline (In-Band) |
| Action | Detect & Alert Only | Detect, Alert, & Block/Prevent |
| Risk | No False Positive Impact | False Positive = Block Legitimate Traffic |
| Placement | Anywhere (SPAN Port) | Critical Path (Must be High Availability) |
| Latency | None | Adds 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
- Deploy ที่ Strategic Points (Internet Edge, DMZ, Data Center Core, Segment Boundaries)
- Traffic Mirror (SPAN/Port Mirror) หรือ Network TAP
- Engine Analyze: Protocol Decode, Signature Match, Anomaly Detection
- 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
- NIPS (Network-based IPS): Inline บน Network, Analyze Protocol Activity
- WIPS (Wireless IPS): Detect/Prevent Wireless Threats (Rogue AP, Deauth, Evil Twin)
- HIPS (Host-based IPS): Agent บน Host, System Call/Behavior Monitoring
- 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)