Skip to content

Commit b2b5c68

Browse files
committed
We must connect to the DC instead of the target because we can only enumerate domain groups on the DC
1 parent 7108e2a commit b2b5c68

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

nxc/modules/presence.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ def on_admin_login(self, context, connection):
1919
admin_users = []
2020

2121
try:
22-
string_binding = fr"ncacn_np:{connection.host}[\pipe\samr]"
22+
string_binding = fr"ncacn_np:{connection.kdcHost}[\pipe\samr]"
2323
context.log.debug(f"Using string binding: {string_binding}")
2424

2525
rpctransport = transport.DCERPCTransportFactory(string_binding)
26-
rpctransport.setRemoteHost(connection.host)
26+
rpctransport.setRemoteHost(connection.kdcHost)
2727
rpctransport.set_credentials(
2828
connection.username,
2929
connection.password,

0 commit comments

Comments
 (0)