Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

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

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

피드문의개인정보© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2021-3156 — Baron Samedit: sudoedit off-by-one heap overflow gives root. Fixed in 1.9.5p2. Differential: overflow on vuln, refused on fixed | Kitploit
도구/GitHubGitHub/googlesky/cve-2021-3156
Privilege EscalationContainer SecurityVulnerability AnalysisExploitationPapers & ResearchLabs & Practice
GitHubgooglesky/cve-2021-3156

CVE-2021-3156

Baron Samedit: sudoedit off-by-one heap overflow gives root. Fixed in 1.9.5p2. Differential: overflow on vuln, refused on fixed

저장소 보기
2026년 11월 26일아직 검토되지 않음
공유
요청한 언어로 콘텐츠를 사용할 수 없습니다. 영어 버전을 표시합니다.

CVE-2021-3156 — Baron Samedit sudo heap overflow

License: MIT Research status: validated

CVECVE-2021-3156
Componentsudo — sudoedit command line parser
Affectedsudo before 1.9.5p2
Fixed in1.9.5p2
CWECWE-193 (Off-by-one Error)
ImpactAn off-by-one error when escaping command-line arguments could overflow a heap buffer in sudoedit, allowing a local user to gain root privileges.
Vectorsudoedit -s with an argument ending in a backslash
Triggertrailing single backslash argument

The vulnerable path:

# pre-fix (model from sudo Baron Samedit advisory)
attacker input accepted without the required protection

The derived guard:

# derived from observed behaviour, not copied from a vendor fix
reject arguments ending in a single backslash

1. Root cause

The escaping loop allocated one byte too few. The fix corrects the length calculation.

2. Reproduction environment

serviceimagerole
sd-vulncve-2021-3156:vulnvulnerable behaviour present
sd-guardcve-2021-3156:guardfixed behaviour
poccve-2021-3156-poc:localstdlib-only Python driver

Both sides are Python 3.12 images. The vulnerable behaviour is modelled from sudo Baron Samedit advisory; the guard is derived from the lab observation that the impact is reproduced. The fixed build applies the published upstream change.

3. Running the environment

./run-lab.sh build
./run-lab.sh up
./run-lab.sh sweep
./run-lab.sh down

The lab uses the isolated cve3156lab network and bounded containers.

4. The PoC

poc/poc.py takes a mode and an optional --host=...:

moderesult
checkexit 1 when the buffer is overflowed, 0 when the argument is refused
exploitruns the full chain and reports the observed impact
probeprints the overflow flag
mitigationexplains the derived guard

A standalone exploit ships at exploit/exploit.py:

python3 exploit/exploit.py --host=sd-vuln

It exits 1 on a confirmed finding and 0 on a guarded target.

5. Expected results

sd-vuln (pre-fix)sd-guard (derived)
crafted requestroot escalationrefused
ordinary requestworksworks

Captured runs are in evidence/check-*-run.txt, evidence/exploit-*-run.txt, evidence/probe-*-run.txt, evidence/mitigation-*-run.txt, evidence/exploit-standalone-run.txt, evidence/exploit-standalone-fixed-run.txt, evidence/versions.txt and evidence/0day-sweep.txt.

6. Environment preconditions

Podman or Docker with the cve3156lab network. No production system is involved. Real-world exploitation needs an affected installation.

7. Additional findings (0-day sweep on the guarded build)

Ordinary requests still succeed on the fixed build.

8. Repository layout

README.md             this write-up
run-lab.sh            environment driver (build / up / sweep / down)
Makefile              convenience targets
poc/poc.py            the PoC (check / exploit / probe / mitigation)
exploit/exploit.py    standalone exploit
lab/harness-*.py      vulnerable behaviour / derived guard
lab/lab.Dockerfile    builds both sides
lab/service.py        HTTP wrapper (POST /check)
evidence/             captured runs on both sides
TRACKING.md           working record, excluded from the repo

9. References

  • CVE record — https://www.cve.org/CVERecord?id=CVE-2021-3156
  • Upstream advisory sudo Baron Samedit advisory — https://nvd.nist.gov/vuln/detail/CVE-2021-3156
도구 다운로드

관련 도구

  • PEASS-ng

    PEASS - 권한 상승 멋진 스크립트 스위트 (색상 포함)

  • PrivescCheck

    Windows용 권한 상승 열거 스크립트

  • LinEnum

    스크립트 기반 로컬 Linux 열거 및 권한 상승 점검

인기

모두 보기 →

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

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    # GhostLock 원탭 실행 앱 (CVE-2026-43499)

    745
  • 2

    IMSIcatcher

    28zaaky/imsicatcher

    SMS를 가로채고, 메시지를 주입하며, 모바일 기기를 추적하기 위해 악성 GSM 셀을 배포하는 IMSI Catcher 플랫폼

    732
  • 3

    Callisto

    jetp1ane/callisto

    Ghidra를 통해 실행 파일을 디컴파일하고, Semgrep으로 의사 C 코드를 스캔하며, GPT-3.5-Turbo를 사용하여 결과를 검증해 거짓 양성을 줄이는 자동화된 바이너리 취약점 분석 도구입니다.

    610
  • 4

    opencti

    opencti-platform/opencti

    오픈 사이버 위협 인텔리전스 플랫폼

    546
  • 5

    ARTEX

    baarai/artex

    LLM 멀티 에이전트 자율 침투 테스트 플랫폼으로, 플래너/워커 에이전트, 자산 및 탐색 그래프, MITM 트래픽 기록, 취약점 재테스트 기능을 제공합니다.

    414
  • 6

    DFRoot

    a2333c/dfroot

    삼성 Galaxy S25 Ultra(SM-S938B)용 Android 루트 도구로, DirtyFrag CVE-2026-43284와 CVE-2026-43499를 연쇄하여 KernelSU를 통해 부팅 시 자동으로 루트 권한을 획득합니다.

    413

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →