diff --git a/Scripts/Analyze-HuntSMBShares.ps1 b/Scripts/Analyze-HuntSMBShares.ps1 index 6414cae..ee6d81d 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.93 +# Version: v1.94 # 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 { @@ -3885,7 +3885,7 @@ $NewHtmlReport = @" box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3); padding: 20px; overflow-y: auto; - z-index: 9999; + z-index: 9998; border-radius: 4px; } @@ -3921,7 +3921,7 @@ $NewHtmlReport = @" background-color: #f1f1f1; min-width: 120px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); - z-index: 1; + z-index: 9997; right: 0px; left: 0px; top: 32px; @@ -3983,7 +3983,7 @@ $NewHtmlReport = @" line-height:1.15; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; - z-index: 1; + 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%); } @@ -4524,8 +4524,8 @@ $NewHtmlReport = @" width: 130px; height: 130px; background: radial-gradient(white 60%, transparent 41%), - conic-gradient(#CE112D 0% $PercentComputerExPrivP, - #d9d7d7 $PercentComputerExPrivP 100%); + conic-gradient(#CE112D 0% 1.13%, + #d9d7d7 1.13% 100%); border-radius: 50%; text-align: center; margin-top: 5px; @@ -4537,8 +4537,8 @@ $NewHtmlReport = @" width: 130px; height: 130px; background: radial-gradient(white 60%, transparent 41%), - conic-gradient(#CE112D 0% $PercentSharesExPrivP, - #d9d7d7 $PercentSharesExPrivP 100%); + conic-gradient(#CE112D 0% 2.75%, + #d9d7d7 2.75% 100%); border-radius: 50%; text-align: center; margin-top: 5px; @@ -4550,8 +4550,8 @@ $NewHtmlReport = @" width: 130px; height: 130px; background: radial-gradient(white 60%, transparent 41%), - conic-gradient(#CE112D 0% $PercentAclExPrivP, - #d9d7d7 $PercentAclExPrivP 100%); + conic-gradient(#CE112D 0% 6.45%, + #d9d7d7 6.45% 100%); border-radius: 50%; text-align: center; margin-top: 5px; @@ -4563,8 +4563,8 @@ $NewHtmlReport = @" width: 130px; height: 130px; background: radial-gradient(white 60%, transparent 41%), - conic-gradient(#CE112D 0% $ExpPrivAccessLastP , - #d9d7d7 $ExpPrivAccessLastP 100%); + conic-gradient(#CE112D 0% 0.00% , + #d9d7d7 0.00% 100%); border-radius: 50%; text-align: center; margin-top: 5px; @@ -4576,8 +4576,8 @@ $NewHtmlReport = @" width: 130px; height: 130px; background: radial-gradient(white 60%, transparent 41%), - conic-gradient(#CE112D 0% $ExpPrivModLastP, - #d9d7d7 $ExpPrivModLastP 100%); + conic-gradient(#CE112D 0% , + #d9d7d7 100%); border-radius: 50%; text-align: center; margin-top: 5px; @@ -4875,7 +4875,7 @@ $NewHtmlReport = @" line-height:1.15; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; - z-index: 1; + z-index: 9999; } .sidenav a { @@ -4948,7 +4948,7 @@ $NewHtmlReport = @" } .TimelineChart{ display: grid; - --grid-template-columns: 1px repeat($ExcessivePrivsYearsCount, 204px) 1px; + --grid-template-columns: 1px repeat(, 204px) 1px; grid-template-rows: minmax(0px, 1fr); overflow-x: scroll; overflow-y: hidden; @@ -5172,14 +5172,14 @@ input[type="checkbox"] { } input[type="checkbox"]:checked { - background-color: #07142A; /* Change this to your desired color */ + background-color: #17405A; /* Change this to your desired color */ --border-color: #07142A; - border: 1px solid #07142A; + border: 1px solid #17405A; } input[type="checkbox"]:checked::before { content: '✔'; - color: #F56A00; + color: #f08c41; display: block; text-align: center; line-height: 20px; @@ -6449,120 +6449,253 @@ Folder groups are SMB shares that contain the exact same file listing. Each fold
- This provides an interactive graph that can be used to explore the computer, share, and other relationships. Experimental. + This is an experimental interactive graph for exploring share relationships.
-
-  Selected Node: None
+
Nodes: 0   - Edges: 0 + Edges: 0
+  Selected Node: None
- -
+ +
- -
- - - - - -
- - - - - -
- - - - - - - - - -
Blast Radius
-  0 -

