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

Covert Channel (Kênh bí mật) trong An ninh mạng: Định nghĩa, 2 loại chính, ví dụ, khai thác và phòng chống

Covert Channel (Kênh bí mật / Kênh ngầm) là gì?

Covert Channel là **kênh truyền thông tin không được thiết kế, không được kiểm soát, không tuân theo chính sách bảo mật của hệ thống**, cho phép chuyển移 thông tin giữa các tiến trình/chu kỳ bảo mật khác nhau (ví dụ: từ High Security Level → Low Security Level) vi phạm mô hình bảo mật (Bell-LaPadula, Biba). Khác với **Overt Channel (Kênh công khai)** - kênh truyền thông tin được thiết kế, kiểm soát, ủy quyền (API, File Share, Network Socket, Pipe).

Phân loại 2 loại chính (Lamport, 1973 - TCSEC/Orange Book)

Ví dụ minh họa cụ thể

  1. Storage Channel - File Lock Status: Process High (Secret) muốn gửi bit '1' → Lock file chung. Process Low (Unclassified) thử Lock file → Fail (Timeout) → Nhận bit '1'. Gửi '0' → Unlock file → Process Low Lock thành công → Nhận '0'.
  2. Timing Channel - CPU Load: Process High gửi '1' → Vòng lặp busy_wait (tiêu hao CPU 100ms). Gửi '0' → Sleep 100ms. Process Low đo thời gian thực hiện một tác vụ chuẩn (benchmark loop) → Nhanh = '0', Chậm = '1'.
  3. Network Timing Channel: Malware trên Server nội bộ điều khiển độ trễ gói tin DNS/HTTP gửi ra C2 Server. C2 Server giải mã thông tin dựa trên khoảng thời gian giữa các gói tin.
  4. Cache Side-Channel (Spectre/Meltdown): Process tấn công đoán địa chỉ bộ nhớ của Process nạn nhân bằng cách đo thời gian truy cập Cache (L1/L2/L3). Đây là Covert Timing Channel ở cấp độ vi xử lý (Hardware).

Mục đích & Nguy hiểm

  • Data Exfiltration (Rò rỉ dữ liệu): Bypass DLP, Firewall, Air-gap. Dữ liệu bí mật (Key, Password, Document) bị truyền ra ngoài qua kênh không được giám sát.
  • Malware C2 (Command & Control): Malware dùng Covert Channel (DNS Tunneling, HTTP Header Timing, ICMP Payload, Steganography trong ảnh/video) để giao tiếp với C2 Server mà không bị IDS/IPS/Firewall phát hiện (Traffic trông "bình thường").
  • Cross-VM/Container Leakage (Cloud/Multi-tenant): Tenant A (Attacker) dùng Cache Timing Channel (Flush+Reload, Prime+Probe) đọc khóa mã hóa / dữ liệu nhạy cảm của Tenant B (Victim) trên cùng CPU vật lý.
  • Bypass Mandatory Access Control (MAC): Vi phạm *\*-property (No Read Up) hoặc Simple Security Property (No Write Down) của Bell-LaPadula.

Phát hiện & Phòng chống (Detection & Mitigation)

LoạiCơ chếVí dụ kinh điểnĐặc điểm
1. Covert Storage Channel (Kênh lưu trữ bí mật)Ghi dữ liệu vào **tài nguyên lưu trữ chung** (Shared Resource) bởi Sender → Receiver đọc từ tài nguyên đó. Sử dụng **trạng thái (state)** của đối tượng.
  • File permissions (r/w/x bits), File timestamps (atime/mtime/ctime), File size, File existence/name.
  • Shared memory segments, Registry keys, Database rows, Temporary files.
  • Disk blocks (free/used pattern), Printer queue status, Tape position.
Dung lượng cao (High bandwidth). Dễ phát hiện bằng audit resource state. Cần đồng bộ hóa truy cập.
2. Covert Timing Channel (Kênh thời gian bí mật)Điều khiển **thời gian** của sự kiện có thể quan sát được bởi Receiver. Sử dụng **thời gian (timing)** như carrier.
  • CPU Load modulation (Busy/Idle loop) → Receiver đo thời gian phản hồi hệ thống.
  • Network packet timing (Inter-packet delay, Jitter modulation).
  • Keyboard/Mouse event timing.
  • Process scheduling priority manipulation.
  • Cache timing attacks (Prime+Probe, Flush+Reload - Spectre/Meltdown related).
Dung lượng thấp (Low bandwidth). Khó phát hiện hơn (Không thay đổi state tài nguyên tĩnh). Rất nguy hiểm trong Side-channel attacks.

