PowerView

  • https://github.com/PowerShellMafia/PowerSploit/blob/master/Recon/PowerView.ps1

Command
Description

Export-PowerViewCSV

Append results to a CSV file

ConvertTo-SID

Convert a User or group name to its SID value

Get-DomainSPNTicket

Requests the Kerberos ticket for a specified Service Principal Name (SPN) account

Domain/LDAP Functions:

Get-Domain

Will return the AD object for the current (or specified) domain

Get-DomainController

Return a list of the Domain Controllers for the specified domain

Get-DomainUser

Will return all users or specific user objects in AD

Get-DomainComputer

Will return all computers or specific computer objects in AD

Get-DomainGroup

Will return all groups or specific group objects in AD

Get-DomainOU

Search for all or specific OU objects in AD

Find-InterestingDomainAcl

Finds object ACLs in the domain with modification rights set to non-built in objects

Get-DomainGroupMember

Will return the members of a specific domain group

Get-DomainFileServer

Returns a list of servers likely functioning as file servers

Get-DomainDFSShare

Returns a list of all distributed file systems for the current (or specified) domain

GPO Functions:

Get-DomainGPO

Will return all GPOs or specific GPO objects in AD

Get-DomainPolicy

Returns the default domain policy or the domain controller policy for the current domain

Computer Enumeration Functions:

Get-NetLocalGroup

Enumerates local groups on the local or a remote machine

Get-NetLocalGroupMember

Enumerates members of a specific local group

Get-NetShare

Returns open shares on the local (or a remote) machine

Get-NetSession

Will return session information for the local (or a remote) machine

Test-AdminAccess

Tests if the current user has administrative access to the local (or a remote) machine

Threaded 'Meta'-Functions:

Find-DomainUserLocation

Finds machines where specific users are logged in

Find-DomainShare

Finds reachable shares on domain machines

Find-InterestingDomainShareFile

Searches for files matching specific criteria on readable shares in the domain

Find-LocalAdminAccess

Find machines on the local domain where the current user has local administrator access

Domain Trust Functions:

Get-DomainTrust

Returns domain trusts for the current domain or a specified domain

Get-ForestTrust

Returns all forest trusts for the current forest or a specified forest

Get-DomainForeignUser

Enumerates users who are in groups outside of the user's domain

Get-DomainForeignGroupMember

Enumerates groups with users outside of the group's domain and returns each foreign member

Get-DomainTrustMapping

Will enumerate all trusts for the current domain and any others seen.

PowerView/SharpView

Creating a List of Domain Users

Find Interesting ACL

Covert NameToSID

Using Get-DomainObjectACL

Get ActiveDirectoryRights

Permessi interessanti:

  • GenericAll - full rights to the object (add users to a group or reset user's password)

  • GenericWrite - update object's attributes (i.e logon script)

  • WriteOwner - change object owner to attacker controlled user take over the object

  • WriteDACL - modify object's ACEs and give attacker full control right over the object

  • AllExtendedRights - ability to add user to a group or reset password

  • ForceChangePassword - ability to change user's password

  • Self (Self-Membership) - ability to add yourself to a group

Resolving GUID

Change Password Force-Change-Password

Get User Group Member


AS-REPRoasting


Set DONT_REQ_PREAUTH with PowerView


Informazioni sull'Active Directory

  • Get-NetDomain: Ottiene informazioni sul dominio corrente.

  • Get-NetForest: Ottiene informazioni sulla foresta corrente.

  • Get-NetDomainController: Ottiene i controller di dominio nel dominio corrente.

  • Get-NetGroup: Ottiene informazioni sui gruppi dell'Active Directory.

  • Get-NetUser: Ottiene informazioni sugli utenti dell'Active Directory.

  • Get-NetComputer: Ottiene informazioni sui computer dell'Active Directory.

  • Get-NetOU: Ottiene informazioni sulle unità organizzative dell'Active Directory.

Enumerazione

  • Get-NetGroupMember: Ottiene i membri di un gruppo.

  • Get-NetLocalGroup: Ottiene i gruppi locali su un computer remoto.

  • Get-NetLocalGroupMember: Ottiene i membri di un gruppo locale su un computer remoto.

  • Get-NetShare: Ottiene le condivisioni di rete su un computer remoto.

  • Get-NetLoggedon: Ottiene gli utenti attualmente collegati a un computer remoto.

Esplorazione dei privilegi

  • Find-LocalAdminAccess: Trova gli account utente che hanno accesso di amministratore locale su computer remoti.

  • Find-DomainUserLocation: Trova i computer ai quali un utente ha accesso.

  • Find-InterestingDomainShareFile: Trova file condivisi interessanti all'interno dell'Active Directory.

Esplorazione delle relazioni di trust

  • Get-NetDomainTrust: Ottiene le relazioni di trust tra domini.

  • Get-NetForestTrust: Ottiene le relazioni di trust tra foreste.

Esecuzione remota

  • Invoke-NetCommand: Esegue un comando in remoto su uno o più computer.

Enumerazione delle autorizzazioni

  • Get-NetFilePermissions: Ottiene le autorizzazioni dei file su un computer remoto.

  • Get-NetSharePermissions: Ottiene le autorizzazioni delle condivisioni di rete su un computer remoto.

  • Get-NetLocalGroupMapping: Ottiene la mappatura dei gruppi locali su un computer remoto.

  • Get-NetEffectivePermission: Ottiene le autorizzazioni effettive di un utente o gruppo su una risorsa.

Enumerazione dei servizi

  • Get-NetService: Ottiene informazioni sui servizi in esecuzione su un computer remoto.

  • Get-NetLoggedon: Ottiene gli utenti attualmente collegati a un computer remoto.

Enumerazione dei token

  • Get-NetToken: Ottiene informazioni sui token utente e di sistema su un computer remoto.

Enumerazione delle sessioni

  • Get-NetSession: Ottiene le sessioni di rete su un computer remoto.

  • Get-NetLoggedon: Ottiene gli utenti attualmente collegati a un computer remoto.

Enumerazione dei trust

  • Get-NetDomainTrust: Ottiene le relazioni di trust tra domini.

  • Get-NetForestTrust: Ottiene le relazioni di trust tra foreste.

Gestione dei SID History

  • Invoke-NetUserAdd: Aggiunge un SID a un account utente.

  • Invoke-NetUserClone: Clona un account utente, inclusi gli attributi SID History.

Gestione del dominio

  • Add-NetGroupMember: Aggiunge un membro a un gruppo dell'Active Directory.

  • Add-NetGroupUser: Aggiunge un utente a un gruppo dell'Active Directory.

  • Add-NetLocalGroupMember: Aggiunge un membro a un gruppo locale su un computer remoto.


Kerberos Delegation

User Unconstrained Delegation

Constrained Delegation

FindUser With ActiveDirectoryRights (WriteDacl|GenericWrite|GenericAll)

Retrieving Domain SID


General Tips

https://gist.github.com/HarmJ0y/184f9822b195c52dd50c379ed3117993

Last updated