Skip to content

Instantly share code, notes, and snippets.

@nuryslyrt
Last active November 24, 2021 19:47
Show Gist options
  • Save nuryslyrt/b43698bdeb2873ec0e8a8be7a87e455d to your computer and use it in GitHub Desktop.
Save nuryslyrt/b43698bdeb2873ec0e8a8be7a87e455d to your computer and use it in GitHub Desktop.
Everyone Access Check in File System
$Shares = Get-ChildItem "C:\test123" -Recurse | Get-ACL | ?{$_.AccessToString -match "Everyone"} | %{($_.PSPath -split '::')[1]};
foreach($Share in $Shares) {
findstr /r "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*" $Share;
findstr /rs "pass" $Share;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment