บทความนี้อธิบายวิธีตั้งค่า WAF (Web Application Firewall) แบบละเอียดบน Sangfor NGAF/NSF รวมถึง Application Hiding, Password Protection, HTTP Anomaly Detection และ Advanced Protection
WAF คืออะไร
WAF เป็นฟีเจอร์ที่ป้องกัน Web Application จากการโจมตีเฉพาะทาง เช่น SQL Injection, XSS, File Inclusion โดยตรวจสอบ HTTP/HTTPS Request ที่ส่งมายัง Web Server
ฟีเจอร์หลักของ WAF
1. Web Attack Protection
- SQL Injection — ตรวจจับ SQL Query ที่แทรกมาใน HTTP Request
- XSS (Cross-Site Scripting) — ตรวจจับ Script ที่แทรกมาใน Input
- File Inclusion — ป้องกัน Local/Remote File Inclusion
- Command Injection — ป้องกันการรันคำสั่ง OS ผ่าน Web Application
2. Application Hiding
- ซ่อน Server Header Information (Server Type, Version)
- ป้องกันไม่ให้ Attacker รู้ว่า Server ใช้ Software อะไร
3. Password Protection
- ป้องกัน Brute-Force Attack บนหน้า Login ของ Web Application
- กำหนด Threshold สำหรับจำนวนครั้งที่ Login ผิดก่อน Block
4. Privilege Control
- ป้องกัน Unauthorized Access ไปยัง Admin Page หรือ Sensitive URL
- กำหนด URL Path ที่ต้องการป้องกัน
5. HTTP Anomaly Detection
- ตรวจจับ HTTP Request ที่ผิดปกติ เช่น Header ยาวเกินไป, Method ที่ไม่ปกติ
- ป้องกัน Buffer Overflow ผ่าน HTTP
6. Scanner Blocker
- ตรวจจับและ Block Web Vulnerability Scanner (เช่น Nessus, Acunetix, Nikto)
ขั้นตอนการตั้งค่า
1. สร้าง WAF Template
ไปที่ Objects > Security Policy Template > WAF กด Add
- ตั้งชื่อ Template
- เปิด/ปิดฟีเจอร์แต่ละตัวตามต้องการ
- กำหนด Action: Block, Alert หรือ Allow
2. Apply WAF Template ใน Network Security Policy
ไปที่ Policies > Network Security สร้างหรือแก้ไข Policy (Server Scenario):
- เปิด WAF แล้วเลือก Template ที่สร้างไว้
หมายเหตุ
- ต้องมี WAF License จึงจะใช้งาน WAF ได้
- หากเว็บใช้ HTTPS ต้องเปิด SSL Decryption (Server Side) และ Import Certificate ของ Server ก่อน WAF จึงจะ Inspect ได้
- แนะนำให้เริ่มด้วย Alert Mode ก่อน แล้วตรวจสอบ Log ว่ามี False Positive หรือไม่ ก่อนเปลี่ยนเป็น Block
- อัปเดต Threat Signature Database เป็นเวอร์ชันล่าสุดเพื่อให้ตรวจจับ Attack Pattern ใหม่ได้
ข้อคิดเห็น
0 ข้อคิดเห็น
โปรด ลงชื่อเข้าใช้ เพื่อแสดงข้อคิดเห็น