Skip to content

Reach legacy RDP servers by allowing weak TLS ciphers - #1460

Open
azoxlpf wants to merge 10 commits into
Pennyw0rth:mainfrom
azoxlpf:fix/rdp-standard-security-logon
Open

azoxlpf wants to merge 10 commits into
Pennyw0rth:mainfrom
azoxlpf:fix/rdp-standard-security-logon

Conversation

@azoxlpf

@azoxlpf azoxlpf commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR fixes RDP authentication against servers configured for Standard RDP Security only (#1457), which currently fail with SSL_NOT_ALLOWED_BY_SERVER on the credentials line: the fingerprinting loop never broke out on success, so the protocol the server had accepted was discarded and the login reused the SSL offer the server had already refused.

The negotiated protocol is now kept (bare RDP only as a last resort), and since nothing but CredSSP authenticates during the handshake, check_logon() waits for the Save Session Info PDU before reporting success, without it these servers would report Pwn3d! for every password. That wait gets its own --rdp-logon-timeout (default 30s), an interactive logon being far slower than the handshake.

Note that it also needs skelsec/aardwolf#53, which sets INFO_AUTOLOGON in the Client Info PDU, without it the server never acts on the password at all.

AI Assistance

If you have used AI in any form, please state the tool you used (e.g. Claude Code, Cursor, Amp) along with the extent that the work was AI-assisted.

Note that if you have used AI, you:

  • MUST test the changes against a live system
  • MUST include a screenshot of such a test (e.g. with a before and after screenshot when submitting a bug fix)
  • MUST fill out this PR template by hand, see the project's AI policy: AI_POLICY.md

Type of change

Insert an "x" inside the brackets for relevant items

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Deprecation of feature or functionality
  • This change requires a documentation update
  • This requires a third party update (such as Impacket, Dploot, lsassy, etc)
  • This PR was created with the assistance of AI (list what type of assistance, tool(s)/model(s) in the description)

Setup guide for the review

Test on the HTB “Touch” machine

Screenshots (if appropriate):

Before & After :

image

Checklist:

Insert an "x" inside the brackets for completed and relevant items (do not delete options)

  • I have ran Ruff against my changes (poetry: poetry run ruff check ., use --fix to automatically fix what it can)
  • I have added or updated the tests/e2e_commands.txt file if necessary (new modules or features are required to be added to the e2e tests)
  • If reliant on changes of third party dependencies, such as Impacket, dploot, lsassy, etc, I have linked the relevant PRs in those projects
  • I have linked relevant sources that describes the added technique (blog posts, documentation, etc)
  • I have performed a self-review of my own code (not an AI review)
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (PR here: https://github.com/Pennyw0rth/NetExec-Wiki)

@azoxlpf azoxlpf added the bug-fix This Pull Request fixes a bug label Oct 9, 2026
@NeffIsBack

Copy link
Copy Markdown
Member

Converting to Draft until the corresponding PR is merged and a new version is released

@NeffIsBack
NeffIsBack marked this pull request as draft October 16, 2026 06:17
@mpgn

mpgn commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

skelsec reworked aardwolf main: it now sets INFO_AUTOLOGON and waits for the logon result itself (AutologonError), so aardwolf#53 isn't needed anymore. I merged main into your branch and pushed 4 small commits to adapt to it:

  • cdb9fe6 drops check_logon() and --rdp-logon-timeout, aardwolf does that now
  • b502b3c sets autologon=False on the fingerprint target, otherwise the dummy user:pass autologons, times out and the host vanishes from the output
  • 432e6d2 passes the accepted protocol to _create_rdp_connection(), main resets supported_protocols to None after the loop so the fix was silently lost
  • d542930 gives logons without CredSSP --rdp-timeout + aardwolf's 15 s, so a wrong password prints Autologon failed: no logon confirmation within 15 seconds ... instead of ()

Keeping it in draft until aardwolf 0.2.17 is on PyPI, then I'll bump the lock files.

mpgn added 3 commits November 8, 2026 19:53
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.
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.
@mpgn
mpgn marked this pull request as ready for review November 8, 2026 18:53
@mpgn

mpgn commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

@azoxlpf could you recheck?

@azoxlpf

azoxlpf commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

Retest with aardwolf 0.2.17, same valid credentials each time: the first logon of the user took longer than aardwolf's 15 s confirmation delay, so the password was reported as failed, then it logged on fine once the session existed. I added --rdp-logon-timeout (default 15, so nothing changes by default) to set conn.autologon_timeout and raise that delay on slow hosts.

image image

LGTM

@mpgn

mpgn commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Retest with aardwolf 0.2.17, same valid credentials each time: the first logon of the user took longer than aardwolf's 15 s confirmation delay, so the password was reported as failed, then it logged on fine once the session existed. I added --rdp-logon-timeout (default 15, so nothing changes by default) to set conn.autologon_timeout and raise that delay on slow hosts.

image image

LGTM

Do you think we should set 30 sec default ?

@NeffIsBack

Copy link
Copy Markdown
Member

Why in the world does it take 20 seconds to log in? 👀

@mpgn

mpgn commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Why in the world does it take 20 seconds to log in? 👀

It shouldn't unless the box is very buzy (cpu ram etc) or vpn very slow

Let's keep it that way to 15s

@NeffIsBack

Copy link
Copy Markdown
Member

Was your machine so much under load? Just seems weird that a valid network connection would take 15 seconds to complete the handshake

@mpgn

mpgn commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Was your machine so much under load? Just seems weird that a valid network connection would take 15 seconds to complete the handshake

If he use public free htb box it's not a suprise 🤷‍♂️

@azoxlpf

azoxlpf commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

Yeah it's an HTB box, so it was probably under load ahah.

But to be clear, it's not the network handshake that takes 15 s: the RDP connection sequence itself completes in 1–2 s. Without NLA the password is only checked by the full interactive Windows logon, and the server confirms it (Save Session Info PDU) once the session is actually up. With an existing session I measured ~1.5 s, on a first logon on a busy box (profile creation, shell start) it went past 15 s. I couldn't reproduce it on demand after a reset, so it does depend on the load.

Agreed on keeping 15 s as the default. The option is just there so a valid password isn't reported as failed on a slow host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix This Pull Request fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants