Skip to content

Prevent doing database stuff if we don't have a valid connection#1155

Merged
NeffIsBack merged 1 commit intomainfrom
neff-fix-relaying
Mar 14, 2026
Merged

Prevent doing database stuff if we don't have a valid connection#1155
NeffIsBack merged 1 commit intomainfrom
neff-fix-relaying

Conversation

@NeffIsBack
Copy link
Member

Description

With the changes introduced in #1133 we (rightfully) don't add users to the database if the auth is a guest or null auth. However, when relaying ntlmrelay marks this connection as guest auth while we still (potentially) are admin. This results in the step of "adding user to db" is skipped, but afterwards trying to add the admin relationship to a user that doesn't exist.

This PR solves this problem by deciding if the auth is legitimate (not guest/null auth for plaintext and not guest auth for hashes) and then doing all database/bloodhound stuff.

Type of change

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

  • 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

  1. Setup a relay where the connection has administrative privileges.
  2. Just run proxychains nxc smb -u user -p password -d domain

Screenshots (if appropriate):

Before:
image

After:
image

Checklist:

@NeffIsBack NeffIsBack added the bug-fix This Pull Request fixes a bug label Mar 14, 2026
@NeffIsBack NeffIsBack merged commit faea737 into main Mar 14, 2026
11 checks passed
@NeffIsBack NeffIsBack deleted the neff-fix-relaying branch March 14, 2026 15:33
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.

2 participants