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

Changing LDAP/LDAPS port in find #197

Open
BrunoTeixeira1996 opened this issue Feb 15, 2024 · 8 comments · May be fixed by #198
Open

Changing LDAP/LDAPS port in find #197

BrunoTeixeira1996 opened this issue Feb 15, 2024 · 8 comments · May be fixed by #198

Comments

@BrunoTeixeira1996
Copy link

Hi guys,
Thanks for the amazing python package first of all!
Second, I am trying to use certipy in LDAPS however LDPAS is not running on default port and after checking the code looks like both LDAP and LDAPS ports are hardcoded.
Is there a way to create a flag to specify the port?

@BrunoTeixeira1996
Copy link
Author

class LDAPConnection:
def __init__(self, target: Target, scheme: str = "ldaps"):
self.target = target
self.scheme = scheme
if self.scheme == "ldap":
self.port = 389
elif self.scheme == "ldaps":
self.port = 636

@fgeek
Copy link

fgeek commented Feb 15, 2024

In what scenario is the port changed from the standard ports?

@BrunoTeixeira1996
Copy link
Author

In what scenario is the port changed from the standard ports?

My use case is a hack the box machine. I've noticed that the ports being used are 3268 and 3269 . That could be a flag like what certipy already does in auth with -ldap-port

@fgeek
Copy link

fgeek commented Feb 17, 2024

In what scenario is the port changed from the standard ports?

My use case is a hack the box machine. I've noticed that the ports being used are 3268 and 3269 . That could be a flag like what certipy already does in auth with -ldap-port

Alright. I just wanted to ask as I have never seen different ports in the field (not saying that this won't happen).

@BrunoTeixeira1996
Copy link
Author

In what scenario is the port changed from the standard ports?

My use case is a hack the box machine. I've noticed that the ports being used are 3268 and 3269 . That could be a flag like what certipy already does in auth with -ldap-port

Alright. I just wanted to ask as I have never seen different ports in the field (not saying that this won't happen).

Yes thats totaly fine and your question makes total sense 😁
So you think this should be something to consider?

@BrunoTeixeira1996 BrunoTeixeira1996 linked a pull request Feb 20, 2024 that will close this issue
@BrunoTeixeira1996
Copy link
Author

@fgeek I've created #198 and tested here and it worked.
Maybe double check if has everything you want :)

@noraj
Copy link

noraj commented Apr 16, 2024

In what scenario is the port changed from the standard ports?

image

Real DC on real client infra.

@BrunoTeixeira1996
Copy link
Author

@noraj yep that happened to me as well.
I am not sure why this simple fix is taking too long to be reviewed however you could use my fork instead in the mean time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants