diff --git a/PowerHuntShares.psm1 b/PowerHuntShares.psm1
index af113a2..4a3ed37 100644
--- a/PowerHuntShares.psm1
+++ b/PowerHuntShares.psm1
@@ -4,7 +4,7 @@
#--------------------------------------
# Author: Scott Sutherland, 2024 NetSPI
# License: 3-clause BSD
-# Version: v1.98
+# Version: v1.99
# 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
{
@@ -2006,10 +2006,110 @@ function Invoke-HuntSMBShares
$RiskLevelCountCritical = $ExcessiveSharePrivsFinal | where RiskLevel -eq 'Critical' | measure | select count -ExpandProperty count
# ----------------------------------------------------------------------
- # Create Computer Summary Information
+ # Create Computer Insight Summary Information
# ----------------------------------------------------------------------
- # TBD
+ # Reset global computer risk levels
+ $RiskLevelComputersCountCritical = 0
+ $RiskLevelComputersCountHigh = 0
+ $RiskLevelComputersCountMedium = 0
+ $RiskLevelComputersCountLow = 0
+
+ # Rest row data
+ $ComputerTableRows = ""
+ $ComputerTableRow = ""
+
+ # Get computer list
+ $ComputerPageComputerList = $ExcessiveSharePrivsFinal | select ComputerName -Unique
+
+ # Get computer count
+ $ComputersChartCount = $ComputerPageComputerList | measure | select count -ExpandProperty count # Unique folder group
+
+ # Process each computer & add data to final risk counts
+ $ComputerPageComputerList |
+ foreach {
+
+ # Set target share name
+ $TargetComputers = $_.ComputerName
+
+ # Grab the risk level for the highest risk acl for the share name
+ $ComputersTopACLRiskScore = $ExcessiveSharePrivsFinal | where ComputerName -eq $TargetComputers | select RiskScore | sort RiskScore -Descending | select -First 1 | select RiskScore -ExpandProperty RiskScore
+
+ # Check risk level - Highest wins
+ If($ComputersTopACLRiskScore -le 4 ) { $RiskLevelComputersResult = "Low"}
+ If($ComputersTopACLRiskScore -gt 4 -and $ComputersTopACLRiskScore -lt 11 ) { $RiskLevelComputersResult = "Medium"}
+ If($ComputersTopACLRiskScore -ge 11 -and $ComputersTopACLRiskScore -lt 20 ) { $RiskLevelComputersResult = "High"}
+ If($ComputersTopACLRiskScore -ge 20 ) { $RiskLevelComputersResult = "Critical"}
+
+ # Increment counts
+ if($RiskLevelComputersResult -eq "Low" ){$RiskLevelComputersCountLow = $RiskLevelComputersCountLow + 1}
+ if($RiskLevelComputersResult -eq "Medium" ){$RiskLevelComputersCountMedium = $RiskLevelComputersCountMedium + 1}
+ if($RiskLevelComputersResult -eq "High" ){$RiskLevelComputersCountHigh = $RiskLevelComputersCountHigh + 1}
+ if($RiskLevelComputersResult -eq "Critical"){$RiskLevelComputersCountCritical = $RiskLevelComputersCountCritical + 1}
+
+ # Get share count
+ $ComputerPageShares = $ExcessiveSharePrivsFinal | where ComputerName -eq $TargetComputers | select SharePath -Unique | ForEach-Object { $ASDF = $_.SharePath; "$ASDF
" } | out-string
+ $ComputerPageShareCount = $ExcessiveSharePrivsFinal | where ComputerName -eq $TargetComputers | select SharePath -Unique | measure | select count -ExpandProperty count
+ $ComputerPageShareCountHTML = @"
+
+
Computer Name is the name of the computer. |
+
+ Risk Level relfects the exposure of credentials and sensitive data. |
+
+ Share Count is the number of shares hosted on the same computer. |
+
+ Interesting Files are filenames that may be sensitive. |
+
+
---|
Share Name is the name of the computer. |
+
+ Risk Level relfects the exposure of credentials and sensitive data. |
+
+ Share Count is the number of unique shares with the same name. |
+
+ Interesting Files are filenames that may be sensitive. |
+
+
---|---|---|---|
1 | +1 | +1 | +1 | +
1 | +1 | +1 | +1 | +