From 9cec1b2c5edc877f4dba6b885d2b07240ddc2c0a Mon Sep 17 00:00:00 2001 From: Scott Sutherland Date: Fri, 20 Sep 2024 08:46:44 -0500 Subject: [PATCH] Update Analyze-HuntSMBShares.ps1 Small graph updates. --- Scripts/Analyze-HuntSMBShares.ps1 | 160 ++++++++++++++++++++++++++---- 1 file changed, 139 insertions(+), 21 deletions(-) diff --git a/Scripts/Analyze-HuntSMBShares.ps1 b/Scripts/Analyze-HuntSMBShares.ps1 index 4580a57..e7abd02 100644 --- a/Scripts/Analyze-HuntSMBShares.ps1 +++ b/Scripts/Analyze-HuntSMBShares.ps1 @@ -5,7 +5,7 @@ #-------------------------------------- # Author: Scott Sutherland, 2024 NetSPI # License: 3-clause BSD -# Version: v1.95 +# Version: v1.96 # References: This script includes custom code and code taken and modified from the open source projects PowerView, Invoke-Ping, and Invoke-Parrell. function Analyze-HuntSMBShares { @@ -1764,9 +1764,12 @@ function Analyze-HuntSMBShares # Get interesting files count (same as share names) $TargetIdentityInterestingFiles = "tbd" + # Set format for javascript + $TargetIdentityJs = $TargetIdentity.Replace('\', '\\') + $BuildIdentityTableRows = @" - $TargetIdentity + $TargetIdentity $TargetIdentityOwnerCount @@ -1879,7 +1882,7 @@ function Analyze-HuntSMBShares # Create Row $ComputerTableRow = @" - $TargetComputers + $TargetComputers $ComputersTopACLRiskScore $RiskLevelComputersResult $ComputerPageShareCountHTML $ComputerPageInterestingFilesOutsideHTML @@ -2618,7 +2621,7 @@ function Analyze-HuntSMBShares $FileGroupNameRiskLevelRow - + $FileGroupName @@ -3498,8 +3501,9 @@ function Analyze-HuntSMBShares
- $ShareDescriptionSample - Affected Assets
+ $ShareDescriptionSample + View in ShareGraph
+
Affected Assets
@@ -6468,7 +6472,7 @@ Folder groups are SMB shares that contain the exact same file listing. Each fold
-
Graph ToolBar
+
Graph ToolBar
Computers: $ComputerBar