Network Share Permissions enumeration?

(imported topic written by BD12)

Is it possible to enumerate permissions of network shares with the current inspectors? e.g. to map the SID’s returned from something like the following to sAMAccountNames and look closer at the exact permissions that user has?

(name of it & " - " & (if path of it != “” then path of it else “<N/A>”) & " - " & (security descriptor of it as string) ) of (network shares) whose (name of it != “IPC$”)

What about file system permissions, does anyone have any examples of this? It looks like it could be complicated to enumerate?

Thanks.