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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2019-5736-Custom-Runtime — 익스플로잇을 이해하기 위해 자체 작성한 컨테이너 런타임에 CVE-2019-5736을 구현 | Kitploit
도구/GitHubGitHub/giverofgifts/cve-2019-5736-custom-runtime
Vulnerability AnalysisExploitationPenetration TestingLearning & EducationContainer EscapeBinary Exploitation
GitHubgiverofgifts/cve-2019-5736-custom-runtime

CVE-2019-5736-Custom-Runtime

익스플로잇을 이해하기 위해 자체 작성한 컨테이너 런타임에 CVE-2019-5736을 구현

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

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2019-5736-Custom-Sandbox

일반

CVE-2019-5736은 익스플로잇을 이해하기 위해 간단한(얕은) 자체 작성 컨테이너 런타임을 사용하여 구현되었습니다.

이 익스플로잇은 twistlock의 runc-poc를 기반으로 하며(거의 대부분 복사됨): https://github.com/twistlock/RunC-CVE-2019-5736/tree/master/malicious_image_POC

컨테이너 런타임 (quarantine)

자세한 내용은 코드 문서를 참조하세요.

root@kitploit:~
Usage: quarantine [OPTIONS] [BINARY and its ARGS]

--rootfs: (mandatory) Specify a rootfs for the container.
--urange: Specify a urange start_host:end_host,start_guest.
--grange: Specify a grange start_host:end_host,start_guest.
--uid:    Specify the desired UID in the container.
--ugd:    Specify the desired GID in the container.
--supp:   Append supplementary groups from the specified grange to the process running in the container.

사용자 네임스페이스(user ns)를 제외한 모든 네임스페이스를 unshare합니다. 사용자 네임스페이스는 특별한 상황, 즉 urange, grange, uid 및/또는 가 지정된 경우에만 unshare됩니다.

gid

익스플로잇 설정

이 작업은 Ubuntu 18.04에서 테스트 및 수행되었습니다.

  1. rootfs를 가져옵니다(예: bionic)
    • mkdir rootfs
    • sudo debootstrap bionic ./rootfs
  2. libcap 소스를 가져옵니다
    • git clone https://github.com/mhiramat/libcap
  3. libcap을 수정합니다
    • cat exploit_code_for_shared_lib.c >> <any cap*.c, I used cap_alloc.c>
    • make
  4. rootfs로 chroot하고 libcap-dev를 설치하여 수정된 libcap.so에 간단히 링크할 수 있게 합니다.
    • sudo chroot rootfs
    • apt install libcap-dev
  5. 생성된 libcap.so.2.25 파일을 적절한 rootfs 디렉토리로 복사합니다 -sudo cp libcap.so.2.25 rootfs/lib/x86_64-linux-gnu
    • 참고: 저의 경우 해당 정확한 libcap 파일 버전을 가리키는 링크가 이미 있어서 링크할 필요가 없었습니다.
    • 참고: 이 경로는 변경될 수 있으므로, 컴파일된 quarantine이 libcap을 어디에서 기대하는지 항상 확인하세요: ldd quarantine
  6. 다른 파일들을 컴파일하고 rootfs로 복사합니다
    • sudo cp shebang_exploit rootfs/
    • sudo gcc -o rootfs/root/payload payload.c
    • sudo gcc -o rootfs/overwrite_sndbx_runtime overwrite_sndbx_runtime.c

익스플로잇 실행

예: sudo ./quarantine --rootfs rootfs /shebang_exploit 또는 ./quarantine --rootfs rootfs --uid 1 /shebang_exploit.

호스트에서 CAP_DAC_OVERRIDE 또는 CAP_SYS_ADMIN을 유지하거나 호스트에서 해당 파일을 소유하고 있으면 작동합니다. 즉, sudo 사용 시 사용자 네임스페이스를 unshare하지 마십시오(부모 네임스페이스에서 캡이 제거되기 때문입니다).

도구 다운로드