From 0830a520f8e74c32d994eb6a0274c63e45108232 Mon Sep 17 00:00:00 2001 From: Scott Sutherland Date: Thu, 18 Jul 2024 08:53:32 -0500 Subject: [PATCH] Update PowerHuntShares.psm1 Add unique share name count to folder group summary page. --- PowerHuntShares.psm1 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/PowerHuntShares.psm1 b/PowerHuntShares.psm1 index 5fa0171..51746e4 100644 --- a/PowerHuntShares.psm1 +++ b/PowerHuntShares.psm1 @@ -4,7 +4,7 @@ #-------------------------------------- # Author: Scott Sutherland, 2024 NetSPI # License: 3-clause BSD -# Version: v1.71 +# Version: v1.72 # 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 { @@ -1579,15 +1579,19 @@ function Invoke-HuntSMBShares $ThisFileCount = $ThisFileBars.FileCount $ThisFileShareCount = $ThisFileBars.Sharecount $ThisFileShareNameList = $ExcessiveSharePrivs | where FileListGroup -eq $FileGroupName | select ShareName -unique -expandproperty sharename | foreach { "$_
"} + $ThisFileShareNameListUniqueCount = $ThisFileShareNameList | measure | select count -ExpandProperty count $ThisRow = @" - +
$ThisFileShareNameList
+ + + $ThisFileShareCount $FileGroupName @@ -5158,12 +5162,13 @@ Folder groups are SMB shares that contain the exact same file listing. Each file - + + - - + +
Affected SharesUnique Share Name CountAffected Share Count File Group File Count Affected ComputersAffected SharesAffected ACLsAffected SharesAffected ACLs