一个企业级、纵深防御的容器隔离与运行时安全遥测框架。从思科首席网络安全架构师的角度设计,Charantej 架构隔离暂存运行时、限制系统调用面,并使用主机级审计工具实现实时内核遥测,以保护现代 Linux 容器部署。
Charantej 架构强制实施隔离、最小权限容器和外带监控,以确保安全边界能够抵御主机内核妥协向量。
flowchart TD
subgraph HostOS ["Host OS (Secured Linux Node)"]
subgraph Docker ["Docker Container Runtime"]
App["Audited App Namespace"]
end
subgraph Auditor ["Host Auditor (Falco Engine)"]
eBPF["eBPF Probes"]
end
Kernel["Host Linux Kernel"]
end
SIEM["SIEM / Log Repository"]
App -->|System Calls| Kernel
Kernel -->|Trace Events| eBPF
eBPF --> Auditor
Auditor -->|Telemetry Logs| SIEM
style HostOS fill:#1e1e1e,stroke:#333,stroke-width:2px
style Docker fill:#2a2a2a,stroke:#007bff,stroke-width:2px
style Auditor fill:#2a2a2a,stroke:#dc3545,stroke-width:2px
style Kernel fill:#333,stroke:#ffc107,stroke-width:2px
style SIEM fill:#1e1e1e,stroke:#28a745,stroke-width:2px,stroke-dasharray: 5 5
CAP_SYS_ADMIN、CAP_NET_ADMIN、CAP_NET_RAW 等),以阻止原始系统级网络操作。低级设计定义了内核边界内的操作系统调用验证逻辑、过滤路径和监控端点。
flowchart TD
subgraph ContainerSpace ["Container Namespace (User Space)"]
App["Audited Process"]
end
subgraph SeccompBoundary ["Seccomp Syscall Filter Boundary"]
Syscall["Syscall Invocation"]
Filter{"Syscall in Whitelist?"}
Block["SCMP_ACT_ERRNO (Block & Fail)"]
Allow["Allow & Pass"]
end
subgraph KernelSpace ["Linux Host Kernel Space"]
Handler["System Call Handler"]
Subsystem["Target Subsystem (e.g., Network/Memory)"]
end
subgraph TelemetryLayer ["Host Auditing Layer"]
eBPF["eBPF Probe Instrumentation"]
Falco{"Event Matches Rule?"}
Alert["Log syslog / SIEM Alarm"]
end
App -->|1. Invokes Syscall| Syscall
Syscall --> Filter
Filter -->|No: e.g., setsockopt/socket| Block
Filter -->|Yes: e.g., read/write| Allow
Allow --> Handler
Handler --> Subsystem
Handler -->|2. Traces Execution| eBPF
eBPF --> Falco
Falco -->|Yes| Alert
Charantej 架构由三个相互连接的配置层组成,以强制执行安全边界。
编排配置通过运行时标志直接实现以下安全控制:
--cap-drop=ALL:丢弃所有默认的 Linux 内核能力,防止容器获取低级管理权限。--security-opt no-new-privileges:true:阻止子进程通过 setuid 或 setgid 二进制文件获取比其父进程更多的权限。--security-opt seccomp=seccomp-profile.json:实现白名单系统调用过滤。seccomp-profile.json)默认情况下,Docker 的 seccomp 过滤器允许广泛的系统调用列表。Charantej 架构将其限制为基本进程执行所需的绝对最小值:
SCMP_ACT_ERRNO):阻止所有系统调用,除非在配置文件中显式白名单。read、write、exit、exit_group、futex、nanosleep、mmap、munmap、mprotect 和 close)。socket 操作、setsockopt 网络更改、命名空间加入 (setns) 和能力设置 (capset),消除未经授权的本地权限提升 (LPE) 尝试。主机级跟踪规则概念性地监控进程和系统调用边界:
Det_Anomalous_Networking:审计套接字选项,如果任何容器化进程尝试修改上层协议或 ULP 属性(TCP_ULP optname),则标记立即的 CRITICAL ALERT。Container_Privilege_Escalation_Attempt:对未经授权尝试加入命名空间 (setns) 或修改能力集 (capset) 发出警报。此仓库包含 CVE-2026-46300 的实时漏洞模拟,以实际展示 Charantej 架构的有效性。 该漏洞利用尝试两个向量:
setns() 劫持主机挂载命名空间。setsockopt(TCP_ULP) 进行未经授权的 ULP 内存操作。提供了一个辅助脚本,用于自动构建漏洞,并针对未缓解的容器(代表易受攻击的系统)和 Charantej 安全容器运行它。
bash run_exploit.sh
漏洞将成功执行 setns() 和 setsockopt(),报告 "VULNERABLE" 状态。
sequenceDiagram
participant App as Unprivileged App (Fragnesia Payload)
participant Cap as Capability Check (Kernel)
participant NS as /proc/self/ns/mnt (Host Namespace)
participant Sys as Syscall Interface
participant ULP as Kernel ULP Memory
Note over App,ULP: STAGE 1: Namespace Hijacking
App->>Cap: 1. setns(FD, 0)
Cap-->>App: Allowed (No cap_drop)
App->>NS: Hijack Host Namespace
NS-->>App: SUCCESS: Container Isolation Bypassed
Note over App,ULP: STAGE 2: ULP Memory Corruption (CVE-2026-46300)
App->>Sys: 2. socket(AF_INET, SOCK_STREAM, 0)
Sys-->>App: FD allocated
App->>ULP: 3. setsockopt(FD, IPPROTO_TCP, TCP_ULP, "tls")
Note right of ULP: Attempts unauthorized memory modification
ULP-->>App: SUCCESS: Malicious payload injected
Note over App,ULP: IMPACT: Host Kernel Memory Compromised!
漏洞被拦截。setns() 被能力丢弃 (EPERM) 阻止,socket() / setsockopt() 被 Seccomp 系统调用过滤器边界(或根据执行配置文件的能力丢弃)显式中和,报告 "BLOCKED" 状态。这确认即使 Fragnesia 有效载荷被执行,Charantej 架构也能安全地将主机与漏洞隔离。
sequenceDiagram
participant App as Unprivileged App (Fragnesia Payload)
participant Cap as Capability Drop (ALL)
participant NS as /proc/self/ns/mnt (Host Namespace)
participant Sec as Seccomp Filter Boundary
participant ULP as Kernel ULP Memory
Note over App,ULP: STAGE 1: Namespace Hijacking Attempt
App->>Cap: 1. setns(FD, 0)
Cap-->>App: BLOCKED (EPERM - Operation not permitted)
Note left of Cap: Defense Triggered: Namespace escape neutralized
Cap-xNS: Cannot reach Host Namespace
Note over App,ULP: STAGE 2: ULP Memory Corruption Attempt
App->>Sec: 2. socket() / setsockopt(TCP_ULP)
Sec-->>App: BLOCKED (EPERM - Operation not permitted)
Note left of Sec: Defense Triggered: Socket operations neutralized
Sec-xULP: Cannot reach Kernel ULP Context
Note over App,ULP: IMPACT: Exploit completely contained. Host is Safe!