Use the modified account with runas /netonlyrunas /netonly /user:domain\test powershell

Invoke-AgentSmith


This function leverages New-MachineAccount to recursively create as many machine accounts as possible from a single unprivileged account through MachineAccountQuota. See the following blog post for details:

https://blog.netspi.com/machineaccountquota-transitive-quota

DNS Functions


By default, authenticated users have the 'Create all child objects' permission on the Active Directory-Integrated DNS (ADIDNS) zone. Most records that do not currently exist in an AD zone can be added/deleted.

Dynamic Updates Functions


Invoke-DNSUpdate


This function can be used to add/delete dynamic DNS records if the default setting of enabled secure dynamic updates is configured on a domain controller. A, AAAA, CNAME, MX, PTR, SRV, and TXT records are currently supported. Invoke-DNSUpdate is modeled after BIND`s nsupdate tool when using the '-g' or 'gsstsig' options.

Examples:

Add an A recordInvoke-DNSUpdate -DNSType A -DNSName www -DNSData 192.168.100.125

Delete an A recordInvoke-DNSUpdate -DNSType A -DNSName www.test.local

Add an SRV recordInvoke-DNSUpdate -DNSType SRV -DNSName _autodiscover._tcp.test.local -DNSData system.test.local -DNSPriority 100 -DNSWeight 80 -DNSPort 443

ADIDNS Functions


Disable-ADIDNSNode


This function can tombstone an ADIDNS node.

Example:

Tombstone a wildcard record.`Disable-ADIDNSNode -Node

Enable-ADIDNSNode


This function can turn a tombstoned node back into a valid record.

Example:

Enable a wildcard record.Enable-ADIDNSNode -Node *

Get-ADIDNSNodeAttribute


This function can return values populated in a DNS node attribute.

Example:

Get the value populated dnsRecord attribute of a node named test.Get-ADIDNSNodeAttribute -Node test -Attribute dnsRecord

Get-ADIDNSNodeOwner


This function can return the owner of an ADIDNS Node.

Example:

Get the owner of a node named test. Get-ADIDNSNodeOwner -Node test

Get-ADIDNSPermission


This function gets a DACL of an ADIDNS node or zone.

Examples:

Get the DACL for the default Active Directory-Integrated Zone from a domain attached system.Get-ADIDNSPermission

Get the DACL for a DNS node named test from a domain attached system.Get-ADIDNSPermission -Node test

Get-ADIDNSZone


This function can return ADIDNS zones.

Examples:

Get all ADIDNS zones.Get-ADIDNSZone

Grant-ADIDNSPermission


This function adds an ACE to a DNS node or zone DACL.

Example:

Add full access to a wildcard record for "Authenticated Users".
Add full access to a wildcard record for "Authenticated Users".Grant-ADIDNSPermission -Node * -Principal "authenticated users"

New-ADIDNSNode


This function adds a DNS node to an Active Directory-Integrated DNS (ADIDNS) Zone through an encrypted LDAP add request.

Example:

Add a wildcard record to a ADIDNS zone and tombstones the node.New-ADIDNSNode -Node * -Tombstone

New-DNSRecordArray


This function creates a valid byte array for the dnsRecord attribute.

Example:

Create a dnsRecord array for an A record pointing to 192.168.0.1.New-DNSRecordArray -Data 192.168.0.1

New-SOASerialNumberArray


This function gets the current SOA serial number for a DNS zone and increments it by the set amount.

Example:

Generate a byte array from the currect SOA serial number incremented by one.New-SOASerialNumberArray

Rename-ADIDNSNode


This function can rename a DNS node.

Example:

Renames a DNS node named test to test2.Rename-ADIDNSNode -Node test -NodeNew test2

Remove-ADIDNSNode


This function can remove a DNS node.

Example:

Removes a wildcard node.Remove-ADIDNSNode -Node *

Revoke-ADIDNSPermission


This function removes an ACE to a DNS node or zone DACL.

Example:

Remove the GenericAll ACE associated with the user1 account.Revoke-ADIDNSPermission -Node * -Principal user1 -Access GenericAll

Set-ADIDNSNodeAttribute


This function can append, populate, or overwrite values in a DNS node attribute.

Example:

Set the writable description attribute on a node named test.Set-ADIDNSNodeAttribute -Node test -Attribute description -Value "do not delete"

Set-ADIDNSNodeOwner


This function can set the owner of a DNS Node. Note that a token with SeRestorePrivilege is required.

Example:

Set the owner of a node named test to user1.Set-ADIDNSNodeOwner -Node test -Principal user1

Miscellaneous Functions


Get-KerberosAESKey


This function can generate Kerberos AES 256 and 128 keys from a known username and password. This can be used to test pass the hash in invoke-DNSUpdate.

Example:

Generate keys for a valid AD user named user@test.local.Get-KerberosAESKey -Salt TEST.LOCALuser