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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
openssl-fuzz — Mayhem으로 CVE-2022-3786(openssl) 찾기 | Kitploit
도구/GitHubGitHub/whatthefuzz/openssl-fuzz
Vulnerability AnalysisExploitationFuzzingCryptographyBinary AnalysisLearning & Education
GitHubwhatthefuzz/openssl-fuzz

openssl-fuzz

Mayhem으로 CVE-2022-3786(openssl) 찾기

저장소 보기
5333년 전아직 검토되지 않음

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

OpenSSL 퍼징

이 저장소에는 "Finding CVE-2022-3786 (openssl) with Mayhem"이라는 제목의 동반 블로그 게시물이 있으며, https://www.seandeaton.com에서 볼 수 있습니다.

tl;dr

이 모든 것은 포함된 Dockerfile(DockerHub에도 있음)로 알아서 처리됩니다. 다음과 같이 실행할 수 있습니다:

root@kitploit:~
# Build the container
docker build --tag openssl-cve-2022-3768 .
# Or if you just want to pull down the existing one:
TODO
# Ensure that you're in this project's root directory (ie you can see ./output/)
# Mount the ./input/ directory to the containers /input. This is for fuzz input.
# This is Linux specific, Windows I think has %CD% in lieu of $(pwd)?
docker run --interactive --tty --volume $(pwd)/input:/input

컨테이너의 엔트리포인트는 단순히 afl을 실행하는 것이므로 즉시 퍼징을 시작할 수 있습니다. 이 동작을 변경하려면 docker run 줄 끝에 /bin/bash를 추가하세요.

취약한 버전 가져오기

취약점이 포함된 마지막 커밋은 2022년 11월 1일자 커밋 SHA 3b421ebc64c7b52f1b9feb3812bdc7781c784332입니다. 이 취약점은 커밋 SHA 에서 수정되었습니다. 을 사용하여 취약한 버전을 쉽게 얻을 수 있습니다:

도구 다운로드
680e65b94c916af259bfdc2e25f1ab6e0c7a97d6
git
root@kitploit:~
# Clone the repository.
git clone git://git.openssl.org/openssl.git
# Change into the working directory.
cd openssl
# Detach HEAD from origin to examine the code as it was when it was vulnerable.
git checkout 3b421ebc64c7b52f1b9feb3812bdc7781c784332

컴파일

컴파일에는 AFL의 gcc 컴파일러를 사용합니다(clang을 사용하면 계속 undefined reference 오류가 발생했기 때문입니다). 작은 버퍼 오버플로 오프셋 때문에 주소 검사(ASAN)도 사용하려고 합니다. ASAN은 AFL의 환경 변수 AFL_USE_ASAN으로 활성화됩니다. ASAN은 많은 메모리를 사용하므로 주소 공간을 제한해야 하며, 프로그램을 32비트 아키텍처용으로 컴파일하면 됩니다. 자세한 내용은 여기를 참조하세요.

OpenSSL의 32비트 구성은 -m32와 linux-generic32 플래그를 사용합니다. compile.sh 스크립트가 이 작업을 알아서 처리합니다.

root@kitploit:~
# Configuration
AFL_USE_ASAN=1 CC=afl-gcc-fast CXX=afl-g++-fast ./Configure -m32 linux-generic32
# Make
AFL_USE_ASAN=1 CC=afl-gcc-fast CXX=afl-g++-fast CFLAGS="-m32" CXXFLAGS="-m32" make

시스템 리소스에 따라 시간이 좀 걸릴 수 있습니다. 컴파일 후에는 하네스를 컴파일해야 합니다. Makefile이 제공됩니다.

root@kitploit:~
# Compile the harness.
$ make harness
# Run the harness.
$ ./harness input/seed0.txt
ossl_a2ulabel returned: 1

이제 openssl의 ossl_a2ulabel 퍼징을 시작할 수 있습니다. AFL을 사용하면 명령은 대략 다음과 같습니다(또는 포함된 run.sh 스크립트를 사용해도 됩니다).

root@kitploit:~
afl-fuzz -i /input -o /output /harness/harness @@