mirror of
https://github.com/NetSPI/PowerHuntShares.git
synced 2025-05-05 03:38:42 +02:00
Update PowerHuntShares.psm1
Made timeline context and share description collapsible on top share names page.
This commit is contained in:
parent
76946cac82
commit
8cb937bad7
@ -4,7 +4,7 @@
|
|||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
# Author: Scott Sutherland, 2024 NetSPI
|
# Author: Scott Sutherland, 2024 NetSPI
|
||||||
# License: 3-clause BSD
|
# License: 3-clause BSD
|
||||||
# Version: v1.44
|
# Version: v1.45
|
||||||
# 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
|
||||||
{
|
{
|
||||||
@ -1616,6 +1616,9 @@ function Invoke-HuntSMBShares
|
|||||||
$ShareBar = $ShareNameBars.ShareBar
|
$ShareBar = $ShareNameBars.ShareBar
|
||||||
$AclBar = $ShareNameBars.AclBar
|
$AclBar = $ShareNameBars.AclBar
|
||||||
|
|
||||||
|
# Share Description
|
||||||
|
$ShareDescriptionSample = $ExcessiveSharePrivs | where sharename -EQ "$ShareName" | where ShareDescription -NE "" | select ShareDescription -first 1 -expandproperty ShareDescription | foreach {"Sample Description:<br> $_"}
|
||||||
|
|
||||||
# First created
|
# First created
|
||||||
$ShareFirstCreated = $ExcessiveSharePrivs | where sharename -EQ "$ShareName" | select creationdate | foreach{[datetime]$_.creationdate } | Sort-Object | select -First 1 | foreach {$_.tostring("MM.dd.yyyy HH:mm:ss")}
|
$ShareFirstCreated = $ExcessiveSharePrivs | where sharename -EQ "$ShareName" | select creationdate | foreach{[datetime]$_.creationdate } | Sort-Object | select -First 1 | foreach {$_.tostring("MM.dd.yyyy HH:mm:ss")}
|
||||||
|
|
||||||
@ -1665,16 +1668,19 @@ function Invoke-HuntSMBShares
|
|||||||
<td>
|
<td>
|
||||||
$ShareCount
|
$ShareCount
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td style="vertical-align: top;">
|
||||||
$ShareName<br>
|
<button class="collapsible">$ShareName</button>
|
||||||
<span style="font-size: 10px;">
|
<div class="content">
|
||||||
First Created: $ShareFirstCreated<br>
|
<div class="filelistparent" style="font-size: 10px;">
|
||||||
Last Created: $ShareLastCreated<br>
|
First Created: $ShareFirstCreated<br>
|
||||||
Last Modified: $ShareLastModified<br>
|
Last Created: $ShareLastCreated<br>
|
||||||
</span>
|
Last Modified: $ShareLastModified<br><br>
|
||||||
|
$ShareDescriptionSample
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<button class="collapsible"><span style="color:#CE112D;"></span>$ShareFolderGroupCount</button>
|
<button class="collapsible">$ShareFolderGroupCount</button>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="filelistparent" >
|
<div class="filelistparent" >
|
||||||
$ShareFolderGroupList
|
$ShareFolderGroupList
|
||||||
@ -1682,9 +1688,9 @@ function Invoke-HuntSMBShares
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<button class="collapsible"><span style="color:#CE112D;"></span>$ShareOwnerListCount</button>
|
<button class="collapsible">$ShareOwnerListCount</button>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="filelistparent" >
|
<div class="filelistparent">
|
||||||
$ShareOwnerList
|
$ShareOwnerList
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -3656,7 +3662,7 @@ This section contains a list of the most common SMB share names. In some cases,
|
|||||||
<tr>
|
<tr>
|
||||||
<th align="left">Share Count</th>
|
<th align="left">Share Count</th>
|
||||||
<th align="left">Share Name</th>
|
<th align="left">Share Name</th>
|
||||||
<th align="left">Unique Folder Group Count</th>
|
<th align="left">Unique Folder Groups</th>
|
||||||
<th align="left">Unique Owners</th>
|
<th align="left">Unique Owners</th>
|
||||||
<th align="left">Affected Computers</th>
|
<th align="left">Affected Computers</th>
|
||||||
<th align="left">Affected Shares</th>
|
<th align="left">Affected Shares</th>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user