From 135834183a1325ac1bc0c2a3293ee43062026aa9 Mon Sep 17 00:00:00 2001 From: Scott Sutherland Date: Fri, 20 Sep 2024 10:22:04 -0500 Subject: [PATCH] Update PowerHuntShares.psm1 Fixed bug. --- PowerHuntShares.psm1 | 166 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 147 insertions(+), 19 deletions(-) diff --git a/PowerHuntShares.psm1 b/PowerHuntShares.psm1 index bfff976..6823fd2 100644 --- a/PowerHuntShares.psm1 +++ b/PowerHuntShares.psm1 @@ -4,7 +4,7 @@ #-------------------------------------- # Author: Scott Sutherland, 2024 NetSPI # License: 3-clause BSD -# Version: v1.124 +# Version: v1.125 # 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 { @@ -2187,9 +2187,12 @@ function Invoke-HuntSMBShares # Get interesting files count (same as share names) $TargetIdentityInterestingFiles = "tbd" + # Set format for javascript + $TargetIdentityJs = $TargetIdentity.Replace('\', '\\') + $BuildIdentityTableRows = @" - $TargetIdentity + $TargetIdentity $TargetIdentityOwnerCount @@ -2302,12 +2305,12 @@ function Invoke-HuntSMBShares # Create Row $ComputerTableRow = @" - $TargetComputers + $TargetComputers $ComputersTopACLRiskScore $RiskLevelComputersResult $ComputerPageShareCountHTML $ComputerPageInterestingFilesOutsideHTML -"@ +"@ # Add row to rows $ComputerTableRows = $ComputerTableRows + $ComputerTableRow @@ -2980,7 +2983,7 @@ function Invoke-HuntSMBShares $FileGroupNameRiskLevelRow - + $FileGroupName @@ -3918,7 +3921,8 @@ function Invoke-HuntSMBShares
$ShareDescriptionSample - Affected Assets
+ View in ShareGraph
+
Affected Assets
@@ -6889,7 +6893,7 @@ Folder groups are SMB shares that contain the exact same file listing. Each fold
-
Graph ToolBar
+
Graph ToolBar
Computers: $ComputerBar