Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Emoji in filename breaks get command in smbclient-ng, (root cause in impacket) #94

Open
0xSegmented opened this issue Jul 31, 2024 · 3 comments
Assignees
Labels
bug Something isn't working waiting-for-fix

Comments

@0xSegmented
Copy link

When using smbclientng, and there is a file that contains a emoji in it's filename, for example: 'Fixed issue 🎄 .msg', smbclientng results in being stuck. It is not possible to skip the file either, the entire smbclientng program hangs.

The 'get' command is ran on *.msg:

get *.msg
[..]
[error] [!] SMB Error: SMB SessionError: STATUS_OBJECT_NAME_NOT_FOUND(The object name is not found.)                                              
[1;92m⏺[0m[[1;94m\\10.0.0.1\test\docu\[0m]>                                                                                            
'19931232 Fixed issue 🎄 .msg' ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0% • 0.0/123.1 kB • ? • -:--:--
[1;92m⏺[0m[[1;94m\\10.0.0.1\test\docu\[0m]>                                                                                            
'19931232 Fixed issue 🎄 .msg' ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0% • 0.0/123.1 kB • ? • -:--:--
[1;92m⏺[0m[[1;94m\\10.0.0.1\test\docu\[0m]>

Pressing ctrl + c does not seem to kill it too.

@0xSegmented 0xSegmented changed the title Emoji in filename breaks SMBCIENT-NG [bug] Emoji in filename breaks SMBCIENT-NG Jul 31, 2024
@0xSegmented
Copy link
Author

Checked if the impacket dependency is the problem. Seems like impacket filters the emoji titles out? Couldn't find it using smbclient from impacket.

@p0dalirius p0dalirius self-assigned this Aug 1, 2024
@p0dalirius p0dalirius added the bug Something isn't working label Aug 1, 2024
@p0dalirius
Copy link
Owner

That is weird, I did not know that.

I will look into it

@p0dalirius
Copy link
Owner

Hi,

So I reproduced your environment and the problem comes from impacket:

image

It also crashes from the orginal smbclient.py:

image

So the handling of encoding seems to be broken in the get file of impacket..

Best regards

@p0dalirius p0dalirius changed the title [bug] Emoji in filename breaks SMBCIENT-NG [bug] Emoji in filename breaks get command in smbclient-ng, (root cause in impacket) Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting-for-fix
Projects
None yet
Development

No branches or pull requests

2 participants