diff --git a/PowerHuntShares.psm1 b/PowerHuntShares.psm1 index 4bc6f09..29fb6e7 100644 --- a/PowerHuntShares.psm1 +++ b/PowerHuntShares.psm1 @@ -4,7 +4,7 @@ #-------------------------------------- # Author: Scott Sutherland, 2024 NetSPI # License: 3-clause BSD -# Version: v1.136 +# Version: v1.138 # 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 { @@ -1773,17 +1773,17 @@ function Invoke-HuntSMBShares } | select | ForEach-Object { "'$_'" }) -join ", " $IFCategoryListCount = "[$IFCategoryList]" - # Outbout objects to file + # Export objects to file $InterestingFilesAllObjects | Export-Csv -NoTypeInformation "$OutputDirectory\$TargetDomain-Shares-Interesting-Files.csv" # Get secrets & sensitive counts for dashboard - $InterestingFilesAllObjectsSecretCount = $InterestingFilesAllObjects | where category -eq 'secret' | measure | select count -ExpandProperty count - $InterestingFilesAllObjectsSensitiveCount = $InterestingFilesAllObjects | where category -eq 'sensitive' | measure | select count -ExpandProperty count + $InterestingFilesAllObjectsSecretCount = $InterestingFilesAllObjects | where category -eq 'secret' | select UncPath -Unique | measure | select count -ExpandProperty count + $InterestingFilesAllObjectsSensitiveCount = $InterestingFilesAllObjects | where category -eq 'sensitive' | select UncPath -Unique | measure | select count -ExpandProperty count # Get order list of interesting file names by count $InterestingFilesAllFilesCount = $InterestingFilesAllObjects | measure | select count -ExpandProperty count $InterestingFilesAllFilesCountU = $InterestingFilesAllObjects | select filename -Unique | measure | select count -ExpandProperty count - $InterestingFilesAllFilesGrouped = $InterestingFilesAllObjects | group filename | select count,name | sort count -Descending + $InterestingFilesAllFilesGrouped = $InterestingFilesAllObjects | group filename | select count,name | sort count -Descending # Generate a row for each one # Headers are Instance Count, FileName, Type, File Paths,Affected Computers, Affected Shares @@ -5273,7 +5273,7 @@ $NewHtmlReport = @" } .percentagetext { - text-align: center; + text-align: left; font-size: 2.25em; font-weight: 700; font-family:"Open Sans", sans-serif; @@ -5936,7 +5936,7 @@ input[type="checkbox"]:checked::before { - + @@ -5961,35 +5961,37 @@ input[type="checkbox"]:checked::before { This section provides a list of files that may contain passwords or sensitive data, or may be abused for remote code execution. - +
-
-
- Interesting Files Found -
-

- - $InterestingFilesAllFilesCount  - -
-
- ($InterestingFilesAllFilesCountU unique file names) -
-
+ +
+
+
+ Interesting Files Found +
+
+ + $InterestingFilesAllFilesCount  + +
+
+ ($InterestingFilesAllFilesCountU unique file names) +
+
+
+
+ +
+
+
+
+
+
+
+
- -
- -
-
-
-
-
- - - -
+