ShawnDEvans / smbmap

SMBMap is a handy SMB enumeration tool
GNU General Public License v3.0
1.76k stars 343 forks source link

Use SMBMAP to create folder #68

Open f8bar opened 3 years ago

f8bar commented 3 years ago

Hi, I tried to use the utility to create a folder on Samba but wasn't able to make it work. Does somebody have an example for that usecase. Thanks

Tried the following but didn't get it to work python3 smbmap.py -H ipaddrss -d xxx -u xxx -p xxx -x 'mkdir "newfolder"'

ShawnDEvans commented 3 years ago

Hey! Creating a folder isn't actually a feature of SMBMap, but it probably should be. The command you executed above likely created a directory in C:\Windows\System\ (instead of on the share drive you intended to create it on). If you happen to have admin rights on a system you can probably doing something like:

$ python3 smbmap.py -H ipaddrss -d xxx -u xxx -p xxx -x 'mkdir \ipaddress\share\newfolder'

I'm not 100% sure that will work, but I believe it will as long as you have permissions to do so. I'll look into adding an "--mkdir" command to SMBMap. Thanks for the feedback!!

f8bar commented 3 years ago

Hi,

tried it like you explained. Unfortunately it doesn't work. I'm asking for this since your tool supports file upload with absolute source paths. smbclient doesn't . currently I'm using smbclient with the same credentials to create the folders and yours to do the upload. However would be handy to use a single tool for it.

Thanks bud. Next beer goes on me. Best regards!