Add Dollar Ticket Attack Module#1224
Conversation
Adds automated privilege escalation module for CVE-2020-25717/25719/CVE-2021-42287. Features: - Machine account creation via SAMR/LDAPS - Automated SSH exploitation with Kerberos GSSAPI - Clean separation: create account -> exploit -> manual cleanup - Tested successfully on Windows Server 2025 + Ubuntu 24
- Remove UTF-8 encoding declaration (Python 3) - Use contextlib.suppress() instead of bare except - Fix trailing whitespace - Ensure double quotes consistency - Add newline at EOF - Use raw docstring for backslashes
- Add whitespace around arithmetic operators - Convert .format() calls to f-strings - Add newline at end of file
Adds automated privilege escalation module for CVE-2020-25717/25719/CVE-2021-42287. Features: - Machine account creation via SAMR/LDAPS - Automated SSH exploitation with Kerberos GSSAPI - Clean separation: create account -> exploit -> manual cleanup - Tested successfully on Windows Server 2025 + Ubuntu 24
Adds automated privilege escalation module for CVE-2020-25717/25719/CVE-2021-42287. Features: - Machine account creation via SAMR/LDAPS - Automated SSH exploitation with Kerberos GSSAPI - Clean separation: create account -> exploit -> manual cleanup - Tested successfully on Windows Server 2025 + Ubuntu 24
- Test SAMR account creation (SMB protocol) - Test LDAPS account creation (LDAP protocol) - Test custom password parameter - Test SSH_TARGET reference parameter All tests passing successfully.
|
It looks like the PR template may not have been filled out. The following sections appear to be missing:
Please edit your PR description to include them. The template helps reviewers understand and test your changes. Thanks! |
|
Thanks for the PR! However, I see a few issues with this:
|
- Test account creation (add-computer) - Test custom password parameter - Test SSH_TARGET reference parameter All tests passing successfully.
Adds automated privilege escalation module for CVE-2020-25717/25719/CVE-2021-42287.
|
Hi, i refactored the code
What was added
Why I can't just call self.connection.generate_tgt() already present?
|
|
I just looked at the attack in more detail and I'm wondering if we really want to make a module for it, since essentially it's just creating a machine account and requesting a ST for the target SSH service, so everything is already doable with nxc except for requesting a ST. We could maybe add a
|
|
Adding an option to retrieve the ST looks good to me. |
|
Sounds good. Having an option to generate STs is nice anyway, a bit more versatility |

Description
Adds a new module to automate the Dollar Ticket Attack (CVE-2020-25717, CVE-2020-25719, CVE-2021-42287) - a privilege escalation technique targeting Linux/Unix systems joined to Active Directory.
Attack summary:
The attack exploits MIT Kerberos principal-to-username mapping where machine accounts ending with
$are stripped to local usernames. By creating a machine accountroot$and requesting a TGT forroot(without$), the KDC fallback issues a ticket forroot$which SSH maps to the localrootuser.Implementation:
add-computermodule for machine account creation (zero code duplication)getKerberosTGT()andgetKerberosTGS()directly for ticket generationDependencies:
The core implementation logic, attack flow, and testing were done manually.
Type of change
Setup guide for the review
Test Environment
My Setup:
Target Environment:
realm joinPrerequisites
Active Directory Domain Controller:
MachineAccountQuotaof 10 (standard Windows configuration)Linux/Unix Target System:
realm joinor SSSDDomain Credentials:
Step-by-Step Testing
Alternative Test Scenarios
Verification Commands
Expected Results
Success indicators:
root$created successfullyidcommandKnown failure scenarios (properly handled):
Screenshots:
Successful exploitation:
Checklist:
poetry run ruff check ., use--fixto automatically fix what it can)tests/e2e_commands.txtfile if necessary (new modules or features are required to be added to the e2e tests)