Hello,
I’m working on a project to identify shared folders with access granted to ‘Everyone’ group in Windows environment.
I need to know if there is a similar concept in Linux systems please.
Any help with the relevance & action script is much appreciated.
Following is my relevance in Windows:
windows of operating system AND (exists network shares whose (exists entry whose (trustee of it as string = “Everyone” and Grant Type of it) of dacl of security descriptor of it))
And below is my action script:
action uses wow64 redirection {not x64 of operating system}
delete SmbShare.ps1
createfile until EOF
$ExclusionList = ‘ADMIN$’,‘IPC$’ -join ‘|’
$Shares = Get-SmbShare | Where-Object -Property Name -notmatch $ExclusionList | Where-Object -Property Path -notmatch ‘^\w:\$’
$Shares
foreach ($Share in $Shares) {{
$Everyone = Get-SmbShareAccess $Share.Name | Where-Object -Property AccountName -eq Everyone
if ($Everyone) {{
Revoke-SmbShareAccess $Share.Name -AccountName ‘Everyone’ -Force
}
}EOF
move __createfile SmbShare.ps1waithidden powershell.exe -ExecutionPolicy Bypass -File SmbShare.ps1