Covert Channel vs Steganography vs Side Channel

  • Covert Channel: Vi phạm **Chính sách bảo mật hệ thống** (Security Policy). Truyền tin giữa chủ thể khác level. Focus: *System Policy Violation*.
  • Steganography (Giấu tin): Giấu thông tin **BÊN TRONG** đối tượng hợp pháp (Ảnh, Video, Audio, Text, Network Protocol) để che mắt người quan sát. Không nhất thiết vi phạm policy hệ thống. Focus: *Concealment within Carrier*.
  • Side Channel (Kênh phụ): Thu thập thông tin bí mật qua **đặc tính vật lý/hành vi** của hệ thống (Power consumption, EM radiation, Acoustic, Timing, Cache) **KHÔNG CẦN** sự hợp tác của Sender (Victim không chủ động gửi). Focus: *Passive Observation of Physical Effects*.
  • Mối quan hệ: Covert Channel *có thể dùng* Steganography (Giấu tin trong protocol header). Side Channel *có thể tạo thành* Covert Timing Channel (Nếu Attacker chủ động điều khiển Victim tạo timing pattern - ít thấy). Cache Timing Attack là Side Channel VÀ Covert Timing Channel (Attacker process chủ động tạo tải → Victim process timing thay đổi → Attacker đo).

Kết luận

Covert Channel là **lỗ hổng logic/toán học/cơ bản** trong mọi hệ thống chia sẻ tài nguyên (CPU, Memory, Disk, Network, Cache, Time). Không thể loại bỏ hoàn toàn, chỉ có thể **giảm băng thông đến mức không thực tế để khai thác** (Noise, Partitioning, Isolation) và **phát hiện hành vi bất thường**. Trong thời đại Cloud, Multi-tenant, Speculative Execution (Spectre/Meltdown), Covert Timing Channel (đặc biệt Cache Side-Channels) là **mối đe dọa thực tế, khó phòng chống nhất**, đòi hỏi giải pháp từ Hardware (Cache Partitioning, Constant-time crypto), Hypervisor (Scheduler, Noise), OS (KPTI, Retpoline), Application (Constant-time coding) đến Policy (Multi-level Security, Air-gap cho Top Secret).

Chiến lượcKỹ thuật / Công cụÁp dụng cho
Thiết kế hệ thống (Prevention by Design)Strong Isolation (Hardware: Intel SGX, AMD SEV, ARM TrustZone, RISC-V PMP). Non-interference verification (Formal Methods). Resource partitioning (Cache coloring, Cache allocation tech - CAT, Memory encryption - TME/MKTME). Deterministic scheduling (Time-triggered architecture). Information Flow Control (IFC) labels enforcement.Cả 2 loại. Cấp độ phần cứng/OS/Hypervisor.
Giảm băng thông kênh (Bandwidth Reduction)Noise injection (Jitter ngẫu nhiên vào timing). Resource padding (Cố định kích thước file, padding packet). Rate limiting (Giới hạn tần suất syscall, network send). Quantization (Làm tròn timestamp, timer resolution giảm).Timing Channel (Hiệu quả cao). Storage Channel (Khó hơn).
Giám sát & Phát hiện (Monitoring & Detection)Audit Resource Access (File, Reg, Shared Mem, IPC). Statistical Anomaly Detection trên Timing (Network packet intervals, Syscall latency, CPU usage patterns). ML-based detection (Sequence modeling, Autoencoders). Hardware Performance Counters (PMC) monitoring (Cache misses, Branch mispredictions - Intel PT, AMD IBS). Side-channel detection tools (Spectre/Meltdown scanners, CacheSideChannelDetector).Cả 2. Timing channel cần ML/Statistic. Storage channel cần Audit log.
Phân tích mã tĩnh/động (Code Analysis)Static Analysis: Tìm pattern covert channel (Shared var access, Timing loops, Covert libs). Dynamic Analysis/Taint Tracking: Theo dõi luồng dữ liệu từ High → Low sinks. Symbolic Execution. Fuzzing.Storage Channel (Code pattern rõ). Timing Channel (Khó static analysis).
Chính sách & Quy trình (Policy & Process)Mandatory Access Control (MAC) enforcement (SELinux, AppArmor, SMACK, Windows MIC). Least Privilege. Separation of Duties. Air-gap physical (True air-gap: No shared HW resources). Supply Chain Security (Hardware Trojan). Personnel Security (Insider Threat Program).Cơ sở cho tất cả.