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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2026-7777-Rust-Use-After-Free-in-Unsafe-Web-Server — 취약한 코드와 멀티스레드 트리거를 통해 메모리 손상 및 코드 실행 가능성을 보여주는 웹 서버의 Rust use-after-free 취약점을 시연합니다. | Kitploit
도구/GitHubGitHub/george0papasotiriou/cve-2026-7777-rust-use-after-free-in-unsafe-web-server
Vulnerability AnalysisExploitationLearning & EducationBinary ExploitationLabs & Practice
GitHubgeorge0papasotiriou/cve-2026-7777-rust-use-after-free-in-unsafe-web-server

CVE-2026-7777-Rust-Use-After-Free-in-Unsafe-Web-Server

취약한 코드와 멀티스레드 트리거를 통해 메모리 손상 및 코드 실행 가능성을 보여주는 웹 서버의 Rust use-after-free 취약점을 시연합니다.

저장소 보기

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
17일 전아직 검토되지 않음

CVE-2026-7777 – 안전하지 않은 웹 서버의 Rust Use‑After‑Free

프로그램 코드 (Rust)

root@kitploit:~
// uaf_server.rs - Vulnerable Rust HTTP server with use-after-free
use std::sync::{Arc, Mutex};
use std::thread;
use std::io::prelude::*;
use std::net::{TcpListener, TcpStream};

struct SharedBuffer {
    data: Vec<u8>,
}

impl SharedBuffer {
    fn new() -> Self { SharedBuffer { data: vec![0; 1024] } }
}

fn handle_client(mut stream: TcpStream, buffer: Arc<Mutex<SharedBuffer>>) {
    // Simulate reading request and writing response.
    let mut buf = [0; 512];
    stream.read(&mut buf).unwrap();
    let b = buffer.lock().unwrap();
    let ptr = b.data.as_ptr() as *mut u8; // raw pointer
    // Drop the lock early? In unsafe block we might send the pointer to another thread.
    // Here we simulate a bug: the SharedBuffer is dropped, but we later use the pointer.
    drop(b);
    // After lock is released, another thread could replace the Vec, freeing the old allocation.
    // Unsafe write through the dangling pointer.
    unsafe {
        *ptr = 42; // use after free!
    }
    stream.write(b"HTTP/1.1 200 OK\r\n\r\nHello").unwrap();
}

fn main() {
    let listener = TcpListener::bind("127.0.0.1:7878").unwrap();
    let buffer = Arc::new(Mutex::new(SharedBuffer::new()));
    for stream in listener.incoming() {
        let stream = stream.unwrap();
        let buf_clone = Arc::clone(&buffer);
        thread::spawn(move || {
            handle_client(stream, buf_clone);
        });
    }
}

CVE-2026-7777 – 웹 서버에서의 Rust Unsafe Use‑After‑Free

Severity: High

개요

Rust 웹 서버는 스레드 간에 버퍼를 공유하기 위해 unsafe 코드를 사용합니다. 경쟁 조건(race condition)으로 인해 use‑after‑free가 발생하여 메모리 손상이나 정보 노출로 이어질 수 있습니다.

취약점 세부 정보

  • 유형: Use‑After‑Free (메모리 안전)
  • 영향: 서비스 거부(Denial of Service), 임의 코드 실행 가능성.
  • 근본 원인: 잠금 상태의 Vec에서 원시 포인터를 가져온 후 잠금을 해제하고, 다른 스레드가 벡터를 교체하여 포인터가 여전히 사용되는 동안 메모리를 해제합니다.

익스플로잇 데모

  1. 취약한 서버를 컴파일하고 실행합니다:
    root@kitploit:~
    rustc uaf_server.rs
    ./uaf_server
    
  2. 멀티 스레드 트리거를 실행합니다:
    root@kitploit:~
    python trigger_uaf.py
    
도구 다운로드