- - -
-
- -
- - -
-
-
- - -
- -
+ +
+ +
+
Graph ToolBar
+ +
+ + +
+ + +
- - + + switch (activeTab) { + case 1: + tab1Content.style.display = "block"; + tab2Content.style.display = "none"; + tab3Content.style.display = "none"; + break; + case 2: + tab1Content.style.display = "none"; + tab2Content.style.display = "block"; + tab3Content.style.display = "none"; + break; + case 3: + tab1Content.style.display = "none"; + tab2Content.style.display = "none"; + tab3Content.style.display = "block"; + break; + default: + // If none are active, you can handle a default case if needed + tab1Content.style.display = "block"; + tab2Content.style.display = "none"; + tab3Content.style.display = "none"; + break; + } + + }, 500); // Delay to sync with height transition + + button.innerHTML = `` + + + ``; + } + } + + function showTab(tabNumber) { + + var tab1Button = document.getElementById("tab1Button"); + var tab1Content = document.getElementById("tab1Content"); + + var tab2Button = document.getElementById("tab2Button"); + var tab2Content = document.getElementById("tab2Content"); + + var tab3Button = document.getElementById("tab3Button"); + var tab3Button = document.getElementById("tab3Button"); + + if (tabNumber === 1) { + tab1Content.style.display = "block"; + tab1Button.classList.add("active"); + tab2Button.classList.remove("active"); + tab2Content.style.display = "none"; + tab3Button.classList.remove("active"); + tab3Content.style.display = "none"; + + tab1Button.style.border = ".5px solid #e3e4e6"; + tab2Button.style.border = "none"; + tab3Button.style.border = "none"; + + tab1Button.style.backgroundColor = "#d4d5d6"; + tab2Button.style.backgroundColor = "lightgray"; + tab3Button.style.backgroundColor = "lightgray"; + } + + if (tabNumber === 2) { + tab1Content.style.display = "none"; + tab1Button.classList.remove("active"); + tab2Content.style.display = "block"; + tab2Button.classList.add("active"); + tab3Button.classList.remove("active"); + tab3Content.style.display = "none"; + + tab1Button.style.border = "none"; + tab2Button.style.border = ".5px solid #e3e4e6"; + tab3Button.style.border = "none"; + + tab1Button.style.backgroundColor = "lightgray"; + tab2Button.style.backgroundColor = "#d4d5d6"; + tab3Button.style.backgroundColor = "lightgray"; + } + + if (tabNumber === 3) { + tab1Button.classList.remove("active"); + tab1Content.style.display = "none"; + tab2Button.classList.remove("active"); + tab2Content.style.display = "none"; + tab3Button.classList.add("active"); + tab3Content.style.display = "block"; + + tab1Button.style.border = "none"; + tab2Button.style.border = "none"; + tab3Button.style.border = ".5px solid #e3e4e6"; + + tab1Button.style.backgroundColor = "lightgray"; + tab2Button.style.backgroundColor = "lightgray"; + tab3Button.style.backgroundColor = "#d4d5d6"; + } + } + +
@@ -7100,7 +7233,7 @@ Folder groups are SMB shares that contain the exact same file listing. Each fold document.getElementById('layout-select').selectedIndex = 0; // Set Selected to "" - document.getElementById('selected-node').innerText = ''; + document.getElementById('selected-node').innerHTML = 'None'; } // ################################# @@ -8262,6 +8395,10 @@ document.querySelector('#nodemenu a:nth-child(2)').addEventListener('click', fun cy.edges().removeClass('faded'); // Remove 'faded' class from all edges cy.nodes().removeClass('invisible'); // Remove 'faded' class from all nodes cy.edges().removeClass('invisible'); // Remove 'faded' class from all edges + + // Set the 'Hide Unselected' checkbox to unchecked + document.getElementById('toggle-visibility').checked = false; + updateCounts(); } else { console.error('Cytoscape instance is not available.');