aboutsummaryrefslogtreecommitdiff
path: root/Recon
diff options
context:
space:
mode:
Diffstat (limited to 'Recon')
-rwxr-xr-xRecon/PowerView.ps110
1 files changed, 6 insertions, 4 deletions
diff --git a/Recon/PowerView.ps1 b/Recon/PowerView.ps1
index 74be1b3..83c1ae2 100755
--- a/Recon/PowerView.ps1
+++ b/Recon/PowerView.ps1
@@ -6568,6 +6568,7 @@ Set the owner of 'dfm' in the current domain to 'harmj0y' using the alternate cr
try {
Write-Verbose "[Set-DomainObjectOwner] Attempting to set the owner for '$Identity' to '$OwnerIdentity'"
$Entry = $RawObject.GetDirectoryEntry()
+ $Entry.PsBase.Options.SecurityMasks = 'Owner'
$Entry.PsBase.ObjectSecurity.SetOwner($OwnerIdentityReference)
$Entry.PsBase.CommitChanges()
}
@@ -7182,6 +7183,7 @@ https://social.technet.microsoft.com/Forums/windowsserver/en-US/df3bfd33-c070-4a
ForEach ($ACE in $ACEs) {
Write-Verbose "[Add-DomainObjectAcl] Granting principal $($PrincipalObject.distinguishedname) rights GUID '$($ACE.ObjectType)' on $($TargetObject.Properties.distinguishedname)"
$TargetEntry = $TargetObject.GetDirectoryEntry()
+ $TargetEntry.PsBase.Options.SecurityMasks = 'Dacl'
$TargetEntry.PsBase.ObjectSecurity.AddAccessRule($ACE)
$TargetEntry.PsBase.CommitChanges()
}
@@ -9880,7 +9882,7 @@ function Get-DomainDFSShare {
.SYNOPSIS
Returns a list of all fault-tolerant distributed file systems
-for the current (or specified) domain.
+for the current (or specified) domains.
Author: Ben Campbell (@meatballs__)
License: BSD 3-Clause
@@ -9895,7 +9897,7 @@ The server data is parsed appropriately and returned.
.PARAMETER Domain
-Specifies the domain to use for the query, defaults to the current domain.
+Specifies the domains to use for the query, defaults to the current domain.
.PARAMETER SearchBase
@@ -10178,7 +10180,7 @@ A custom PSObject describing the distributed file systems.
function Get-DomainDFSShareV1 {
[CmdletBinding()]
Param(
- [String[]]
+ [String]
$Domain,
[String]
@@ -10257,7 +10259,7 @@ A custom PSObject describing the distributed file systems.
function Get-DomainDFSShareV2 {
[CmdletBinding()]
Param(
- [String[]]
+ [String]
$Domain,
[String]