Skip to content

fix: relay attack terminates prematurely and crashes on every attempt - #136

Open
chryzsh wants to merge 1 commit into
garrettfoster13:mainfrom
chryzsh:fix/relay-attack-completion-logic
Open

chryzsh wants to merge 1 commit into
garrettfoster13:mainfrom
chryzsh:fix/relay-attack-completion-logic

Conversation

@chryzsh

@chryzsh chryzsh commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

In attacks/relay.py SUCCESS was set on every outcome (success, 401, unexpected status, exception), causing the listener to hard-exit after the first attempt regardless of result.

Separately, _sendAuth always returned a None instead of the (response, errorCode) tuple impacket's relay framework expects, crashing with a TypeError on every relayed auth.

I wrote tests to verify the bug, and made all the tests pass.

Also, unrelated to the above, the to/timeout flag was dead in the main loop, so added the code that actually implements the timeout. Set the default timeout to 5 minutes / 300 seconds.

After I had done this, I wondered: was this relay code that implements TAKEOVER-5 just something you made pending the merge request to ntlmrelayx for supporting relaying to the adminservice api? Because i got started with looking at some bugs and then I realized maybe this is dead code you dont plan to have. Decided to submit this anyway since I did it mostly to learn more Python, so just do what you want with this PR.

@chryzsh
chryzsh force-pushed the fix/relay-attack-completion-logic branch from 4d747ce to a0e92fe Compare September 1, 2026 16:49
@chryzsh
chryzsh force-pushed the fix/relay-attack-completion-logic branch from a0e92fe to 17531e6 Compare September 1, 2026 16:49
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 this pull request may close these issues.

1 participant