From d82fbad6b92dfd445ea0fb4bbc445afcb8c309d8 Mon Sep 17 00:00:00 2001 From: Scott Sutherland Date: Fri, 9 Aug 2024 14:17:50 -0500 Subject: [PATCH] Update PowerHuntShares.psm1 Updated left menu style. --- PowerHuntShares.psm1 | 198 ++++++++++++++++++++++++++++++------------- 1 file changed, 137 insertions(+), 61 deletions(-) diff --git a/PowerHuntShares.psm1 b/PowerHuntShares.psm1 index b8be899..25ab44a 100644 --- a/PowerHuntShares.psm1 +++ b/PowerHuntShares.psm1 @@ -3732,6 +3732,7 @@ $NewHtmlReport = @" + Report - +
@@ -5209,7 +5210,7 @@ input[type="checkbox"]:checked::before {
@@ -5268,7 +5269,7 @@ input[type="checkbox"]:checked::before {
- ACEs + ACEs
@@ -5327,7 +5328,7 @@ input[type="checkbox"]:checked::before {
@@ -5362,7 +5363,7 @@ input[type="checkbox"]:checked::before { In total, $RiskLevelCountCritical critical, $RiskLevelCountHigh high, $RiskLevelCountMedium medium, and $RiskLevelCountLow low risk ACE configurations were discovered across shares in the $TargetDomain Active Directory domain. The affected shares were found hosting $InterestingFilesAllObjectsSecretCount files that may contain passwords and $InterestingFilesAllObjectsSensitiveCount files that may contain sensitive data. Overall, $InterestingFilesAllFilesCount interesting files were found that could potentially lead to unauthorized data access or remote code execution. Click the chart titles below to explore the details.

- +
Share ACL Count by Risk Level
@@ -5378,7 +5379,7 @@ input[type="checkbox"]:checked::before {
- +
Interesting Files Count
@@ -6892,18 +6893,17 @@ Invoke-HuntSMBShares -Threads 20 -RunSpaceTimeOut 10 -OutputDirectory c:\folder\ // side menu collapse function // -------------------------- - function toggleMenu() { + function toggleMenu() { const menu = document.getElementById('sideMenu'); const icon = document.querySelector('.menu-button .icon'); menu.classList.toggle('collapsed'); - if (menu.classList.contains('collapsed')) { - icon.textContent = '☰'; // Collapsed state icon (hamburger menu) - } else { - icon.textContent = '☰'; // Expanded state icon (hamburger menu) - } + if (menu.classList.contains('collapsed')) { + icon.innerHTML = ''; + } else { + icon.innerHTML = ''; + } } - // -------------------------- // ACE Page: Type chart // -------------------------- @@ -7831,6 +7831,82 @@ function extractAndDownloadCSV(tableId, columnIndex) { document.body.removeChild(link); } +function updateLabelColors(divId, objectId) { + // Get the div element by its ID + var divElement = document.getElementById(divId); + + // Check if the div element exists + if (divElement) { + // Get all label elements that are children of the div + var labels = divElement.getElementsByTagName('label'); + + // Loop through all label elements + for (var i = 0; i < labels.length; i++) { + var label = labels[i]; + + // Check if the ID does not start with "noactionmenu" + if (!label.id.startsWith("noactionmenu")) { + // Reset the styles for labels that do not start with "noactionmenu" + label.style.fontWeight = ''; + label.style.color = ''; + label.style.backgroundColor = ''; + label.style.transition = ''; + label.style.textDecoration = ''; + label.style.paddingLeft = ''; + label.style.borderRadius = ''; + label.style.paddingTop = ''; + label.style.paddingBottom = ''; + label.style.marginRight = ''; + label.style.marginLeft = ''; + } + } + } else { + console.error("Div with id '" + divId + "' not found."); + } + + // Check if the div element exists + if (divElement) { + // Get all label elements that are children of the div + var labels = divElement.getElementsByTagName('label'); + + // Loop through all label elements and clear their classes and inline styles, then reapply + for (var i = 0; i < labels.length; i++) { + // Save the class name and inline styles + var className = labels[i].className; + var style = labels[i].style.cssText; + + // Remove all classes and inline styles + labels[i].className = ''; + labels[i].style.cssText = ''; + + // Reapply the saved class name and inline styles + labels[i].className = className; + labels[i].style.cssText = style; + } + } else { + console.error("Div with id '" + divId + "' not found."); + } + + // Get the element by its object ID and set its background color to #25648C + var objectElement = document.getElementById(objectId); + + if (objectElement) { + // Apply the desired styles + objectElement.style.fontWeight = 'normal'; + objectElement.style.color = 'white'; + objectElement.style.backgroundColor = '#17405A'; + objectElement.style.transition = 'background-color 0.9s ease, color 0.3s ease'; + objectElement.style.textDecoration = 'none'; + objectElement.style.paddingLeft = '15px'; + objectElement.style.borderRadius = '5px'; + objectElement.style.paddingTop = '5px'; + objectElement.style.paddingBottom = '5px'; + objectElement.style.marginRight = '5px'; + objectElement.style.marginLeft = '5px'; + } else { + console.error("Element with id '" + objectId + "' not found."); + } +}