mirror of
https://github.com/NetSPI/PowerHuntShares.git
synced 2025-05-05 03:38:42 +02:00
Update PowerHuntShares.psm1
Added netlogon and sysvol to the excessive privileges exclusion list.
This commit is contained in:
parent
87df2f1c4c
commit
bffa1363b5
@ -4,7 +4,7 @@
|
|||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
# Author: Scott Sutherland, 2022 NetSPI
|
# Author: Scott Sutherland, 2022 NetSPI
|
||||||
# License: 3-clause BSD
|
# License: 3-clause BSD
|
||||||
# Version: v1.32
|
# Version: v1.33
|
||||||
# References: This script includes custom code and code taken and modified from the open source projects PowerView, Invoke-Ping, and Invoke-Parrell.
|
# References: This script includes custom code and code taken and modified from the open source projects PowerView, Invoke-Ping, and Invoke-Parrell.
|
||||||
function Invoke-HuntSMBShares
|
function Invoke-HuntSMBShares
|
||||||
{
|
{
|
||||||
@ -634,7 +634,7 @@ function Invoke-HuntSMBShares
|
|||||||
|
|
||||||
if($line.ShareAccess -like "Yes"){
|
if($line.ShareAccess -like "Yes"){
|
||||||
|
|
||||||
if(($line.ShareName -notlike "print$") -and ($line.ShareName -notlike "prnproc$") -and ($line.ShareName -notlike "*printer*"))
|
if(($line.ShareName -notlike "print$") -and ($line.ShareName -notlike "prnproc$") -and ($line.ShareName -notlike "*printer*") -and ($line.ShareName -notlike "sysvol") -and ($line.ShareName -notlike "netlogon"))
|
||||||
{
|
{
|
||||||
$line
|
$line
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user