Computer >> Hướng Dẫn Máy Tính >  >> Kết Nối Mạng >> An Ninh Mạng

An ninh mạng hoạt động như thế nào? Cơ chế & Triển khai thực tế

An ninh mạng (Network Security) hoạt động dựa trên nguyên lý gì?

An ninh mạng áp dụng mô hình Defense in Depth (Phòng thủ chiều sâu) - nhiều lớp kiểm soát chồng chéo nhau để bảo vệ 3 mục tiêu CIA: Confidentiality (Bảo mật), Integrity (Toàn vẹn), Availability (Sẵn sàng) của dữ liệu và hệ thống trên mạng.

Cơ chế hoạt động cốt lõi (3 Trụ cột)

1. Ngăn chặn (Prevention) - Lớp ngoài cùng

  • Firewall (Tường lửa): Stateful Inspection, App-ID, User-ID, SSL Decryption. Chặn truy cập trái phép, traffic độc hại dựa trên policy (Default Deny).
  • Network Access Control (NAC) / Zero Trust Network Access (ZTNA): Xác thực thiết bị/người dùng *trước* khi cho vào mạng. Kiểm tra posture (AV, patch, disk encryption).
  • Segmentation (Phân đoạn mạng): VLAN, Micro-segmentation, Zero Trust Segmentation. Giới hạn lateral movement (di chuyển ngang).
  • Secure Configuration / Hardening: Tắt dịch vụ/cổng không dùng, đổi pass mặc định, disable weak crypto (TLS 1.0/1.1, SHA1, RC4).
  • DDoS Protection: Scrubbing center, rate limiting, anycast, WAF.

2. Phát hiện (Detection) - Lớp giữa

  • IDS/IPS (Intrusion Detection/Prevention System): Signature-based (Snort/Suricata rules), Anomaly-based (ML), Protocol analysis.
  • NDR (Network Detection & Response): Phân tích lưu lượng mạng (Netflow, PCAP, Zeek logs) phát hiện C2, lateral movement, data exfil, crypto-mining.
  • SIEM (Security Information and Event Management): Thu thập log tập trung, Correlation rules, UEBA (User Entity Behavior Analytics), Threat Intel enrichment.
  • Threat Intelligence: Feed IOC (IP, Domain, Hash, URL) → Blocklist / Alert enrichment.

3. Phản ứng & Khôi phục (Response & Recovery) - Lớp trong

  • SOAR (Security Orchestration, Automation and Response): Playbook tự động: Isolate endpoint, Block IP, Reset password, Quarantine email.
  • Incident Response Plan (IRP): Quy trình 6 bước NIST: Preparation, Identification, Containment, Eradication, Recovery, Lessons Learned.
  • Backup & Disaster Recovery (DR): 3-2-1 Backup, Immutable storage, RTO/RPO định kỳ test.
  • Forensics: Disk image, Memory dump, PCAP analysis, Timeline reconstruction.

Các công nghệ/triển khai chủ chốt (How it's Implemented)

Mã hóa (Encryption) - Bảo vệ Data in Transit

  • TLS 1.2/1.3 (HTTPS, API, Email SMTP/IMAP/POP): AES-GCM, ChaCha20-Poly1305. Certificate management (ACME/Let's Encrypt, PKI nội bộ).
  • VPN / Zero Trust Access: IPsec (AES-GCM), WireGuard (ChaCha20-Poly1305), TLS VPN (OpenVPN, AnyConnect), ZTNA (Tailscale, Cloudflare Access, Zscaler ZPA).
  • Wi-Fi: WPA3-SAE (AES-CCMP), WPA2-AES. Enterprise: 802.1X/EAP-TLS.
  • Data at Rest: BitLocker, LUKS, FileVault, S3 SSE-KMS, Database TDE.

Quản trị Nhận diện & Truy cập (IAM) - "Identity is the new Perimeter"

  • SSO (SAML/OIDC), MFA (Phishing-resistant: FIDO2/WebAuthn, Passkeys), Conditional Access, PAM (Privileged Access Management), JIT (Just-in-Time) Access.

Bảo mật Ứng dụng & API (AppSec/API Sec)

  • WAF (OWASP Top 10), API Gateway (Rate limit, Schema validation, AuthZ), SAST/DAST/SCA/Container Scan trong CI/CD.

Bảo mật Đám mây (Cloud Security)

  • CSPM (Misconfiguration), CWPP (Runtime protection), CIEM (Entitlements), DSPM (Data Security). Shared Responsibility Model.

Ví dụ luồng xử lý một tấn công (Attack Chain & Defense)

  1. Initial Access: Phishing email → User click link → Drive-by download exploit browser.
  2. Prevention: Email Gateway chặn mail / Browser Isolation / EDR block exploit / Patch browser.
  3. Execution: Malware chạy (PowerShell, Macro, Script).
  4. Detection: EDR (Behavioral: AMSI, ETW) → Alert "Suspicious PowerShell". SIEM correlation: User + Process + Network IOC.
  5. Command & Control: Malware beaconing qua DNS/HTTPS.
  6. Detection: NDR (DNS tunneling, JA3 fingerprint, Beaconing interval). Firewall SSL Inspection sees C2 traffic.
  7. Lateral Movement: Pass-the-Hash, SMB, RDP, SSH.
  8. Prevention/Detection: Segmentation blocks SMB/RDP. NAC/EDR detects PtH. PAM limits admin rights.
  9. Exfiltration/Impact: Encrypt data (Ransomware) / Steal data.
  10. Response: SOAR: Isolate host, Block C2 IP, Disable user, Snapshot VM, Restore from Backup.

Kết luận: An ninh mạng không phải "cài xong quên"

Là vòng lặp liên tục (Continuous Cycle): Assess → Protect → Detect → Respond → Recover → Improve. Yêu cầu: Visibility (nhìn thấy), Control (kiểm soát), Automation (tự động), Intelligence (thông tin 위협), People/Process (nhân sự/quy trình). Không có "hoàn hảo", chỉ có "giảm rủi ro đến mức chấp nhận được" (Risk Appetite).