Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Add STATUS_NO_SUCH_FILE to success status #548

Merged
merged 1 commit into from
Mar 6, 2022

Conversation

qtc-de
Copy link
Contributor

@qtc-de qtc-de commented Mar 3, 2022

When starting impackets smbserver.py and running cme on it, cme does not identify valid credentials correctly:

$ impacket-smbserver share /tmp/share  -username example -password example -smb2support
...

$ crackmapexec smb 127.0.0.1 -u example -p example -d .
...
SMB         127.0.0.1       445    vzXuADiH         [-] .\example:example STATUS_NO_SUCH_FILE

Okay... I see... A listing does not outline the point here. Here is a screenshot where you can find the red marker, which indicates wrong credentials:

image

This PR adds STATUS_NO_SUCH_FILE to the smb errors that still indicate a valid authentication:

image

When the remote server returns a STATUS_NO_SUCH_FILE message, cme
interprets the login credentials as wrong. However, impackets
smbserver.py proves that this can be wrong.
@mpgn
Copy link
Contributor

mpgn commented Mar 6, 2022

unusual but valid ^^ :)

@mpgn mpgn merged commit 85a1dba into byt3bl33d3r:master Mar 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants