Network/System Hardening คืออะไร?
Hardening (การแข็งแกร่ง) คือ กระบวนการลดพื้นที่การโจมตี (Attack Surface) และช่องโหว่ (Vulnerabilities) ของระบบ เครือข่าย อุปกรณ์ และแอปพลิเคชัน ให้เหลือเฉพาะสิ่งที่จำเป็นต่อการทำงานเท่านั้น ตามหลัก Least Functionality และ Defense in Depth
Network Device Hardening (Router, Switch, Firewall, AP, Controller)
Management Plane (การจัดการ)
- เปลี่ยน Default Credentials ทันที (Username/Password)
- บังคับ MFA สำหรับ Admin Access (TACACS+/RADIUS + MFA)
- ปิดบริการที่ไม่ใช้: Telnet, HTTP, SNMP v1/v2c, FTP, TFTP, Cisco Discovery Protocol (CDP), LLDP (บน Port ที่ไม่จำเป็น)
- ใช้ SSHv2, HTTPS, SNMPv3, Netconf/RESTCONF แทน
- จำกัด Source IP ที่เข้าถึง Management Interface (ACL / Management VRF / Out-of-Band)
- ตั้งค่า Banner Message (Legal Warning)
- Enable AAA (Authentication, Authorization, Accounting) รวม Command Authorization
- Logging: Syslog → SIEM, Buffered Logs, Console Logging (Severity)
- NTP Synchronization (Authenticated NTP)
Control Plane (ระนาบควบคุม)
- Control Plane Policing (CoPP) / Control Plane Protection (CPPr): จำกัดอัตรา Traffic ไปยัง CPU (Routing Protocols, ARP, ICMP, Management)
- Routing Protocol Authentication: OSPF (MD5/SHA), BGP (MD5/TCP-AO), ISIS, EIGRP
- First Hop Security: DHCP Snooping, DAI (Dynamic ARP Inspection), IP Source Guard, RA Guard (IPv6)
- STP Protection: BPDU Guard, Root Guard, Loop Guard
Data Plane (ระนาบข้อมูล)
- ACLs (Access Control Lists): Ingress/Egress Filtering (Anti-spoofing, RFC 1918/2827/3704 filtering)
- Port Security: Limit MAC Addresses, Sticky MAC, Violation Actions (Shutdown/Restrict/Protect)
- Private VLANs / Protected Ports: Isolate Hosts ใน VLAN เดียวกัน
- Storm Control: Broadcast/Multicast/Unicast Storm Suppression
- QoS / Policing: ป้องกันการใช้ Bandwidth ผิดปกติ
- Disable Unused Ports (Shutdown) + Port Security
Wireless Specific (AP/WLC)
- WPA2/WPA3-Enterprise (802.1X) + RADIUS + Certificates (EAP-TLS)
- Disable WPS, TKIP, WEP
- Enable PMF (Protected Management Frames / 802.11w)
- Rogue AP Detection / Containment (WIPS)
- Band Steering, Load Balancing, Airtime Fairness
- Segment SSIDs → VLANs → Firewall Policies
Server/Endpoint Hardening
- OS Hardening: CIS Benchmarks, STIGs, Disable Unneeded Services/Features, Remove Unused Software
- Patch Management: Auto-update / WSUS / SCCM / Intune / Ansible / Patch Tuesday Cadence
- Application Whitelisting / Control: AppLocker, WDAC, SELinux/AppArmor
- Credential Protection: LSASS Protection (RunAsPPL, Credential Guard), LAPS (Local Admin Password Solution)
- Disk Encryption: BitLocker, FileVault, LUKS
- Endpoint Protection: EDR/XDR (CrowdStrike, SentinelOne, Defender for Endpoint, Cortex XDR)
- Logging & Auditing: Audit Policy (Success/Failure), Sysmon, Windows Event Forwarding (WEF)
- Network Firewall (Host-based): Windows Firewall, nftables/iptables, Block Inbound by Default
Cloud/Infrastructure Hardening
- CIS Benchmarks for Cloud: AWS, Azure, GCP, Kubernetes (Kube-bench)
- IAM Least Privilege: No Root/Admin Daily Use, Roles/PoliciesScoped, Condition Keys, Permission Boundaries
- Network: Default Deny (Security Groups/NACLs/Firewall), Private Subnets, VPC Endpoints (Interface/Gateway), No Public IP on Workloads
- Encryption: Default Encryption (EBS, S3, RDS, Disks), KMS/CMK, Enforce TLS 1.2+
- Logging/Monitoring: CloudTrail/Cloud Audit Logs, VPC Flow Logs, GuardDuty/Security Command Center, Config/Cloud Custodian
- Container/K8s: Pod Security Standards (Restricted), Network Policies, Admission Controllers (OPA/Gatekeeper), Image Signing (Cosign/Notary), Runtime Security (Falco)
Application/Code Hardening
- Secure SDLC / DevSecOps: SAST, DAST, SCA, Container Scanning, Secrets Detection (GitLeaks, TruffleHog)
- Input Validation, Output Encoding, Parameterized Queries (Prevent SQLi/XSS)
- Security Headers (CSP, HSTS, X-Frame-Options, Referrer-Policy)
- Rate Limiting, API Gateway (AuthZ/AuthN, Throttling, Schema Validation)
- Error Handling (No Stack Traces to User), Secure Logging (No Secrets in Logs)
Frameworks และ Benchmarks มาตรฐาน
- CIS Benchmarks: OS, Cloud, Network Devices, Kubernetes, Docker (ฟรี PDF)
- DISA STIGs (Security Technical Implementation Guides): มาตรฐาน DoD (เข้มงวดกว่า CIS)
- NIST SP 800-53 / 800-171 / 800-128: Security Controls, Configuration Management
- ISO 27001 Annex A / NIST CSF: Governance Framework
- PCI-DSS Requirements: สำหรับการ์ดชำระเงิน
กระบวนการ Hardening (Lifecycle)
- Assess: Baseline Scan (Nessus, OpenVAS, Qualys, CIS-CAT, Lynis, Kube-bench)
- Plan: Prioritize by Risk (CVSS, Exploitability, Business Impact), Create Runbooks
- Implement: Test in Lab/Staging → Change Management → Deploy (Automation: Ansible, Terraform, DSC, Intune, Jamf)
- Verify: Post-implementation Scan, Functional Testing, Audit Compliance
- Monitor & Maintain: Continuous Compliance (Drift Detection), Re-assess Periodically, Patch Cycle
ประโยชน์ของ Hardening
- ลด Attack Surface และ Blast Radius
- ปฏิบัติตาม Compliance ได้ง่ายขึ้น (Evidence-based)
- ลด False Positives ใน SIEM/SOC (Noise Reduction)
- เพิ่มความมั่นคง Stability และ Performance (Disable Unused Services)
- ลดต้นทุน Incident Response และ Breach Impact
สรุป
Hardening เป็น กระบวนการต่อเนื่อง (Continuous Process) ไม่ใช่โปรเจกต์ครั้งเดียว ต้องทำแบบ Automated, Auditable, และ Risk-based เริ่มจาก CIS Benchmarks ระดับ OS/Device → ขยับไป Cloud/Container/Application → รวมเข้ากับ CI/CD Pipeline และ Compliance Program