mirror of
https://github.com/NetSPI/PowerHuntShares.git
synced 2025-05-05 03:38:42 +02:00
Update PowerHuntShares.psm1
Added share name drill down to folder group page.
This commit is contained in:
parent
f8301b2588
commit
866b51da28
@ -4,7 +4,7 @@
|
|||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
# Author: Scott Sutherland, 2024 NetSPI
|
# Author: Scott Sutherland, 2024 NetSPI
|
||||||
# License: 3-clause BSD
|
# License: 3-clause BSD
|
||||||
# Version: v1.48
|
# Version: v1.49
|
||||||
# References: This script includes custom code and code taken and modified from the open source projects PowerView, Invoke-Ping, and Invoke-Parrell.
|
# 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
|
function Invoke-HuntSMBShares
|
||||||
{
|
{
|
||||||
@ -1556,7 +1556,7 @@ function Invoke-HuntSMBShares
|
|||||||
$SourceHost = (hostname)
|
$SourceHost = (hostname)
|
||||||
|
|
||||||
# Get share list string list
|
# Get share list string list
|
||||||
$CommonShareFileGroupTopString = $CommonShareFileGroupTop5 |
|
$CommonShareFileGroupTopString = $CommonShareFileGroupTop5 |
|
||||||
foreach {
|
foreach {
|
||||||
$FileGroupName = $_.name
|
$FileGroupName = $_.name
|
||||||
$ThisFileBars = Get-GroupFileBar -DataTable $ExcessiveSharePrivs -Name $FileGroupName -AllComputerCount $ComputerCount -AllShareCount $AllSMBSharesCount -AllAclCount $ShareACLsCount
|
$ThisFileBars = Get-GroupFileBar -DataTable $ExcessiveSharePrivs -Name $FileGroupName -AllComputerCount $ComputerCount -AllShareCount $AllSMBSharesCount -AllAclCount $ShareACLsCount
|
||||||
@ -1567,10 +1567,16 @@ function Invoke-HuntSMBShares
|
|||||||
$ThisFileList = $ThisFileListPrep -replace "`n", "<br>"
|
$ThisFileList = $ThisFileListPrep -replace "`n", "<br>"
|
||||||
$ThisFileCount = $ThisFileBars.FileCount
|
$ThisFileCount = $ThisFileBars.FileCount
|
||||||
$ThisFileShareCount = $ThisFileBars.Sharecount
|
$ThisFileShareCount = $ThisFileBars.Sharecount
|
||||||
|
$ThisFileShareNameList = $ExcessiveSharePrivs | where FileListGroup -eq $FileGroupName | select ShareName -unique -expandproperty sharename | foreach { "$_ <br>"}
|
||||||
$ThisRow = @"
|
$ThisRow = @"
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
$ThisFileShareCount
|
<button class="collapsible">$ThisFileShareCount</button>
|
||||||
|
<div class="content">
|
||||||
|
<div class="filelist" >
|
||||||
|
$ThisFileShareNameList
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
$FileGroupName
|
$FileGroupName
|
||||||
|
Loading…
x
Reference in New Issue
Block a user