# safebuffer/sam-the-admin

Exploiting CVE-2021-42278 and CVE-2021-42287 to impersonate DA from standard domain user

Repository: https://github.com/safebuffer/sam-the-admin
Canonical: https://ross.abutalabs.com/products/sam-the-admin
Language: Python
License Family: other
Topics: s4u2self, active-directory, exploitation, redteam
Last push: 2022-07-10T22:23:13+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 1726, "days_push": 1515, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1067, forks 191 (observed 2026-08-28T04:03:27.297753+00:00)

## What it is
A Python CLI exploit tool that chains CVE-2021-42278 and CVE-2021-42287 to impersonate a Domain Admin from a standard Active Directory domain user via sAMAccountName spoofing. It is a red-team weaponization of the s4u2self Kerberos technique.

## Use cases
- escalate from standard domain user to domain admin in Active Directory
- exploit CVE-2021-42278 and CVE-2021-42287 during a penetration test
- demonstrate sAMAccountName spoofing in a lab environment
- test whether domain controllers are patched against the sAMAccountName spoofing chain
- red team assessment of Active Directory privilege escalation paths

## When to choose
- you are a red teamer or pentester testing unpatched Active Directory domain controllers
- you need a ready-made weaponized exploit for CVE-2021-42278/42287
- you run Kali Linux and want a quick privilege escalation PoC

## When to avoid
- your domain controllers are patched for CVE-2021-42278/42287
- you need a supported tool with a license or ongoing maintenance
- you are not on Kali Linux, since the tool is known to break elsewhere
- you want defensive or detection tooling rather than an offensive exploit

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: security, penetration-testing, cli
- domain: security, penetration-testing, developer-tools
- platform: python, cli
- tags: active-directory, kerberos, privilege-escalation, redteam, exploit, cve-2021-42278, cve-2021-42287, s4u2self, samaccountname-spoofing, linux

## Member repositories
- safebuffer/sam-the-admin (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:27.297753+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:55:11.793485+00:00, confidence not recorded.
  - readme: https://github.com/safebuffer/sam-the-admin (fetched 2026-08-28T04:03:27.297753+00:00, sha cc02975ce133)
- Data as of 2026-08-30T08:39:29.467469+00:00.
