Skip to content

ISSUE-1077: addcomputer: add SAMR_LDAP finalization mode - #2179

Merged
anadrianmanrique merged 1 commit into
fortra:masterfrom
herbenderbler:ISSUE-1077/samr-set-machine
Aug 28, 2026
Merged

ISSUE-1077: addcomputer: add SAMR_LDAP finalization mode#2179
anadrianmanrique merged 1 commit into
fortra:masterfrom
herbenderbler:ISSUE-1077/samr-set-machine

Conversation

@herbenderbler

Copy link
Copy Markdown
Contributor
  • Add explicit SAMR_LDAP method to examples/addcomputer.py.
  • Keep existing SAMR behavior unchanged for SMB-only environments.
  • After SAMR account creation, finalize dnsHostName and servicePrincipalName over LDAPS.
  • Fail the SAMR_LDAP flow if LDAP finalization cannot be completed.

@jagotu

jagotu commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

I didn't test if it works, but I don't see any issue with the approach.

I would still consider exposing a "finalization-only" mode, so for example if you did a SAMR-only addcomputer from a relay, you can finalize the account using addcomputer.py with the computer's credentials (given they have enough access rights).

@herbenderbler
herbenderbler force-pushed the ISSUE-1077/samr-set-machine branch from e8c4fb7 to 9d1db8a Compare April 29, 2026 16:41
@herbenderbler

Copy link
Copy Markdown
Contributor Author

I didn't test if it works, but I don't see any issue with the approach.

I tested locally and also added regression testing to keep this in place. Let me know if this is overkill and/or if I missed the mark somewhere.

I would still consider exposing a "finalization-only" mode, so for example if you did a SAMR-only addcomputer from a relay, you can finalize the account using addcomputer.py with the computer's credentials (given they have enough access rights).

I just pushed a new finalization-only mode. Like before, let me know if this doesn't land with you and I can rework what I wrote.

@anadrianmanrique anadrianmanrique added bug Unexpected problem or unintended behavior in review This issue or pull request is being analyzed labels May 30, 2026
@anadrianmanrique anadrianmanrique self-assigned this Jul 24, 2026
@anadrianmanrique anadrianmanrique added enhancement Implemented features can be improved or revised and removed bug Unexpected problem or unintended behavior labels Aug 27, 2026
@anadrianmanrique
anadrianmanrique force-pushed the ISSUE-1077/samr-set-machine branch from 9d1db8a to 29518c9 Compare August 27, 2026 17:42
@anadrianmanrique anadrianmanrique removed the in review This issue or pull request is being analyzed label Aug 28, 2026
@anadrianmanrique

Copy link
Copy Markdown
Collaborator

Thanks for the PR. I updated the code to use impacket.ldap instead of ldap3.
Merging now. thanks!

@anadrianmanrique
anadrianmanrique merged commit 032dfb1 into fortra:master Aug 28, 2026
8 checks passed
@herbenderbler
herbenderbler deleted the ISSUE-1077/samr-set-machine branch August 28, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Implemented features can be improved or revised

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants