From 779b2c2f127984c9cd4657e4ae297247e1736bbe Mon Sep 17 00:00:00 2001 From: Scott Sutherland Date: Thu, 10 Oct 2024 11:32:31 -0500 Subject: [PATCH] Update PowerHuntShares.psm1 Clean up styles. --- PowerHuntShares.psm1 | 82 +++++++++++++++++++++++++++----------------- 1 file changed, 51 insertions(+), 31 deletions(-) diff --git a/PowerHuntShares.psm1 b/PowerHuntShares.psm1 index f6a8e33..bec4aa1 100644 --- a/PowerHuntShares.psm1 +++ b/PowerHuntShares.psm1 @@ -4,7 +4,7 @@ #-------------------------------------- # Author: Scott Sutherland, 2024 NetSPI # License: 3-clause BSD -# Version: v1.160 +# Version: v1.161 # 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 { @@ -4731,11 +4731,13 @@ $NewHtmlReport = @" left: 0; float:left; line-height:1.15; + margin-top: 50px; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; z-index: 9998; --transition: width 0.3s; /* Smooth transition when expanding/collapsing */ - background: linear-gradient(to bottom, #07142A 80%, rgba(0, 0, 0, 1) 98%, black 100%); + background: linear-gradient(to bottom, #07142A 80%, rgba(0, 0, 0, 1) 98%, black 100%); + border-top: 0.25px dashed #345367; } .side-menu.collapsed div, @@ -4983,7 +4985,8 @@ $NewHtmlReport = @" .tabInput:checked+ .tabLabel+ .tabPanel{ - display:block + display:block; + margin-top: 50px; } .tabPanel.nojs{ @@ -5977,6 +5980,20 @@ input[type="checkbox"]:checked::before { + +
+
+ +
+ POWERHUNTSHARES +
+
$TargetDomain
+ + + +
+
+ @@ -5986,13 +6003,7 @@ input[type="checkbox"]:checked::before { -
- -
POWERHUNTSHARES

-
$TargetDomain
-
-
@@ -6024,7 +6035,8 @@ input[type="checkbox"]:checked::before {
-

Interesting Files

+
+

Interesting Files

@@ -6100,7 +6112,8 @@ input[type="checkbox"]:checked::before {
-

Summary Report

+
+

Summary Report

This page provides a summary of the share scan results, observations, risks, and prioritized recommendations.

@@ -6244,7 +6257,8 @@ $CardLastModifiedTimeLine
-

Computers

+
+

Computers

This section provides information for computers hosting shares configured with excessive privileges. $ComputerCount computers were found in the $TargetDomain Active Directory domain, $ComputerPingableCount responded to ping requests, $Computers445OpenCount had port 445 open, and $ComputerWithExcessive were found hosting shares configured with excessive privileges.

@@ -6362,7 +6376,8 @@ This section provides information for computers hosting shares configured with e
-

Identities

+
+

Identities

The section provides the affected identities.$IdentityCombinedListCount identities were discovered across shares in the $TargetDomain Active Directory domain. $IdentityOwnerListCount were owners and $IdentityReferenceListCount were assigned privileges.

@@ -6456,7 +6471,8 @@ Note: Within the context of this report, all read and write access the "Everyone
-

Insecure ACEs

+
+

Insecure ACEs

This section provides the ACE (access control entries) configured with excessive privileges found in the $TargetDomain Active Directory domain.

@@ -6995,7 +7011,8 @@ Below is a summary of the exposure associated with each of those groups.
-

Share Names

+
+

Share Names

This section provide a summary and list of the affected shares grouped by name. $AllSMBSharesCount shares were discovered across $ComputerPingableCount live computers in the $TargetDomain Active Directory domain. $ExcessiveSharesCount of those shares were found configured with excessive privileges across $ComputerWithExcessive computers.

@@ -7116,8 +7133,9 @@ This section provide a summary and list of the affected shares grouped by name.
-

Networks

-
+
+

Networks

+
This section provides an overview of the affected networks. $SubnetsCount networks/subnets were found associated with computers that host shares that are configured with excessive privileges.

@@ -7160,7 +7178,8 @@ This section lists the most common share owners.
-

Folder Groups

+
+

Folder Groups

Folder groups are SMB shares that contain the exact same file listing. Each folder group has been hashed so they can be quickly correlated. In some cases, shares with the exact same file listing may be related to a single application or process. This information can help identify the root cause associated with the excessive privileges and expedite remediation.

@@ -7229,7 +7248,8 @@ Folder groups are SMB shares that contain the exact same file listing. Each fold
-

Extracted Secrets

+
+

Extracted Secrets

This section includes a list of the credentials that were recovered during data collection. $SecretsRecoveredCount credentials were recovered from $SecretsRecoveredFileCount of the discovered $InterestingFilesAllObjectsSecretCount secrets files.

@@ -7286,7 +7306,8 @@ This section includes a list of the credentials that were recovered during data
-

ShareGraph

+
+

ShareGraph

@@ -9698,7 +9719,8 @@ document.querySelector('#nodemenu a:nth-child(2)').addEventListener('click', fun
-

Exploit

+
+

Exploit

This section provides some tips for exploiting share access.

@@ -9760,7 +9782,8 @@ This section provides some tips for exploiting share access.
-

Detect

+
+

Detect

This section provides some tips for detecting potentially malicious share scanning events.

@@ -9825,7 +9848,8 @@ Guest access to the system should also be revoked and ensure that adequate acces
-

Remediate

+
+

Remediate

This section provides some tips for prioritizing the remediation of shares configured with excessive privileges.

@@ -9884,13 +9908,14 @@ This section provides some tips for prioritizing the remediation of shares confi
-
-

Scan Information

+
+
+

Scan Information

The PowerHuntShares audit script was run against the $TargetDomain Active Directory domain to collect SMB Share data, generate this HTML summary report, and generate the associated csv files that detail potentially excessive share configurations. Below is a the scan summary and an overview of how to use this report. @@ -11820,11 +11845,6 @@ function updateLabelColors(divId, objectId) { - -
- -
-
"@