guyrleech

Find writable folders

Sep 23rd, 2025
733
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PowerShell 0.45 KB | Cybersecurity | 0 0
  1. ## Get permissions for folders in current directory (add -recurse if desired) and see if any have write access for group names matching users or everyone
  2.  
  3. ls  -force |where attributes -match 'directory' -PipelineVariable dir|% { (get-acl $dir.FullName).Access|where { $_.AccessControlType -eq 'allow' -and $_.IdentityReference -match 'users|everyone' -and $_.FileSystemRights -match 'write|full' }|select @{n='Writable Directory';e={$dir.FullName}},*}|ft
Advertisement
Add Comment
Please, Sign In to add comment