From 90b5afc46fca550802511c445d04a64010e26a29 Mon Sep 17 00:00:00 2001 From: azoxlpf <213314124+azoxlpf@users.noreply.github.com> Date: Fri, 9 Oct 2026 17:36:53 +0200 Subject: [PATCH 1/8] Reach legacy RDP servers by allowing weak TLS ciphers --- nxc/protocols/rdp.py | 53 +++++++++++++++++++++++++++++---- nxc/protocols/rdp/proto_args.py | 1 + pyproject.toml | 2 +- 3 files changed, 49 insertions(+), 7 deletions(-) diff --git a/nxc/protocols/rdp.py b/nxc/protocols/rdp.py index 04fb9d5334..780f4940b5 100644 --- a/nxc/protocols/rdp.py +++ b/nxc/protocols/rdp.py @@ -43,11 +43,12 @@ def __init__(self, args, db, host): SUPP_PROTOCOLS.RDP, ] self.protoflags = [ - SUPP_PROTOCOLS.SSL, SUPP_PROTOCOLS.RDP, + SUPP_PROTOCOLS.SSL, SUPP_PROTOCOLS.SSL | SUPP_PROTOCOLS.HYBRID, SUPP_PROTOCOLS.SSL | SUPP_PROTOCOLS.HYBRID_EX, ] + self.selected_proto = None width, height = args.res.upper().split("X") height = int(height) width = int(width) @@ -107,8 +108,11 @@ def write(self, msg): def print_host_info(self): nla = colored(f"nla:{self.nla}", host_info_colors[3], attrs=["bold"]) if self.nla else colored(f"nla:{self.nla}", host_info_colors[2], attrs=["bold"]) - if self.domain is None: - self.logger.display(f"Probably old, doesn't not support HYBRID or HYBRID_EX ({nla})") + if self.server_os is None: + if self.selected_proto == SUPP_PROTOCOLS.RDP: + self.logger.display(f"Standard RDP Security only, no server info available ({nla})") + else: + self.logger.display(f"Probably old, doesn't not support HYBRID or HYBRID_EX ({nla})") else: self.logger.display(f"{self.server_os} (name:{self.hostname}) (domain:{self.domain}) ({nla})") try: @@ -147,12 +151,23 @@ def create_conn_obj(self): self.domain = sanitize_dns(info_domain.get("dnsdomainname") or self.host, self.logger) self.server_os = f"{info_domain.get('os_guess', 'Unknown')} Build {info_domain.get('os_build', 'Unknown')}" self.logger.extra["hostname"] = self.hostname + self.selected_proto = proto break + else: + self.selected_proto = proto # accepted: without CredSSP the dummy credentials cannot fail here + break + + if self.selected_proto is None: + self.logger.debug("Server rejected every protocol we offered") + else: + self.iosettings.supported_protocols = self.selected_proto if self.args.domain: self.domain = self.args.domain if self.args.local_auth: self.domain = self.hostname + if self.domain is None: + self.domain = self.hostname self.remoteName = self.host if not self.kerberos else f"{self.hostname}.{self.domain}" @@ -219,6 +234,32 @@ async def connect_rdp_with_cleanup(self): finally: await self.terminate_conn() + async def check_logon(self): + """Tell whether the credentials were accepted when the handshake itself did not check them. + + Only CredSSP authenticates during the handshake. Elsewhere the server takes the connection + whatever we send, then reports a successful logon with a Save Session Info PDU. A refused + logon gets no PDU at all on current Windows, hence the wait for --rdp-logon-timeout. + """ + if SUPP_PROTOCOLS.HYBRID in self.conn.x224_protocol or SUPP_PROTOCOLS.HYBRID_EX in self.conn.x224_protocol: + return + try: + await asyncio.wait_for(self.conn.logon_info_received.wait(), timeout=self.args.rdp_logon_timeout) + except TimeoutError: + if self.conn.logon_error is None: + self.logger.debug("Server sent no Save Session Info PDU, the logon never completed") + raise Exception("STATUS_LOGON_FAILURE") from None + if self.conn.logon_error is not None: + raise Exception(f"Logon refused by the server: {self.conn.logon_error.name}") + + async def connect_rdp_and_check_logon(self): + """Connect, make sure the logon really happened, and always terminate the connection on exit""" + try: + await self.connect_rdp() + await self.check_logon() + finally: + await self.terminate_conn() + def kerberos_login(self, domain, username, password="", ntlm_hash="", aesKey="", kdcHost="", useCache=False): try: lmhash = "" @@ -272,7 +313,7 @@ def kerberos_login(self, domain, username, password="", ntlm_hash="", aesKey="", stype=stype, ) self.conn = RDPConnection(iosettings=self.iosettings, target=self.target, credentials=self.auth) - asyncio.run(self.connect_rdp_with_cleanup()) + asyncio.run(self.connect_rdp_and_check_logon()) self.admin_privs = True self.logger.success( @@ -328,7 +369,7 @@ def plaintext_login(self, domain, username, password): stype=asyauthSecret.PASS, ) self.conn = RDPConnection(iosettings=self.iosettings, target=self.target, credentials=self.auth) - asyncio.run(self.connect_rdp_with_cleanup()) + asyncio.run(self.connect_rdp_and_check_logon()) self.admin_privs = True self.logger.success(f"{domain}\\{username}:{process_secret(password)} {self.mark_pwned()}") @@ -362,7 +403,7 @@ def hash_login(self, domain, username, ntlm_hash): stype=asyauthSecret.NT, ) self.conn = RDPConnection(iosettings=self.iosettings, target=self.target, credentials=self.auth) - asyncio.run(self.connect_rdp_with_cleanup()) + asyncio.run(self.connect_rdp_and_check_logon()) self.admin_privs = True self.logger.success(f"{self.domain}\\{username}:{process_secret(ntlm_hash)} {self.mark_pwned()}") diff --git a/nxc/protocols/rdp/proto_args.py b/nxc/protocols/rdp/proto_args.py index a604675716..6836944ad9 100644 --- a/nxc/protocols/rdp/proto_args.py +++ b/nxc/protocols/rdp/proto_args.py @@ -6,6 +6,7 @@ def proto_args(parser, parents): rdp_parser.add_argument("-H", "--hash", metavar="HASH", dest="hash", nargs="+", default=[], help="NTLM hash(es) or file(s) containing NTLM hashes") rdp_parser.add_argument("--port", type=int, default=3389, help="RDP port") rdp_parser.add_argument("--rdp-timeout", type=int, default=5, help="RDP timeout on socket connection") + rdp_parser.add_argument("--rdp-logon-timeout", type=int, default=30, help="Time to wait for the logon result when the server has no NLA") rdp_parser.add_argument("--nla-screenshot", action="store_true", help="Screenshot RDP login prompt if NLA is disabled") dgroup = rdp_parser.add_mutually_exclusive_group() diff --git a/pyproject.toml b/pyproject.toml index f46daeb450..2dff1e9d2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ classifiers = [ "Topic :: Security" ] dependencies = [ - "aardwolf>=0.2.14", + "aardwolf>=0.2.16", "argcomplete>=3.1.4", "asyauth>=0.0.20", "beautifulsoup4>=4.11,<5", From cdb9fe6f2caee1b02e23f0459894d2fff99093a8 Mon Sep 17 00:00:00 2001 From: mpgn Date: Thu, 5 Nov 2026 00:23:30 +0100 Subject: [PATCH 2/8] rdp: drop check_logon(), aardwolf now confirms the autologon itself --- nxc/protocols/rdp.py | 19 ------------------- nxc/protocols/rdp/proto_args.py | 1 - 2 files changed, 20 deletions(-) diff --git a/nxc/protocols/rdp.py b/nxc/protocols/rdp.py index 27fac32035..ccd3f04c4d 100644 --- a/nxc/protocols/rdp.py +++ b/nxc/protocols/rdp.py @@ -254,24 +254,6 @@ async def connect_rdp_with_cleanup(self, auth_only=False): finally: await self.terminate_conn() - async def check_logon(self): - """Tell whether the credentials were accepted when the handshake itself did not check them. - - Only CredSSP authenticates during the handshake. Elsewhere the server takes the connection - whatever we send, then reports a successful logon with a Save Session Info PDU. A refused - logon gets no PDU at all on current Windows, hence the wait for --rdp-logon-timeout. - """ - if SUPP_PROTOCOLS.HYBRID in self.conn.x224_protocol or SUPP_PROTOCOLS.HYBRID_EX in self.conn.x224_protocol: - return - try: - await asyncio.wait_for(self.conn.logon_info_received.wait(), timeout=self.args.rdp_logon_timeout) - except TimeoutError: - if self.conn.logon_error is None: - self.logger.debug("Server sent no Save Session Info PDU, the logon never completed") - raise Exception("STATUS_LOGON_FAILURE") from None - if self.conn.logon_error is not None: - raise Exception(f"Logon refused by the server: {self.conn.logon_error.name}") - async def login_and_confirm(self): """Connect and return whether a real session opened (Save Session Info PDU), always cleaning up. @@ -279,7 +261,6 @@ async def login_and_confirm(self): """ try: await self.connect_rdp() - await self.check_logon() try: await asyncio.wait_for(self.conn.logon_info_received.wait(), timeout=self.args.rdp_timeout) return True diff --git a/nxc/protocols/rdp/proto_args.py b/nxc/protocols/rdp/proto_args.py index 82ec33c871..057c927788 100644 --- a/nxc/protocols/rdp/proto_args.py +++ b/nxc/protocols/rdp/proto_args.py @@ -6,7 +6,6 @@ def proto_args(parser, parents): rdp_parser.add_argument("-H", "--hash", metavar="HASH", dest="hash", nargs="+", default=[], help="NTLM hash(es) or file(s) containing NTLM hashes") rdp_parser.add_argument("--port", type=int, default=3389, help="RDP port") rdp_parser.add_argument("--rdp-timeout", type=int, default=5, help="RDP timeout on socket connection") - rdp_parser.add_argument("--rdp-logon-timeout", type=int, default=30, help="Time to wait for the logon result when the server has no NLA") rdp_parser.add_argument("--nla-screenshot", action="store_true", help="Screenshot RDP login prompt if NLA is disabled") dgroup = rdp_parser.add_mutually_exclusive_group() From b502b3c2c3c3969b61889966fe632ec5eb74b6a9 Mon Sep 17 00:00:00 2001 From: mpgn Date: Thu, 5 Nov 2026 00:23:37 +0100 Subject: [PATCH 3/8] rdp: don't autologon with the dummy fingerprint credentials --- nxc/protocols/rdp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nxc/protocols/rdp.py b/nxc/protocols/rdp.py index ccd3f04c4d..e597fa7881 100644 --- a/nxc/protocols/rdp.py +++ b/nxc/protocols/rdp.py @@ -137,7 +137,7 @@ def _create_rdp_connection(self, credentials, supported_protocols=None): ) def create_conn_obj(self): - self.target = RDPTarget(ip=self.host, domain="FAKE", port=self.port, timeout=self.args.rdp_timeout, unsafe_ssl=True) # old servers only offer ciphers OpenSSL rejects at its default security level + self.target = RDPTarget(ip=self.host, domain="FAKE", port=self.port, timeout=self.args.rdp_timeout, unsafe_ssl=True, autologon=False) # old servers only offer ciphers OpenSSL rejects at its default security level; no autologon with the dummy credentials self.auth = NTLMCredential(secret="pass", username="user", domain="FAKE", stype=asyauthSecret.PASS) asyncio.run(self.check_nla()) From 432e6d24c103168cfa6f767c00e4ca98ac3673ce Mon Sep 17 00:00:00 2001 From: mpgn Date: Thu, 5 Nov 2026 00:24:33 +0100 Subject: [PATCH 4/8] rdp: offer the accepted protocol on logins when the server has no CredSSP --- nxc/protocols/rdp.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nxc/protocols/rdp.py b/nxc/protocols/rdp.py index e597fa7881..2b85c5987f 100644 --- a/nxc/protocols/rdp.py +++ b/nxc/protocols/rdp.py @@ -53,6 +53,7 @@ def __init__(self, args, db, host): SUPP_PROTOCOLS.SSL | SUPP_PROTOCOLS.HYBRID_EX, ] self.selected_proto = None + self.login_proto = None width, height = args.res.upper().split("X") height = int(height) width = int(width) @@ -128,8 +129,9 @@ def _create_rdp_connection(self, credentials, supported_protocols=None): iosettings = self.iosettings.clone_for_connection() # Explicit protocols are used by discovery and screenshot fallbacks. # Authenticated connections leave this unset so aardwolf selects the - # X224 flags appropriate for the credential type. - iosettings.supported_protocols = supported_protocols + # X224 flags appropriate for the credential type, unless the server + # has no CredSSP and only takes the protocol create_conn_obj() found. + iosettings.supported_protocols = self.login_proto if supported_protocols is None else supported_protocols return RDPConnection( iosettings=iosettings, target=copy.deepcopy(self.target), @@ -173,8 +175,8 @@ def create_conn_obj(self): if self.selected_proto is None: self.logger.debug("Server rejected every protocol we offered") - else: - self.iosettings.supported_protocols = self.selected_proto + elif self.selected_proto in (SUPP_PROTOCOLS.RDP, SUPP_PROTOCOLS.SSL): + self.login_proto = self.selected_proto if self.args.domain: self.domain = self.args.domain From d54293014cf3c64f5461217decb296f54aac8823 Mon Sep 17 00:00:00 2001 From: mpgn Date: Thu, 5 Nov 2026 00:24:53 +0100 Subject: [PATCH 5/8] rdp: give the autologon confirmation its own time on top of --rdp-timeout --- nxc/protocols/rdp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nxc/protocols/rdp.py b/nxc/protocols/rdp.py index 2b85c5987f..17fe938a47 100644 --- a/nxc/protocols/rdp.py +++ b/nxc/protocols/rdp.py @@ -238,7 +238,8 @@ async def connect_rdp(self, auth_only=False): without establishing a full RDP session. This verifies credentials without creating a disconnected session on single-session hosts. """ - _, err = await asyncio.wait_for(self.conn.connect(auth_only=auth_only), timeout=self.args.rdp_timeout) + # Without CredSSP, connect() also waits up to autologon_timeout for the server to confirm the logon + _, err = await asyncio.wait_for(self.conn.connect(auth_only=auth_only), timeout=self.args.rdp_timeout + (self.conn.autologon_timeout if self.login_proto is not None else 0)) if err is not None: raise err self.logger.debug(f"RDP negotiated protocol: {self.conn.x224_protocol}, authz_result: {self.conn.authz_result}") From 47fcfeb0a256f77410ec1153c8f88528d064df09 Mon Sep 17 00:00:00 2001 From: mpgn Date: Sun, 8 Nov 2026 19:53:24 +0100 Subject: [PATCH 6/8] Bump aardwolf to 0.2.17 0.2.17 brings RDPTarget(autologon=...) and the autologon confirmation this PR relies on. It pulls asyauth 0.0.25, minikerberos 0.4.12 and asysocks 0.2.19. --- poetry.lock | 42 +++++++++++++++++++++--------------------- pyproject.toml | 2 +- uv.lock | 30 +++++++++++++++--------------- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/poetry.lock b/poetry.lock index 52804bba89..63c26d800a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,24 +2,24 @@ [[package]] name = "aardwolf" -version = "0.2.16" +version = "0.2.17" description = "Asynchronous RDP protocol implementation" optional = false python-versions = ">=3.11" groups = ["main"] files = [ - {file = "aardwolf-0.2.16-cp311-abi3-macosx_11_0_arm64.whl", hash = "sha256:fbde3046d4cdd3a5596dfcc988965b85527632cee46db2522961893d101fcbc7"}, - {file = "aardwolf-0.2.16-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:69bedfad4b68b855a9d0df928c78eb0bbdc642c22f9845778c9df77a8fe9c259"}, - {file = "aardwolf-0.2.16-cp311-abi3-win_amd64.whl", hash = "sha256:b4d6032110ee238cf11c1f5efa86636462d7dc2e972b8464e949da82df58f3a6"}, - {file = "aardwolf-0.2.16.tar.gz", hash = "sha256:52cba79817af963108dcd39e82513deec742387f2fab01a9138abe56f94e7ad2"}, + {file = "aardwolf-0.2.17-cp311-abi3-macosx_11_0_arm64.whl", hash = "sha256:24387eaa8a730e9317c5141b8e9fa41324e4a8ee2d21267d62af4b933c7195bf"}, + {file = "aardwolf-0.2.17-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:8a2fc66cb4c32ff5ede8f9a157e4b7f6f62ca34ca86a2b8443879ac963f34642"}, + {file = "aardwolf-0.2.17-cp311-abi3-win_amd64.whl", hash = "sha256:4bb4f16f2acc3292a507197a35923a89763f7a173538c46d089e242b8f106910"}, + {file = "aardwolf-0.2.17.tar.gz", hash = "sha256:42ee9e8d457e11b2bb8dc1400268c39c5898cc7b1fa9c3735a43ee2ee28505e0"}, ] [package.dependencies] arc4 = ">=0.3.0" asn1crypto = "*" asn1tools = "*" -asyauth = ">=0.0.16" -asysocks = ">=0.2.9" +asyauth = ">=0.0.25" +asysocks = ">=0.2.11" colorama = "*" Pillow = ">=9.0.0" pyperclip = ">=1.8.2" @@ -193,32 +193,32 @@ shell = ["prompt_toolkit"] [[package]] name = "asyauth" -version = "0.0.23" +version = "0.0.25" description = "Unified authentication library" optional = false python-versions = ">=3.7" groups = ["main"] files = [ - {file = "asyauth-0.0.23-py3-none-any.whl", hash = "sha256:bbca62d10c4b0d2585103791d7451adda325c3d654114253638456fe84d39b0e"}, - {file = "asyauth-0.0.23.tar.gz", hash = "sha256:36f0384ddb2b625a10333363cafe190d6e9c9ed17fd07b3e2887641a3cc626f0"}, + {file = "asyauth-0.0.25-py3-none-any.whl", hash = "sha256:c3d8b98d9ec5895a4aebd3d3bb10d52440c210c43f65cbb3a3dc04b5b6522f32"}, + {file = "asyauth-0.0.25.tar.gz", hash = "sha256:6326599e7951bdf9fd1dfee20811dbbef41f5fdd591dbccb8d8af6d4edc36775"}, ] [package.dependencies] asn1crypto = ">=1.3.0" -asysocks = ">=0.2.18" -minikerberos = ">=0.4.9" +asysocks = ">=0.2.19" +minikerberos = ">=0.4.12" unicrypto = ">=0.0.12" [[package]] name = "asysocks" -version = "0.2.18" +version = "0.2.19" description = "" optional = false python-versions = ">=3.6" groups = ["main"] files = [ - {file = "asysocks-0.2.18-py3-none-any.whl", hash = "sha256:a881536456d922a9fde44031aba262bc34ee39a9d14749ded1e8a4820602a37d"}, - {file = "asysocks-0.2.18.tar.gz", hash = "sha256:cc6196e82c8adc8b3ce2321dddf635500c760316da4b7cca321b532cbb3dfdf5"}, + {file = "asysocks-0.2.19-py3-none-any.whl", hash = "sha256:be34dd128287371cad5ff6332314034d54d587ba58a0c7dd8be2787138c29d28"}, + {file = "asysocks-0.2.19.tar.gz", hash = "sha256:c8ffa154ad7ca46aaa06c1f86f347bc20f3b8c696186b08fc4193791212b2bec"}, ] [package.dependencies] @@ -1509,19 +1509,19 @@ files = [ [[package]] name = "minikerberos" -version = "0.4.9" +version = "0.4.12" description = "Kerberos manipulation library in pure Python" optional = false -python-versions = ">=3.6" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "minikerberos-0.4.9-py3-none-any.whl", hash = "sha256:3c3a422541bc66719bd495f89cb6f9e149fba8f1499b9f550aa88cd9aa532ffa"}, - {file = "minikerberos-0.4.9.tar.gz", hash = "sha256:095a980a1976adff48c3de1f73d75efe9b39da7214dc7c891a2363240716a9e7"}, + {file = "minikerberos-0.4.12-py3-none-any.whl", hash = "sha256:4a8b0ce5ccd28e858e72124dc5764168da230b9af0b400406b6a7788cf7fa82e"}, + {file = "minikerberos-0.4.12.tar.gz", hash = "sha256:607498d430042d6ba53f390a5a11e0a29cb1d3744bbb130ef2e7bf2f5e86b06c"}, ] [package.dependencies] asn1crypto = ">=1.5.1" -asysocks = ">=0.2.18" +asysocks = ">=0.2.19" oscrypto = ">=1.3.0" six = "*" tqdm = "*" @@ -2841,4 +2841,4 @@ test = ["pytest", "pytest-cov"] [metadata] lock-version = "2.1" python-versions = ">=3.11,<4.0" -content-hash = "6ba2529d5c77bb8a64abe738ec3117d903a34de437bdd5eea0b7f0830a9ec0f9" +content-hash = "a2b53674107a5f115a8daf45f5523aca0bfe2a0475bcb41d34f7a4f79f8c8e03" diff --git a/pyproject.toml b/pyproject.toml index fa36e58c26..e3c43c6fd1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ classifiers = [ "Topic :: Security" ] dependencies = [ - "aardwolf>=0.2.16", + "aardwolf>=0.2.17", "argcomplete>=3.1.4", "asyauth>=0.0.20", "bloodhound-ce>=1.8.0", diff --git a/uv.lock b/uv.lock index 6e90acdbf9..4d6986b63a 100644 --- a/uv.lock +++ b/uv.lock @@ -8,7 +8,7 @@ exclude-newer-span = "P1D" [[package]] name = "aardwolf" -version = "0.2.16" +version = "0.2.17" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "arc4" }, @@ -22,11 +22,11 @@ dependencies = [ { name = "tqdm" }, { name = "unicrypto" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/71/0f/79f2acb31e1144a3895d17ad9136272d2b75ed3bd24eb1c415129d5e089d/aardwolf-0.2.16.tar.gz", hash = "sha256:52cba79817af963108dcd39e82513deec742387f2fab01a9138abe56f94e7ad2", size = 1013103, upload-time = "2026-10-04T18:44:46.704Z" } +sdist = { url = "https://files.pythonhosted.org/packages/6c/21/60829e9ab5fcc41b32886d80ad8fbe86e56ade3c68086aab0cef5cd30df7/aardwolf-0.2.17.tar.gz", hash = "sha256:42ee9e8d457e11b2bb8dc1400268c39c5898cc7b1fa9c3735a43ee2ee28505e0", size = 1015659, upload-time = "2026-11-07T13:17:18.893Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/6c/8d/a0cfa361e4077c56bcda4b820c462dbea4a11ff60110bc8486c1f051b660/aardwolf-0.2.16-cp311-abi3-macosx_11_0_arm64.whl", hash = "sha256:fbde3046d4cdd3a5596dfcc988965b85527632cee46db2522961893d101fcbc7", size = 2169322, upload-time = "2026-10-04T18:44:41.102Z" }, - { url = "https://files.pythonhosted.org/packages/15/7b/079c9087a742763141d3e2e4b000f34c3962aa6cb67599158fcb08c9aaaa/aardwolf-0.2.16-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:69bedfad4b68b855a9d0df928c78eb0bbdc642c22f9845778c9df77a8fe9c259", size = 2241815, upload-time = "2026-10-04T18:44:43.011Z" }, - { url = "https://files.pythonhosted.org/packages/71/43/b51e73133aae6a3e56bfb79174e8a4edc99f8ef051202b0e7173053a0886/aardwolf-0.2.16-cp311-abi3-win_amd64.whl", hash = "sha256:b4d6032110ee238cf11c1f5efa86636462d7dc2e972b8464e949da82df58f3a6", size = 1966337, upload-time = "2026-10-04T18:44:45.294Z" }, + { url = "https://files.pythonhosted.org/packages/65/b9/622f084b4d5f5f00516c7a565388583b5e47c4f842a244ac619cd51f3052/aardwolf-0.2.17-cp311-abi3-macosx_11_0_arm64.whl", hash = "sha256:24387eaa8a730e9317c5141b8e9fa41324e4a8ee2d21267d62af4b933c7195bf", size = 2171791, upload-time = "2026-11-07T13:17:13.867Z" }, + { url = "https://files.pythonhosted.org/packages/bb/fa/1b8c4c3b2cc0abc4da838f5a02974eea4991eec1f52d9b487dbc68bb6b0c/aardwolf-0.2.17-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:8a2fc66cb4c32ff5ede8f9a157e4b7f6f62ca34ca86a2b8443879ac963f34642", size = 2244445, upload-time = "2026-11-07T13:17:15.632Z" }, + { url = "https://files.pythonhosted.org/packages/0c/9e/b8d7b3cbd9b3f10d453c212069cfb53cd13f8025034b14bf07ac9bcb15e1/aardwolf-0.2.17-cp311-abi3-win_amd64.whl", hash = "sha256:4bb4f16f2acc3292a507197a35923a89763f7a173538c46d089e242b8f106910", size = 1968847, upload-time = "2026-11-07T13:17:17.033Z" }, ] [[package]] @@ -149,7 +149,7 @@ sdist = { url = "https://files.pythonhosted.org/packages/9b/30/3338efbfe7a943b81 [[package]] name = "asyauth" -version = "0.0.23" +version = "0.0.25" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "asn1crypto" }, @@ -157,23 +157,23 @@ dependencies = [ { name = "minikerberos" }, { name = "unicrypto" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/95/a3/32dcd11aa43bcb25d5023fff69e94248a0ffabcaecd5e7260f5932c43a09/asyauth-0.0.23.tar.gz", hash = "sha256:36f0384ddb2b625a10333363cafe190d6e9c9ed17fd07b3e2887641a3cc626f0", size = 79960, upload-time = "2025-10-29T09:52:45.894Z" } +sdist = { url = "https://files.pythonhosted.org/packages/27/14/ef80b4933cd3a2bbfce17831d05f12daaaffe15f2f425a24ab67a7dc7e44/asyauth-0.0.25.tar.gz", hash = "sha256:6326599e7951bdf9fd1dfee20811dbbef41f5fdd591dbccb8d8af6d4edc36775", size = 85439, upload-time = "2026-11-07T12:14:58.522Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/26/ca/6d909a8bfff38ad3c1477d502c7ebf61288ac790d16eeb8bfbe2dcfcb4f0/asyauth-0.0.23-py3-none-any.whl", hash = "sha256:bbca62d10c4b0d2585103791d7451adda325c3d654114253638456fe84d39b0e", size = 116185, upload-time = "2025-10-29T09:52:44.684Z" }, + { url = "https://files.pythonhosted.org/packages/26/88/285eceb8bbe28bef074f0902808a6713e429187922269c2bc8bbac791be9/asyauth-0.0.25-py3-none-any.whl", hash = "sha256:c3d8b98d9ec5895a4aebd3d3bb10d52440c210c43f65cbb3a3dc04b5b6522f32", size = 121261, upload-time = "2026-11-07T12:14:57.278Z" }, ] [[package]] name = "asysocks" -version = "0.2.18" +version = "0.2.19" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "asn1crypto" }, { name = "cryptography" }, { name = "h11" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/e3/67/62b03894335465f89bea910e33d15878b3c997bbaafaecf630bcdf8e89de/asysocks-0.2.18.tar.gz", hash = "sha256:cc6196e82c8adc8b3ce2321dddf635500c760316da4b7cca321b532cbb3dfdf5", size = 117822, upload-time = "2025-10-29T08:00:23.186Z" } +sdist = { url = "https://files.pythonhosted.org/packages/4f/83/5151a060e58582f1d395b84c106f64d61313fa157c224364646c170ad03c/asysocks-0.2.19.tar.gz", hash = "sha256:c8ffa154ad7ca46aaa06c1f86f347bc20f3b8c696186b08fc4193791212b2bec", size = 127145, upload-time = "2026-11-04T21:27:14.011Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/71/b5/abf85f5444b264bf9f943eb1f6f577ebf3af34c8c4f66c1629d1f063eaa0/asysocks-0.2.18-py3-none-any.whl", hash = "sha256:a881536456d922a9fde44031aba262bc34ee39a9d14749ded1e8a4820602a37d", size = 149610, upload-time = "2025-10-29T08:00:21.76Z" }, + { url = "https://files.pythonhosted.org/packages/53/70/99cd52c7c541d79174ef8b978fb00fe5bb5285ef424f8ee50ec7bc71a189/asysocks-0.2.19-py3-none-any.whl", hash = "sha256:be34dd128287371cad5ff6332314034d54d587ba58a0c7dd8be2787138c29d28", size = 160234, upload-time = "2026-11-04T21:27:12.603Z" }, ] [[package]] @@ -1179,7 +1179,7 @@ wheels = [ [[package]] name = "minikerberos" -version = "0.4.9" +version = "0.4.12" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "asn1crypto" }, @@ -1189,9 +1189,9 @@ dependencies = [ { name = "tqdm" }, { name = "unicrypto" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/f2/a9/2d2538224db85f8c4d513efa2f01697c7be5a15c6ef174132a371945d777/minikerberos-0.4.9.tar.gz", hash = "sha256:095a980a1976adff48c3de1f73d75efe9b39da7214dc7c891a2363240716a9e7", size = 144960, upload-time = "2025-10-29T09:50:50.932Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e6/6b/3fe5bba950ea9c5f802cadf43f590757c014f9261cdab9f422f4f3c3f1d7/minikerberos-0.4.12.tar.gz", hash = "sha256:607498d430042d6ba53f390a5a11e0a29cb1d3744bbb130ef2e7bf2f5e86b06c", size = 154227, upload-time = "2026-11-07T12:07:18.385Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/90/24/ebe89493824e99be641faddb355594782b634af093866f2b19f398c60ecc/minikerberos-0.4.9-py3-none-any.whl", hash = "sha256:3c3a422541bc66719bd495f89cb6f9e149fba8f1499b9f550aa88cd9aa532ffa", size = 162058, upload-time = "2025-10-29T09:50:49.219Z" }, + { url = "https://files.pythonhosted.org/packages/8a/06/2ea3a877d6add3cb5ebaa34513f171dc6297213237d750492cf5a82dfc8c/minikerberos-0.4.12-py3-none-any.whl", hash = "sha256:4a8b0ce5ccd28e858e72124dc5764168da230b9af0b400406b6a7788cf7fa82e", size = 165033, upload-time = "2026-11-07T12:07:16.934Z" }, ] [[package]] @@ -1278,7 +1278,7 @@ dev = [ [package.metadata] requires-dist = [ - { name = "aardwolf", specifier = ">=0.2.16" }, + { name = "aardwolf", specifier = ">=0.2.17" }, { name = "argcomplete", specifier = ">=3.1.4" }, { name = "asyauth", specifier = ">=0.0.20" }, { name = "bloodhound-ce", specifier = ">=1.8.0" }, From 852d009d777433621f3c410fc57dde4dd8e415bd Mon Sep 17 00:00:00 2001 From: mpgn Date: Sun, 8 Nov 2026 19:53:24 +0100 Subject: [PATCH 7/8] rdp: only log on with a password when the server has no CredSSP Without CredSSP aardwolf sends the secret as the autologon password, so a hash, AES key or ccache could only fail the logon, after 17 s and with +2 badPwdCount. --- nxc/protocols/rdp.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nxc/protocols/rdp.py b/nxc/protocols/rdp.py index 054bce6a98..8689427fdc 100644 --- a/nxc/protocols/rdp.py +++ b/nxc/protocols/rdp.py @@ -267,6 +267,8 @@ async def login_and_confirm(self): That PDU never comes when access is authorized but the logon is refused (restricted admin). """ + if self.login_proto is not None and self.auth.stype != asyauthSecret.PASSWORD: # without CredSSP aardwolf sends the secret as the autologon password, so a hash, key or ccache only fails (+2 badPwdCount) + raise ValueError("no CredSSP on this server, only a password can log on") await self.terminate_conn() # a session kept by an earlier success (--continue-on-success) would take a session slot this logon needs self.conn = self._create_rdp_connection(self.auth) await self.connect_rdp() From 281c40cb917540021d855ba95513444922092446 Mon Sep 17 00:00:00 2001 From: azoxlpf <213314124+azoxlpf@users.noreply.github.com> Date: Wed, 18 Nov 2026 11:09:43 +0100 Subject: [PATCH 8/8] add --rdp-logon-timeout to raise the autologon confirmation delay --- nxc/protocols/rdp.py | 4 +++- nxc/protocols/rdp/proto_args.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nxc/protocols/rdp.py b/nxc/protocols/rdp.py index 8689427fdc..3a38771e2a 100644 --- a/nxc/protocols/rdp.py +++ b/nxc/protocols/rdp.py @@ -133,11 +133,13 @@ def _create_rdp_connection(self, credentials, supported_protocols=None): # X224 flags appropriate for the credential type, unless the server # has no CredSSP and only takes the protocol create_conn_obj() found. iosettings.supported_protocols = self.login_proto if supported_protocols is None else supported_protocols - return RDPConnection( + conn = RDPConnection( iosettings=iosettings, target=copy.deepcopy(self.target), credentials=copy.deepcopy(credentials), ) + conn.autologon_timeout = self.args.rdp_logon_timeout + return conn def create_conn_obj(self): self.target = RDPTarget(ip=self.host, domain="FAKE", port=self.port, timeout=self.args.rdp_timeout, unsafe_ssl=True, autologon=False) # old servers only offer ciphers OpenSSL rejects at its default security level; no autologon with the dummy credentials diff --git a/nxc/protocols/rdp/proto_args.py b/nxc/protocols/rdp/proto_args.py index d0d39ad39e..561fd49aa0 100644 --- a/nxc/protocols/rdp/proto_args.py +++ b/nxc/protocols/rdp/proto_args.py @@ -6,6 +6,7 @@ def proto_args(parser, parents): rdp_parser.add_argument("-H", "--hash", metavar="HASH", dest="hash", nargs="+", default=[], help="NTLM hash(es) or file(s) containing NTLM hashes") rdp_parser.add_argument("--port", type=int, default=3389, help="RDP port") rdp_parser.add_argument("--rdp-timeout", type=int, default=5, help="RDP timeout on socket connection") + rdp_parser.add_argument("--rdp-logon-timeout", type=int, default=15, help="Time to wait for the logon confirmation of a server without NLA/CredSSP, raise it if a first logon is slow") rdp_parser.add_argument("--nla-screenshot", action="store_true", help="Screenshot RDP login prompt if NLA is disabled") dgroup = rdp_parser.add_mutually_exclusive_group()