Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ConstrainedDelegation-Backdoor #65

Merged
merged 3 commits into from
Nov 27, 2018
Merged

Conversation

Dliv3
Copy link
Contributor

@Dliv3 Dliv3 commented Nov 5, 2018

This is a way to leave a backdoor through the constrained delegation in the AD environment.

reference:
https://labs.mwrinfosecurity.com/blog/trust-years-to-earn-seconds-to-break/

@samratashok
Copy link
Owner

Thanks! Let me test that!

@samratashok samratashok self-requested a review November 5, 2018 04:33
@samratashok samratashok removed their request for review November 5, 2018 04:34
@samratashok
Copy link
Owner

Testing in progress - Needs AD Module

@Dliv3
Copy link
Contributor Author

Dliv3 commented Nov 12, 2018

Need me to fix this bug and submit a new Pull Request ?

@samratashok
Copy link
Owner

That would be great!

@Dliv3
Copy link
Contributor Author

Dliv3 commented Nov 12, 2018

Do you think it is a good idea to solve this problem with https://github.com/samratashok/ADModule when Get-Module ActiveDirectory failed ?

@samratashok
Copy link
Owner

I think it would be better to use System.DirectoryServices and other .Net classes so as to reduce the dependency. If that cannot be done, than use #require and the script can still be merged.

@samratashok
Copy link
Owner

I meant #require check for ActiveDirectory module.

@Dliv3
Copy link
Contributor Author

Dliv3 commented Nov 12, 2018

I tried to write code using System.DirectoryServices, but I didn't succeed because I didn't find out how to manipulate the service account and unrestricted delegation through System.DirectoryServices. In addition, the #require check for the AD module has been added.

@samratashok
Copy link
Owner

I am getting an error 'The Server is unwilling to process the request' on line 104 (New-ADUser). Trying to check the reason.

Also, Is that $SPN supposed to be $ServicePrincipalName.

I really like the idea of the backdoor.

@Dliv3
Copy link
Contributor Author

Dliv3 commented Nov 12, 2018

Oh sorry, it is my mistake. $SPN should indeed be $ServicePrincipalName.

@Dliv3
Copy link
Contributor Author

Dliv3 commented Nov 13, 2018

Under what circumstances will cause 'The Server is unwilling to process the request' error? I did not get this error when testing on win7 win10 win2008R2 win2012R2.

@Dliv3
Copy link
Contributor Author

Dliv3 commented Nov 15, 2018

Any progress?

@samratashok
Copy link
Owner

Merged! Will rename this and do some changes. Thanks for the contribution :)

@samratashok samratashok merged commit 01e993b into samratashok:master Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants