Hi everyone!,
So far so good, right now in this post we are going to review enumeration over Domain Controller, from the attacker computer side and from the host client that belong to CORPORATIVE.DOMAIN.local environment:
1. OUTSIDE OF DOMAIN
From the attacker side using a valid user and credentials without admin rights, it's possible perform the followings enumerations:
1.1 RPCCLIENT:
rpcclient -U "worker2%Passw0rd1" 10.0.2.17
rpcclient $> enumdomusers
user:[Administrador] rid:[0x1f4]
user:[Invitado] rid:[0x1f5]
user:[krbtgt] rid:[0x1f6]
user:[DefaultAccount] rid:[0x1f7]
user:[worker1] rid:[0x452]
user:[worker2] rid:[0x453]
rpcclient $> enumdomgroups
group:[Enterprise Domain Controllers de sólo lectura] rid:[0x1f2]
group:[Admins. del dominio] rid:[0x200]
group:[Usuarios del dominio] rid:[0x201]
group:[Invitados del dominio] rid:[0x202]
group:[Equipos del dominio] rid:[0x203]
group:[Controladores de dominio] rid:[0x204]
group:[Administradores de esquema] rid:[0x206]
group:[Administradores de empresas] rid:[0x207]
group:[Propietarios del creador de directivas de grupo] rid:[0x208]
group:[Controladores de dominio de sólo lectura] rid:[0x209]
group:[Controladores de dominio clonables] rid:[0x20a]
group:[Protected Users] rid:[0x20d]
group:[Administradores clave] rid:[0x20e]
group:[Administradores clave de la organización] rid:[0x20f]
group:[DnsUpdateProxy] rid:[0x44e]
group:[RDP] rid:[0x454]
rpcclient $> enumdomusersuser:[Administrador] rid:[0x1f4]user:[Invitado] rid:[0x1f5]user:[krbtgt] rid:[0x1f6]user:[DefaultAccount] rid:[0x1f7]user:[worker1] rid:[0x452]user:[worker2] rid:[0x453]rpcclient $> queryusergroups 0x1f4group rid:[0x200] attr:[0x7]group rid:[0x201] attr:[0x7]group rid:[0x208] attr:[0x7]group rid:[0x206] attr:[0x7]group rid:[0x207] attr:[0x7]rpcclient $> querygroup 0x200Group Name: Admins. del dominioDescription: Administradores designados del dominioGroup Attribute:7Num Members:1rpcclient $> querygroup 0x201Group Name: Usuarios del dominioDescription: Todos los usuarios del dominioGroup Attribute:7Num Members:5rpcclient $> querygroup 0x208Group Name: Propietarios del creador de directivas de grupoDescription: Los miembros de este grupo pueden modificar la directiva de grupo del dominioGroup Attribute:7Num Members:1rpcclient $> querygroup 0x206Group Name: Administradores de esquemaDescription: Administradores designados del esquemaGroup Attribute:7Num Members:1rpcclient $> querygroup 0x207Group Name: Administradores de empresasDescription: Administradores designados de la empresaGroup Attribute:7Num Members:1rpcclient $>
for i in `rpcclient -U "worker2%Passw0rd1" 10.0.2.17 -c "enumdomusers" | awk -F "rid:" '{ print $2}' | tr -d "[]"`; do echo "User rid: $i";echo "User data : ";rpcclient -U "worker2%Passw0rd1" 10.0.2.17 -c "queryuser $i";echo " User groups: " ;rpcclient -U "worker2%Passw0rd1" 10.0.2.17 -c "queryusergroups $i"; for j in `rpcclient -U "worker2%Passw0rd1" 10.0.2.17 -c "queryusergroups $i" | awk '{print $2}' | awk -F ":" '{print $2}' |tr -d "[]"`; do echo $j; rpcclient -U "worker2%Passw0rd1" 10.0.2.17 -c "querygroup $j" ;done doneUser rid: 0x1f4User data :User Name : AdministradorFull Name :Home Drive :Dir Drive :Profile Path:Logon Script:Description : Cuenta integrada para la administración del equipo o dominioWorkstations:Comment :Remote Dial :Logon Time : sáb, 18 sep 2021 19:44:09 CESTLogoff Time : jue, 01 ene 1970 01:00:00 CETKickoff Time : jue, 14 sep 30828 04:48:05 CESTPassword last set Time : sáb, 11 sep 2021 23:18:53 CESTPassword can change Time : dom, 12 sep 2021 23:18:53 CESTPassword must change Time: jue, 14 sep 30828 04:48:05 CESTunknown_2[0..31]...user_rid : 0x1f4group_rid: 0x201acb_info : 0x00000210fields_present: 0x00fffffflogon_divs: 168bad_password_count: 0x00000000logon_count: 0x0000001apadding1[0..7]...logon_hrs[0..21]...User groups:group rid:[0x200] attr:[0x7]group rid:[0x201] attr:[0x7]group rid:[0x208] attr:[0x7]group rid:[0x206] attr:[0x7]group rid:[0x207] attr:[0x7]0x200Group Name: Admins. del dominioDescription: Administradores designados del dominioGroup Attribute:7Num Members:10x201Group Name: Usuarios del dominioDescription: Todos los usuarios del dominioGroup Attribute:7Num Members:50x208Group Name: Propietarios del creador de directivas de grupoDescription: Los miembros de este grupo pueden modificar la directiva de grupo del dominioGroup Attribute:7Num Members:10x206Group Name: Administradores de esquemaDescription: Administradores designados del esquemaGroup Attribute:7Num Members:10x207Group Name: Administradores de empresasDescription: Administradores designados de la empresaGroup Attribute:7Num Members:1User rid: 0x1f5User data :User Name : InvitadoFull Name :Home Drive :Dir Drive :Profile Path:Logon Script:Description : Cuenta integrada para el acceso como invitado al equipo o dominioWorkstations:Comment :Remote Dial :Logon Time : jue, 01 ene 1970 01:00:00 CETLogoff Time : jue, 01 ene 1970 01:00:00 CETKickoff Time : jue, 14 sep 30828 04:48:05 CESTPassword last set Time : jue, 01 ene 1970 01:00:00 CETPassword can change Time : jue, 01 ene 1970 01:00:00 CETPassword must change Time: jue, 14 sep 30828 04:48:05 CESTunknown_2[0..31]...user_rid : 0x1f5group_rid: 0x202acb_info : 0x00000215fields_present: 0x00fffffflogon_divs: 168bad_password_count: 0x00000000logon_count: 0x00000000padding1[0..7]...logon_hrs[0..21]...User groups:group rid:[0x202] attr:[0x7]0x202Group Name: Invitados del dominioDescription: Todos los invitados del dominioGroup Attribute:7Num Members:1User rid: 0x1f6User data :User Name : krbtgtFull Name :Home Drive :Dir Drive :Profile Path:Logon Script:Description : Cuenta de servicio de centro de distribución de clavesWorkstations:Comment :Remote Dial :Logon Time : jue, 01 ene 1970 01:00:00 CETLogoff Time : jue, 01 ene 1970 01:00:00 CETKickoff Time : jue, 14 sep 30828 04:48:05 CESTPassword last set Time : dom, 12 sep 2021 00:29:47 CESTPassword can change Time : lun, 13 sep 2021 00:29:47 CESTPassword must change Time: dom, 24 oct 2021 00:29:47 CESTunknown_2[0..31]...user_rid : 0x1f6group_rid: 0x201acb_info : 0x00000011fields_present: 0x00fffffflogon_divs: 168bad_password_count: 0x00000000logon_count: 0x00000000padding1[0..7]...logon_hrs[0..21]...User groups:group rid:[0x201] attr:[0x7]0x201Group Name: Usuarios del dominioDescription: Todos los usuarios del dominioGroup Attribute:7Num Members:5User rid: 0x1f7User data :User Name : DefaultAccountFull Name :Home Drive :Dir Drive :Profile Path:Logon Script:Description : Cuenta de usuario administrada por el sistema.Workstations:Comment :Remote Dial :Logon Time : jue, 01 ene 1970 01:00:00 CETLogoff Time : jue, 01 ene 1970 01:00:00 CETKickoff Time : jue, 14 sep 30828 04:48:05 CESTPassword last set Time : jue, 01 ene 1970 01:00:00 CETPassword can change Time : jue, 01 ene 1970 01:00:00 CETPassword must change Time: jue, 14 sep 30828 04:48:05 CESTunknown_2[0..31]...user_rid : 0x1f7group_rid: 0x201acb_info : 0x00000215fields_present: 0x00fffffflogon_divs: 168bad_password_count: 0x00000000logon_count: 0x00000000padding1[0..7]...logon_hrs[0..21]...User groups:group rid:[0x201] attr:[0x7]0x201Group Name: Usuarios del dominioDescription: Todos los usuarios del dominioGroup Attribute:7Num Members:5User rid: 0x452User data :User Name : worker1Full Name : trabajador1Home Drive :Dir Drive :Profile Path:Logon Script:Description :Workstations:Comment :Remote Dial :Logon Time : dom, 12 sep 2021 19:57:13 CESTLogoff Time : jue, 01 ene 1970 01:00:00 CETKickoff Time : jue, 14 sep 30828 04:48:05 CESTPassword last set Time : dom, 12 sep 2021 13:14:04 CESTPassword can change Time : lun, 13 sep 2021 13:14:04 CESTPassword must change Time: jue, 14 sep 30828 04:48:05 CESTunknown_2[0..31]...user_rid : 0x452group_rid: 0x201acb_info : 0x00000210fields_present: 0x00fffffflogon_divs: 168bad_password_count: 0x00000000logon_count: 0x00000009padding1[0..7]...logon_hrs[0..21]...User groups:group rid:[0x201] attr:[0x7]0x201Group Name: Usuarios del dominioDescription: Todos los usuarios del dominioGroup Attribute:7Num Members:5User rid: 0x453User data :User Name : worker2Full Name : trabajador2Home Drive :Dir Drive :Profile Path:Logon Script:Description :Workstations:Comment :Remote Dial :Logon Time : sáb, 18 sep 2021 20:33:46 CESTLogoff Time : jue, 01 ene 1970 01:00:00 CETKickoff Time : jue, 14 sep 30828 04:48:05 CESTPassword last set Time : dom, 12 sep 2021 13:14:39 CESTPassword can change Time : lun, 13 sep 2021 13:14:39 CESTPassword must change Time: jue, 14 sep 30828 04:48:05 CESTunknown_2[0..31]...user_rid : 0x453group_rid: 0x201acb_info : 0x00000210fields_present: 0x00fffffflogon_divs: 168bad_password_count: 0x00000000logon_count: 0x0000004bpadding1[0..7]...logon_hrs[0..21]...User groups:group rid:[0x201] attr:[0x7]0x201Group Name: Usuarios del dominioDescription: Todos los usuarios del dominioGroup Attribute:7Num Members:5
1.2 ad-ldap-enum
kali@kali:/opt/ad-ldap-enum$ python ad-ldap-enum.py -l 10.0.2.17 -d CORPORATIVE.DOMAIN.local -u worker2 -p Passw0rd12021-09-18 21:02:39 INFO Querying users2021-09-18 21:02:39 INFO Querying groups2021-09-18 21:02:39 INFO Querying computers2021-09-18 21:02:39 INFO Building users dictionary2021-09-18 21:02:39 INFO Building groups dictionary2021-09-18 21:02:39 INFO Building computers dictionary2021-09-18 21:02:39 INFO Exploding large groups2021-09-18 21:02:39 INFO Building group membership2021-09-18 21:02:39 INFO There is a total of [50] groups2021-09-18 21:02:39 INFO Elapsed Time [0:00:00.028534]
1.3 ldapdomaindump
ldapdomaindump -u "CORPORATIVE\worker2" -p Passw0rd1 10.0.2.17[*] Connecting to host...[*] Binding to host[+] Bind OK[*] Starting domain dump[+] Domain dump finished
kali@kali:/tmp$ python3 -m http.server 8989Serving HTTP on 0.0.0.0 port 8989 (http://0.0.0.0:8989/) ...127.0.0.1 - - [18/Sep/2021 21:11:50] "GET / HTTP/1.1" 200 -127.0.0.1 - - [18/Sep/2021 21:11:55] "GET /domain_computers.html HTTP/1.1" 200 -127.0.0.1 - - [18/Sep/2021 21:11:58] "GET /domain_computers_by_os.html HTTP/1.1" 200 -127.0.0.1 - - [18/Sep/2021 21:11:59] "GET /domain_groups.html HTTP/1.1" 200 -127.0.0.1 - - [18/Sep/2021 21:12:01] "GET /domain_policy.html HTTP/1.1" 200 -127.0.0.1 - - [18/Sep/2021 21:12:01] code 404, message File not found127.0.0.1 - - [18/Sep/2021 21:12:01] "GET /favicon.ico HTTP/1.1" 404 -----------------------------------------
2. INSIDE OF DOMAIN
2.1 Windows CMD enumeration commands
C:\Users\worker2>net users /domainSe procesará la solicitud en un controlador de dominio del dominio CORPORATIVE.DOMAIN.local.Cuentas de usuario de \\CORPORATIVE-DOMAIN.CORPORATIVE.DOMAIN.local-------------------------------------------------------------------------------Administrador DefaultAccount Invitadokrbtgt worker1 worker2Se ha completado el comando correctamente.
C:\Users\worker2>net groups /domainSe procesará la solicitud en un controlador de dominio del dominio CORPORATIVE.DOMAIN.local.Cuentas de grupo de \\CORPORATIVE-DOMAIN.CORPORATIVE.DOMAIN.local-------------------------------------------------------------------------------*Administradores clave*Administradores clave de la organización*Administradores de empresas*Administradores de esquema*Admins. del dominio*Controladores de dominio*Controladores de dominio clonables*Controladores de dominio de sólo lectura*DnsUpdateProxy*Enterprise Domain Controllers de sólo lectura*Equipos del dominio*Invitados del dominio*Propietarios del creador de directivas de grupo*Protected Users*RDP*Usuarios del dominioSe ha completado el comando correctamente.
C:\Users\worker2>net group "Usuarios del dominio" /domainSe procesará la solicitud en un controlador de dominio del dominio CORPORATIVE.DOMAIN.local.Nombre de grupo Usuarios del dominioComentario Todos los usuarios del dominioMiembros-------------------------------------------------------------------------------Administrador DefaultAccount krbtgtworker1 worker2Se ha completado el comando correctamente.
2.2 Powershell: Active directory Module:
PS C:\Users\worker2\Documents> Get-command -Module activedirectoryCommandType Name Version Source----------- ---- ------- ------Cmdlet Add-ADCentralAccessPolicyMember 1.0.0.0 ActiveDirectoryCmdlet Add-ADComputerServiceAccount 1.0.0.0 ActiveDirectoryCmdlet Add-ADDomainControllerPasswordReplicationPolicy 1.0.0.0 ActiveDirectoryCmdlet Add-ADFineGrainedPasswordPolicySubject 1.0.0.0 ActiveDirectoryCmdlet Add-ADGroupMember 1.0.0.0 ActiveDirectoryCmdlet Add-ADPrincipalGroupMembership 1.0.0.0 ActiveDirectoryCmdlet Add-ADResourcePropertyListMember 1.0.0.0 ActiveDirectoryCmdlet Clear-ADAccountExpiration 1.0.0.0 ActiveDirectoryCmdlet Clear-ADClaimTransformLink 1.0.0.0 ActiveDirectoryCmdlet Disable-ADAccount 1.0.0.0 ActiveDirectoryCmdlet Disable-ADOptionalFeature 1.0.0.0 ActiveDirectoryCmdlet Enable-ADAccount 1.0.0.0 ActiveDirectoryCmdlet Enable-ADOptionalFeature 1.0.0.0 ActiveDirectoryCmdlet Get-ADAccountAuthorizationGroup 1.0.0.0 ActiveDirectoryCmdlet Get-ADAccountResultantPasswordReplicationPolicy 1.0.0.0 ActiveDirectoryCmdlet Get-ADAuthenticationPolicy 1.0.0.0 ActiveDirectoryCmdlet Get-ADAuthenticationPolicySilo 1.0.0.0 ActiveDirectoryCmdlet Get-ADCentralAccessPolicy 1.0.0.0 ActiveDirectoryCmdlet Get-ADCentralAccessRule 1.0.0.0 ActiveDirectoryCmdlet Get-ADClaimTransformPolicy 1.0.0.0 ActiveDirectoryCmdlet Get-ADClaimType 1.0.0.0 ActiveDirectoryCmdlet Get-ADComputer 1.0.0.0 ActiveDirectoryCmdlet Get-ADComputerServiceAccount 1.0.0.0 ActiveDirectoryCmdlet Get-ADDCCloningExcludedApplicationList 1.0.0.0 ActiveDirectoryCmdlet Get-ADDefaultDomainPasswordPolicy 1.0.0.0 ActiveDirectoryCmdlet Get-ADDomain 1.0.0.0 ActiveDirectoryCmdlet Get-ADDomainController 1.0.0.0 ActiveDirectoryCmdlet Get-ADDomainControllerPasswordReplicationPolicy 1.0.0.0 ActiveDirectoryCmdlet Get-ADDomainControllerPasswordReplicationPolicy... 1.0.0.0 ActiveDirectoryCmdlet Get-ADFineGrainedPasswordPolicy 1.0.0.0 ActiveDirectoryCmdlet Get-ADFineGrainedPasswordPolicySubject 1.0.0.0 ActiveDirectoryCmdlet Get-ADForest 1.0.0.0 ActiveDirectoryCmdlet Get-ADGroup 1.0.0.0 ActiveDirectoryCmdlet Get-ADGroupMember 1.0.0.0 ActiveDirectoryCmdlet Get-ADObject 1.0.0.0 ActiveDirectoryCmdlet Get-ADOptionalFeature 1.0.0.0 ActiveDirectoryCmdlet Get-ADOrganizationalUnit 1.0.0.0 ActiveDirectoryCmdlet Get-ADPrincipalGroupMembership 1.0.0.0 ActiveDirectoryCmdlet Get-ADReplicationAttributeMetadata 1.0.0.0 ActiveDirectoryCmdlet Get-ADReplicationConnection 1.0.0.0 ActiveDirectoryCmdlet Get-ADReplicationFailure 1.0.0.0 ActiveDirectoryCmdlet Get-ADReplicationPartnerMetadata 1.0.0.0 ActiveDirectoryCmdlet Get-ADReplicationQueueOperation 1.0.0.0 ActiveDirectoryCmdlet Get-ADReplicationSite 1.0.0.0 ActiveDirectoryCmdlet Get-ADReplicationSiteLink 1.0.0.0 ActiveDirectoryCmdlet Get-ADReplicationSiteLinkBridge 1.0.0.0 ActiveDirectoryCmdlet Get-ADReplicationSubnet 1.0.0.0 ActiveDirectoryCmdlet Get-ADReplicationUpToDatenessVectorTable 1.0.0.0 ActiveDirectoryCmdlet Get-ADResourceProperty 1.0.0.0 ActiveDirectoryCmdlet Get-ADResourcePropertyList 1.0.0.0 ActiveDirectoryCmdlet Get-ADResourcePropertyValueType 1.0.0.0 ActiveDirectoryCmdlet Get-ADRootDSE 1.0.0.0 ActiveDirectoryCmdlet Get-ADServiceAccount 1.0.0.0 ActiveDirectoryCmdlet Get-ADTrust 1.0.0.0 ActiveDirectoryCmdlet Get-ADUser 1.0.0.0 ActiveDirectoryCmdlet Get-ADUserResultantPasswordPolicy 1.0.0.0 ActiveDirectoryCmdlet Grant-ADAuthenticationPolicySiloAccess 1.0.0.0 ActiveDirectoryCmdlet Install-ADServiceAccount 1.0.0.0 ActiveDirectoryCmdlet Move-ADDirectoryServer 1.0.0.0 ActiveDirectoryCmdlet Move-ADDirectoryServerOperationMasterRole 1.0.0.0 ActiveDirectoryCmdlet Move-ADObject 1.0.0.0 ActiveDirectoryCmdlet New-ADAuthenticationPolicy 1.0.0.0 ActiveDirectoryCmdlet New-ADAuthenticationPolicySilo 1.0.0.0 ActiveDirectoryCmdlet New-ADCentralAccessPolicy 1.0.0.0 ActiveDirectoryCmdlet New-ADCentralAccessRule 1.0.0.0 ActiveDirectoryCmdlet New-ADClaimTransformPolicy 1.0.0.0 ActiveDirectoryCmdlet New-ADClaimType 1.0.0.0 ActiveDirectoryCmdlet New-ADComputer 1.0.0.0 ActiveDirectoryCmdlet New-ADDCCloneConfigFile 1.0.0.0 ActiveDirectoryCmdlet New-ADFineGrainedPasswordPolicy 1.0.0.0 ActiveDirectoryCmdlet New-ADGroup 1.0.0.0 ActiveDirectoryCmdlet New-ADObject 1.0.0.0 ActiveDirectoryCmdlet New-ADOrganizationalUnit 1.0.0.0 ActiveDirectoryCmdlet New-ADReplicationSite 1.0.0.0 ActiveDirectoryCmdlet New-ADReplicationSiteLink 1.0.0.0 ActiveDirectoryCmdlet New-ADReplicationSiteLinkBridge 1.0.0.0 ActiveDirectoryCmdlet New-ADReplicationSubnet 1.0.0.0 ActiveDirectoryCmdlet New-ADResourceProperty 1.0.0.0 ActiveDirectoryCmdlet New-ADResourcePropertyList 1.0.0.0 ActiveDirectoryCmdlet New-ADServiceAccount 1.0.0.0 ActiveDirectoryCmdlet New-ADUser 1.0.0.0 ActiveDirectoryCmdlet Remove-ADAuthenticationPolicy 1.0.0.0 ActiveDirectoryCmdlet Remove-ADAuthenticationPolicySilo 1.0.0.0 ActiveDirectoryCmdlet Remove-ADCentralAccessPolicy 1.0.0.0 ActiveDirectoryCmdlet Remove-ADCentralAccessPolicyMember 1.0.0.0 ActiveDirectoryCmdlet Remove-ADCentralAccessRule 1.0.0.0 ActiveDirectoryCmdlet Remove-ADClaimTransformPolicy 1.0.0.0 ActiveDirectoryCmdlet Remove-ADClaimType 1.0.0.0 ActiveDirectoryCmdlet Remove-ADComputer 1.0.0.0 ActiveDirectoryCmdlet Remove-ADComputerServiceAccount 1.0.0.0 ActiveDirectoryCmdlet Remove-ADDomainControllerPasswordReplicationPolicy 1.0.0.0 ActiveDirectoryCmdlet Remove-ADFineGrainedPasswordPolicy 1.0.0.0 ActiveDirectoryCmdlet Remove-ADFineGrainedPasswordPolicySubject 1.0.0.0 ActiveDirectoryCmdlet Remove-ADGroup 1.0.0.0 ActiveDirectoryCmdlet Remove-ADGroupMember 1.0.0.0 ActiveDirectoryCmdlet Remove-ADObject 1.0.0.0 ActiveDirectoryCmdlet Remove-ADOrganizationalUnit 1.0.0.0 ActiveDirectoryCmdlet Remove-ADPrincipalGroupMembership 1.0.0.0 ActiveDirectoryCmdlet Remove-ADReplicationSite 1.0.0.0 ActiveDirectoryCmdlet Remove-ADReplicationSiteLink 1.0.0.0 ActiveDirectoryCmdlet Remove-ADReplicationSiteLinkBridge 1.0.0.0 ActiveDirectoryCmdlet Remove-ADReplicationSubnet 1.0.0.0 ActiveDirectoryCmdlet Remove-ADResourceProperty 1.0.0.0 ActiveDirectoryCmdlet Remove-ADResourcePropertyList 1.0.0.0 ActiveDirectoryCmdlet Remove-ADResourcePropertyListMember 1.0.0.0 ActiveDirectoryCmdlet Remove-ADServiceAccount 1.0.0.0 ActiveDirectoryCmdlet Remove-ADUser 1.0.0.0 ActiveDirectoryCmdlet Rename-ADObject 1.0.0.0 ActiveDirectoryCmdlet Reset-ADServiceAccountPassword 1.0.0.0 ActiveDirectoryCmdlet Restore-ADObject 1.0.0.0 ActiveDirectoryCmdlet Revoke-ADAuthenticationPolicySiloAccess 1.0.0.0 ActiveDirectoryCmdlet Search-ADAccount 1.0.0.0 ActiveDirectoryCmdlet Set-ADAccountAuthenticationPolicySilo 1.0.0.0 ActiveDirectoryCmdlet Set-ADAccountControl 1.0.0.0 ActiveDirectoryCmdlet Set-ADAccountExpiration 1.0.0.0 ActiveDirectoryCmdlet Set-ADAccountPassword 1.0.0.0 ActiveDirectoryCmdlet Set-ADAuthenticationPolicy 1.0.0.0 ActiveDirectoryCmdlet Set-ADAuthenticationPolicySilo 1.0.0.0 ActiveDirectoryCmdlet Set-ADCentralAccessPolicy 1.0.0.0 ActiveDirectoryCmdlet Set-ADCentralAccessRule 1.0.0.0 ActiveDirectoryCmdlet Set-ADClaimTransformLink 1.0.0.0 ActiveDirectoryCmdlet Set-ADClaimTransformPolicy 1.0.0.0 ActiveDirectoryCmdlet Set-ADClaimType 1.0.0.0 ActiveDirectoryCmdlet Set-ADComputer 1.0.0.0 ActiveDirectoryCmdlet Set-ADDefaultDomainPasswordPolicy 1.0.0.0 ActiveDirectoryCmdlet Set-ADDomain 1.0.0.0 ActiveDirectoryCmdlet Set-ADDomainMode 1.0.0.0 ActiveDirectoryCmdlet Set-ADFineGrainedPasswordPolicy 1.0.0.0 ActiveDirectoryCmdlet Set-ADForest 1.0.0.0 ActiveDirectoryCmdlet Set-ADForestMode 1.0.0.0 ActiveDirectoryCmdlet Set-ADGroup 1.0.0.0 ActiveDirectoryCmdlet Set-ADObject 1.0.0.0 ActiveDirectoryCmdlet Set-ADOrganizationalUnit 1.0.0.0 ActiveDirectoryCmdlet Set-ADReplicationConnection 1.0.0.0 ActiveDirectoryCmdlet Set-ADReplicationSite 1.0.0.0 ActiveDirectoryCmdlet Set-ADReplicationSiteLink 1.0.0.0 ActiveDirectoryCmdlet Set-ADReplicationSiteLinkBridge 1.0.0.0 ActiveDirectoryCmdlet Set-ADReplicationSubnet 1.0.0.0 ActiveDirectoryCmdlet Set-ADResourceProperty 1.0.0.0 ActiveDirectoryCmdlet Set-ADResourcePropertyList 1.0.0.0 ActiveDirectoryCmdlet Set-ADServiceAccount 1.0.0.0 ActiveDirectoryCmdlet Set-ADUser 1.0.0.0 ActiveDirectoryCmdlet Show-ADAuthenticationPolicyExpression 1.0.0.0 ActiveDirectoryCmdlet Sync-ADObject 1.0.0.0 ActiveDirectoryCmdlet Test-ADServiceAccount 1.0.0.0 ActiveDirectoryCmdlet Uninstall-ADServiceAccount 1.0.0.0 ActiveDirectoryCmdlet Unlock-ADAccount 1.0.0.0 ActiveDirectory
PS C:\Users\worker2\Documents> Get-ADUsercmdlet Get-ADUser en la posición 1 de la canalización de comandosProporcione valores para los parámetros siguientes:(Escriba !? para obtener Ayuda).Filter: *DistinguishedName : CN=Administrador,CN=Users,DC=CORPORATIVE,DC=DOMAIN,DC=localEnabled : TrueGivenName :Name : AdministradorObjectClass : userObjectGUID : fac68faf-e080-4edc-8c0d-e9074b6b245eSamAccountName : AdministradorSID : S-1-5-21-2048228633-4105951457-1013245227-500Surname :UserPrincipalName :DistinguishedName : CN=Invitado,CN=Users,DC=CORPORATIVE,DC=DOMAIN,DC=localEnabled : FalseGivenName :Name : InvitadoObjectClass : userObjectGUID : e97cfc2c-0d03-47e6-8da7-9196cb028e2fSamAccountName : InvitadoSID : S-1-5-21-2048228633-4105951457-1013245227-501Surname :UserPrincipalName :DistinguishedName : CN=DefaultAccount,CN=Users,DC=CORPORATIVE,DC=DOMAIN,DC=localEnabled : FalseGivenName :Name : DefaultAccountObjectClass : userObjectGUID : 34b807f2-66a4-47cd-b140-20f32341c678SamAccountName : DefaultAccountSID : S-1-5-21-2048228633-4105951457-1013245227-503Surname :UserPrincipalName :DistinguishedName : CN=krbtgt,CN=Users,DC=CORPORATIVE,DC=DOMAIN,DC=localEnabled : FalseGivenName :Name : krbtgtObjectClass : userObjectGUID : 32daa5cd-711e-4054-9dba-e718739a7c0fSamAccountName : krbtgtSID : S-1-5-21-2048228633-4105951457-1013245227-502Surname :UserPrincipalName :DistinguishedName : CN=trabajador1,CN=Users,DC=CORPORATIVE,DC=DOMAIN,DC=localEnabled : TrueGivenName : trabajador1Name : trabajador1ObjectClass : userObjectGUID : 1c1959f2-3042-48a0-8127-2266b90fc647SamAccountName : worker1SID : S-1-5-21-2048228633-4105951457-1013245227-1106Surname :UserPrincipalName : worker1@CORPORATIVE.DOMAIN.localDistinguishedName : CN=trabajador2,CN=Users,DC=CORPORATIVE,DC=DOMAIN,DC=localEnabled : TrueGivenName : trabajador2Name : trabajador2ObjectClass : userObjectGUID : 29a63c66-b44a-48cf-93bc-b1acdd9ca77aSamAccountName : worker2SID : S-1-5-21-2048228633-4105951457-1013245227-1107Surname :UserPrincipalName : worker2@CORPORATIVE.DOMAIN.local
- Obtaining domain groups:
PS C:\Users\worker2\Documents> Get-ADGroup
cmdlet Get-ADGroup en la posición 1 de la canalización de comandos
Proporcione valores para los parámetros siguientes:
(Escriba !? para obtener Ayuda).
Filter: *
DistinguishedName : CN=Administradores,CN=Builtin,DC=CORPORATIVE,DC=DOMAIN,DC=local
GroupCategory : Security
GroupScope : DomainLocal
Name : Administradores
ObjectClass : group
ObjectGUID : b8cbfc78-0068-4e59-8de0-bd29995f88f2
SamAccountName : Administradores
SID : S-1-5-32-544
DistinguishedName : CN=Usuarios,CN=Builtin,DC=CORPORATIVE,DC=DOMAIN,DC=local
GroupCategory : Security
GroupScope : DomainLocal
Name : Usuarios
ObjectClass : group
ObjectGUID : b4da0565-18ab-405c-8236-052cc188f9cd
SamAccountName : Usuarios
SID : S-1-5-32-545
DistinguishedName : CN=Invitados,CN=Builtin,DC=CORPORATIVE,DC=DOMAIN,DC=local
GroupCategory : Security
GroupScope : DomainLocal
Name : Invitados
ObjectClass : group
ObjectGUID : 4ff00d11-fd45-418e-833f-ce1775122be3
SamAccountName : Invitados
SID : S-1-5-32-546
DistinguishedName : CN=Opers. de impresión,CN=Builtin,DC=CORPORATIVE,DC=DOMAIN,DC=local
GroupCategory : Security
GroupScope : DomainLocal
Name : Opers. de impresión
ObjectClass : group
ObjectGUID : f0082985-9e5b-4968-9517-7007bc0048eb
SamAccountName : Opers. de impresión
SID : S-1-5-32-550
.....
etc
- Obtaining Domain Computers:
PS C:\Users\worker2\Documents> Get-ADComputer
cmdlet Get-ADComputer en la posición 1 de la canalización de comandos
Proporcione valores para los parámetros siguientes:
(Escriba !? para obtener Ayuda).
Filter: *
DistinguishedName : CN=CORPORATIVE-DOM,OU=Domain Controllers,DC=CORPORATIVE,DC=DOMAIN,DC=local
DNSHostName : CORPORATIVE-DOMAIN.CORPORATIVE.DOMAIN.local
Enabled : True
Name : CORPORATIVE-DOM
ObjectClass : computer
ObjectGUID : cda5f480-f490-4cbf-bf0f-354e232a603d
SamAccountName : CORPORATIVE-DOM$
SID : S-1-5-21-2048228633-4105951457-1013245227-1000
UserPrincipalName :
DistinguishedName : CN=WKS-002,CN=Computers,DC=CORPORATIVE,DC=DOMAIN,DC=local
DNSHostName : WKS-002.CORPORATIVE.DOMAIN.local
Enabled : True
Name : WKS-002
ObjectClass : computer
ObjectGUID : fb8e2755-be32-43bd-90e1-3c259e1df104
SamAccountName : WKS-002$
SID : S-1-5-21-2048228633-4105951457-1013245227-1103
UserPrincipalName :
DistinguishedName : CN=WKS-001,CN=Computers,DC=CORPORATIVE,DC=DOMAIN,DC=local
DNSHostName : WKS-001.CORPORATIVE.DOMAIN.local
Enabled : True
Name : WKS-001
ObjectClass : computer
ObjectGUID : e5c3910e-a9f2-403d-922a-35d41451308f
SamAccountName : WKS-001$
SID : S-1-5-21-2048228633-4105951457-1013245227-1104
UserPrincipalName :
PS C:\Users\worker2\Documents> Get-ADDefaultDomainPasswordPolicyComplexityEnabled : TrueDistinguishedName : DC=CORPORATIVE,DC=DOMAIN,DC=localLockoutDuration : 00:30:00LockoutObservationWindow : 00:30:00LockoutThreshold : 0MaxPasswordAge : 42.00:00:00MinPasswordAge : 1.00:00:00MinPasswordLength : 7objectClass : {domainDNS}objectGuid : 2628752b-488d-4d56-83c1-6a3088415297PasswordHistoryCount : 24ReversibleEncryptionEnabled : False
2.3 Powershell: Powerview Module
Domain/LDAP Functions:
Get-DomainDNSZone - enumerates the Active Directory DNS zones for a given domain
Get-DomainDNSRecord - enumerates the Active Directory DNS records for a given zone
Get-Domain - returns the domain object for the current (or specified) domain
Get-DomainController - return the domain controllers for the current (or specified) domain
Get-Forest - returns the forest object for the current (or specified) forest
Get-ForestDomain - return all domains for the current (or specified) forest
Get-ForestGlobalCatalog - return all global catalogs for the current (or specified) forest
Find-DomainObjectPropertyOutlier- inds user/group/computer objects in AD that have 'outlier' properties set
Get-DomainUser - return all users or specific user objects in AD
New-DomainUser - creates a new domain user (assuming appropriate permissions) and returns the user object
Get-DomainUserEvent - enumerates account logon events (ID 4624) and Logon with explicit credential events
Get-DomainComputer - returns all computers or specific computer objects in AD
Get-DomainObject - returns all (or specified) domain objects in AD
Set-DomainObject - modifies a gven property for a specified active directory object
Get-DomainObjectAcl - returns the ACLs associated with a specific active directory object
Add-DomainObjectAcl - adds an ACL for a specific active directory object
Find-InterestingDomainAcl - finds object ACLs in the current (or specified) domain with modification rights set to non-built in objects
Get-DomainOU - search for all organization units (OUs) or specific OU objects in AD
Get-DomainSite - search for all sites or specific site objects in AD
Get-DomainSubnet - search for all subnets or specific subnets objects in AD
Get-DomainSID - returns the SID for the current domain or the specified domain
Get-DomainGroup - return all groups or specific group objects in AD
New-DomainGroup - creates a new domain group (assuming appropriate permissions) and returns the group object
Get-DomainManagedSecurityGroup - returns all security groups in the current (or target) domain that have a manager set
Get-DomainGroupMember - return the members of a specific domain group
Add-DomainGroupMember - adds a domain user (or group) to an existing domain group, assuming appropriate permissions to do so
Get-DomainFileServer - returns a list of servers likely functioning as file servers
Get-DomainDFSShare - returns a list of all fault-tolerant distributed file systems for the current (or specified) domain
GPO functions
Get-DomainGPO - returns all GPOs or specific GPO objects in AD
Get-DomainGPOLocalGroup - returns all GPOs in a domain that modify local group memberships through 'Restricted Groups' or Group Policy preferences
Get-DomainGPOUserLocalGroupMapping - enumerates the machines where a specific domain user/group is a member of a specific local group, all through GPO correlation
Get-DomainGPOComputerLocalGroupMapping - takes a computer (or GPO) object and determines what users/groups are in the specified local group for the machine through GPO correlation
Get-DomainPolicy - returns the default domain policy or the domain controller policy for the current domain or a specified domain/domain controller
Computer Enumeration Functions
Get-NetLocalGroup - enumerates the local groups on the local (or remote) machine
Get-NetLocalGroupMember - enumerates members of a specific local group on the local (or remote) machine
Get-NetShare - returns open shares on the local (or a remote) machine
Get-NetLoggedon - returns users logged on the local (or a remote) machine
Get-NetSession - returns session information for the local (or a remote) machine
Get-RegLoggedOn - returns who is logged onto the local (or a remote) machine through enumeration of remote registry keys
Get-NetRDPSession - returns remote desktop/session information for the local (or a remote) machine
Test-AdminAccess - rests if the current user has administrative access to the local (or a remote) machine
Get-NetComputerSiteName - returns the AD site where the local (or a remote) machine resides
Get-WMIRegProxy - enumerates the proxy server and WPAD conents for the current user
Get-WMIRegLastLoggedOn - returns the last user who logged onto the local (or a remote) machine
Get-WMIRegCachedRDPConnection - returns information about RDP connections outgoing from the local (or remote) machine
Get-WMIRegMountedDrive - returns information about saved network mounted drives for the local (or remote) machine
Get-WMIProcess - returns a list of processes and their owners on the local or remote machine
Find-InterestingFile - searches for files on the given path that match a series of specified criteria
Execution examples:
PS C:\Users\worker2\Documents\PowerSploit-3.0.0\Recon> Get-DomainSID
S-1-5-21-2048228633-4105951457-1013245227
PS C:\Users\worker2\Documents\PowerSploit-3.0.0\Recon> Get-DomainPolicy
RegistryValues : @{MACHINE\System\CurrentControlSet\Control\Lsa\NoLMHash=System.String[]}
SystemAccess : @{MinimumPasswordAge=1; MaximumPasswordAge=42; LockoutBadCount=0; PasswordComplexity=1;
RequireLogonToChangePassword=0; LSAAnonymousNameLookup=0; ForceLogoffWhenHourExpire=0;
PasswordHistorySize=24; ClearTextPassword=0; MinimumPasswordLength=7}
Version : @{Revision=1; signature="$CHICAGO$"}
KerberosPolicy : @{MaxTicketAge=10; MaxServiceAge=600; MaxClockSkew=5; MaxRenewAge=7;
TicketValidateClient=1}
Unicode : @{Unicode=yes}
PS C:\Users\worker2\Documents\PowerSploit-3.0.0\Recon> Get-UserProperty
Name
----
accountexpires
admincount
adspath
badpasswordtime
badpwdcount
cn
codepage
countrycode
description
distinguishedname
dscorepropagationdata
instancetype
iscriticalsystemobject
lastlogoff
lastlogon
lastlogontimestamp
logoncount
memberof
name
objectcategory
objectclass
objectguid
objectsid
primarygroupid
pwdlastset
samaccountname
samaccounttype
useraccountcontrol
usnchanged
usncreated
whenchanged
whencreated
And this is all, for this Active directory recognition, I hope that you enjoy with my seventh windows entry and you'll follow my blog [https://roadtooscp-f0ns1.blogspot.com/]. We'll keep in touch.
with kind regards, f0ns1
No comments:
Post a Comment