Lesson 3Detect and protect

Threat Protection

Threat Protection ไม่ใช่ service เดียว แต่เป็นชุด control สำหรับป้องกัน, ตรวจจับ, จัดลำดับความเสี่ยง และตอบสนองต่อเหตุการณ์

AWS WAF และ AWS Shield

AWS WAF ช่วยตรวจและ block HTTP/S requests ตาม rules เช่น IP set, rate-based rule, managed rule group หรือ pattern ที่เสี่ยงต่อ SQL injection/XSS ส่วน AWS Shield ช่วยป้องกัน DDoS โดย Shield Standard เปิดใช้กับ AWS services หลายตัวโดยอัตโนมัติ และ Shield Advanced เพิ่มความสามารถระดับองค์กร

Example WAF rule idea:
- Block requests from known bad IP set
- Rate limit /login after abnormal request volume
- Use AWS Managed Rules for common web exploits
- Count mode first, then block after review

GuardDuty

Amazon GuardDuty วิเคราะห์ signals เช่น CloudTrail management events, VPC Flow Logs, DNS logs และ service-specific data sources เพื่อสร้าง finding เมื่อพบพฤติกรรมที่อาจเป็น threat เช่น credential misuse, suspicious network activity หรือ malware-related behavior

Inspector

Amazon Inspector ช่วย scan vulnerabilities สำหรับ workloads ที่รองรับ เช่น EC2, container images ใน ECR และ Lambda functions เป้าหมายคือรู้ว่า package, runtime หรือ image ใดมี CVE และควร patch อะไรก่อน

Security Hub และ Macie

AWS Security Hub รวม findings และตรวจ security posture เทียบกับ standards เช่น AWS Foundational Security Best Practices ส่วน Amazon Macie ใช้ machine learning และ pattern matching ช่วยค้นหา sensitive data ใน S3 เช่น PII หรือ credentials

Best practices

  • เปิด GuardDuty และ Security Hub ทุก account/Region ที่ใช้งานจริง
  • ส่ง findings เข้า EventBridge เพื่อแจ้งเตือนหรือเปิด ticket
  • เริ่ม WAF ด้วย Count mode ก่อน Block เพื่อลด false positive
  • จัด priority vulnerabilities จาก exploitability, exposure และ business impact ไม่ใช่ CVSS อย่างเดียว
  • ใช้ Macie กับ S3 buckets ที่เก็บ user data หรือ data lake

Common mistakes

  • เปิด detection tools แล้วไม่มี owner ตรวจ findings
  • ตั้ง WAF rule block ทันทีโดยไม่ดูผลกระทบต่อ traffic จริง
  • แก้ vulnerability เฉพาะ production แต่ลืมแก้ base image หรือ pipeline

Review questions

  1. WAF ป้องกัน threat ประเภทใด?
  2. GuardDuty finding ควรถูกส่งต่อไป workflow ใด?
  3. Inspector ช่วยทีม platform และ application อย่างไร?