You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MSSQL] rid_brute crashes with AttributeError when SUSER_SNAME returns NULL (SQL login) #1533
When running --rid-brute against an MSSQL target using a SQL login (not a Windows/domain account), NetExec crashes with AttributeError: 'NoneType' object has no attribute 'split' at mssql.py:480.
This happens because SUSER_SNAME() returns NULL for RIDs that don't resolve to a name, and the code tries to call .split("\\") on that None value without a null check.
MSSQL 10.129.101.239 1433 DC [+] DC\SQLGuest:zDPBpaF4FywlqIv11vii
MSSQL 10.129.101.239 1433 DC 0: None
[ERROR] Exception while calling proto_flow() on target 10.129.101.239: 'NoneType' object has no attribute 'split'
File "nxc/protocols/mssql.py", line 480, in rid_brute
"username": username.split("\\")[1],
AttributeError: 'NoneType' object has no attribute 'split'
Expected behavior
RIDs that return NULL from SUSER_SNAME() should be silently skipped and the brute force should continue to the next RID.
After the fix, unresolved RIDs are skipped and displayed as None without crashing:
Activity
NeffIsBack commentedon Nov 17, 2026
Thanks for the bug report! Feel free to open up a PR if you have the time :)
JordaoMbambu commentedon Nov 17, 2026
Done! Already opened a PR with the fix :)
NeffIsBack commentedon Nov 18, 2026
Closing as duplicate, see #1534 (comment)
JordaoMbambu commentedon Nov 18, 2026
Thanks @NeffIsBack, I explained what happened on the PR (#1534)