Pennyw0rth / NetExec

The Network Execution Tool
https://netexec.wiki/
BSD 2-Clause "Simplified" License
3.27k stars 358 forks source link

Add file write check on smb #404

Closed tiyeuse closed 1 month ago

tiyeuse commented 2 months ago

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.

mpgn commented 2 months ago

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

tiyeuse commented 2 months ago

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:

NeffIsBack commented 1 month ago

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?

mpgn commented 1 month ago

File OR Directory = WRITE

NeffIsBack commented 1 month ago

sounds good