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
impacket version: v0.11.0
Python version: Python 3.11.7
Target OS: Kali
Debug Output With Command String
┌──(kali㉿kali)-[~/craft2]
└─$ impacket-smbclient -debug CRAFT2/thecybergeek:[email protected]
Impacket v0.11.0 - Copyright 2023 Fortra
[+] Impacket Library Installation Path: /usr/lib/python3/dist-packages/impacket
Type help for list of commands
# shares
ADMIN$
C$
IPC$
WebApp
# use WebApp
# mkdir foo
[-] SMB SessionError: STATUS_ACCESS_DENIED({Access Denied} A process has requested access to an object but has not been granted those access rights.)
[+] Exception info
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/impacket/smbconnection.py", line 652, in createDirectory
return self._SMBConnection.mkdir(shareName, pathName)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/impacket/smb3.py", line 1789, in mkdir
fileId = self.create(treeId, pathName, GENERIC_ALL, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/impacket/smb3.py", line 1261, in create
if ans.isValidAnswer(STATUS_SUCCESS):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/impacket/smb3structs.py", line 458, in isValidAnswer
raise smb3.SessionError(self['Status'], self)
impacket.smb3.SessionError: SMB SessionError: STATUS_ACCESS_DENIED({Access Denied} A process has requested access to an object but has not been granted those access rights.)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/impacket/examples/smbclient.py", line 83, in onecmd
retVal = cmd.Cmd.onecmd(self,s)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/cmd.py", line 217, in onecmd
return func(arg)
^^^^^^^^^
File "/usr/lib/python3/dist-packages/impacket/examples/smbclient.py", line 485, in do_mkdir
self.smb.createDirectory(self.share,pathname)
File "/usr/lib/python3/dist-packages/impacket/smbconnection.py", line 654, in createDirectory
raise SessionError(e.get_error_code(), e.get_error_packet())
impacket.smbconnection.SessionError: SMB SessionError: STATUS_ACCESS_DENIED({Access Denied} A process has requested access to an object but has not been granted those access rights.)
# exit
┌──(kali㉿kali)-[~/craft2]
└─$ smbclient -U thecybergeek \\\\192.168.186.188\\WebApp
Password for [WORKGROUP\thecybergeek]:
Try "help" to get a list of possible commands.
smb: \> mkdir foo
smb: \> ls
. D 0 Sun Feb 18 09:45:46 2024
.. D 0 Sun Feb 18 09:45:46 2024
assets D 0 Tue Apr 5 18:16:03 2022
css D 0 Tue Apr 5 18:16:03 2022
foo D 0 Sun Feb 18 09:45:46 2024
index.php A 9768 Mon Jan 31 17:21:52 2022
js D 0 Tue Apr 5 18:16:03 2022
upload.php A 896 Mon Jan 31 16:23:02 2022
uploads D 0 Tue Apr 5 18:16:03 2022
10327807 blocks of size 4096. 1772866 blocks available
Additional context
There is more details available in the issue created in NetExec's repository Pennyw0rth/NetExec#182, since it was first reported there and later tracked down to Impacket.
The machine is Craft2 in Proving Grounds from Offsec (if somebody has a subscription there).
The text was updated successfully, but these errors were encountered:
s4n-cz
changed the title
smbclient fails to create folder, smbclient succeeds
impacket-smbclient fails to create folder, smbclient succeeds
Feb 18, 2024
Configuration
impacket version: v0.11.0
Python version: Python 3.11.7
Target OS: Kali
Debug Output With Command String
Additional context
There is more details available in the issue created in NetExec's repository Pennyw0rth/NetExec#182, since it was first reported there and later tracked down to Impacket.
The machine is Craft2 in Proving Grounds from Offsec (if somebody has a subscription there).
The text was updated successfully, but these errors were encountered: