NetExec icon indicating copy to clipboard operation
NetExec copied to clipboard

Add file write check on smb

Open tiyeuse opened this issue 1 year ago • 5 comments

Currently NetExec only checks the "WRITE" permission on a SMB share through writing a folder. It is also necessary to verify this permission through a file write. This PR implements this additional check.

tiyeuse avatar Aug 24 '24 17:08 tiyeuse

I wonder if we still need the check on the folder if we have the file ?

mpgn avatar Aug 24 '24 18:08 mpgn

I think so since write file and create folder are two different permissions. Testing for each is important. If only one is allowed, nxc will only display "WRITE" without specifying if it's a file or a folder. In that case, two options (at least) are possible:

  • change the WRITE information in order to be more precise
  • do not change anything but the user has to try by himself in order to understand

tiyeuse avatar Aug 24 '24 18:08 tiyeuse

I would say we either check only for file creation (because imo that's what most often matters) or we combine the file&folder test and if both pass we add the "write" privilege to the output. Currently that looks a bit ugly and honestly i would be very confused: image

Thoughts?

NeffIsBack avatar Oct 03 '24 16:10 NeffIsBack

File OR Directory = WRITE

mpgn avatar Oct 03 '24 16:10 mpgn

sounds good

NeffIsBack avatar Oct 03 '24 17:10 NeffIsBack