Está en la página 1de 11

Stealthbits

REALIZACIÓN DE ATAQ U E S PAS S -THE-


HASH CON MIMIKATZ

Blog > Realización de ataques Pass-the-Hash con Mimikatz

3 de abril de 2017| Jeff Warren | Ataques de Active Directory | 7 comentarios

Ataque # 4: Pass-the-Hash con Mimikatz


En mi publicación anterior , aprendimos cómo extraer hashes de contraseña
para todas las cuentas de dominio del archivo Ntds.dit . En esta publicación,
veremos qué puede hacer con esos hash una vez que los tenga. Mimikatz se ha
convertido en la herramienta estándar para extraer contraseñas y hashes de la
memoria, realizar ataques pass-the-hash y crear persistencia de dominio a través
de¿Podemos
Golden Tickets . Mimikatz
utilizar se puede
cookies para ejecutar
rastrear de varias formas
sus actividades? para evadir
Nos tomamos muy la en
detección, incluso completamente
serio su privacidad. Consulte nuestraenpolítica
la memoria como parte
de privacidad del
para comando
obtener detalles y
Invoke-Mimikatz dentro de PowerSploit
cualquier. Echemos
pregunta.un vistazo a lo fácil que hace
Mimikatz para pasar el hash y realizar otros ataques basados en autenticación.
sí No
Pass-the-Hash
Con el hash del archivo Ntds.dit en la mano, veamos con qué facilidad Mimikatz
puede permitirnos realizar acciones en nombre de la cuenta de administrador
dentro del dominio.

Primero, iniciaré sesión en mi computadora como el usuario Adam, que no tiene


privilegios especiales dentro del dominio:

Como Adam, si intento ejecutar PSExec , una herramienta para la ejecución


remota de PowerShell, en mi controlador de dominio, recibo un mensaje de
acceso denegado.

¿Podemos utilizar cookies para rastrear sus actividades? Nos tomamos muy en
Al emitir
serio un comando
su privacidad. con Mimikatz,
Consulte nuestrapuedo elevar
política mi cuenta
de privacidad a laobtener
para cuenta de
detalles y
Administrador de dominio. Estocualquier
iniciará cualquier
pregunta. proceso que especi que con
este token elevado. En este caso, lanzaré un nuevo símbolo del sistema.
sí No
With the newly launched command prompt I can perform activities as Jeff, the
Domain Administrator, while Windows still thinks I am Adam. Here you can see I
am now able to launch the PSExec session and enumerate the contents of my
domain controller’s NTDS directory using the Pass-the-Hash technique.

¿Podemos utilizar cookies para rastrear sus actividades? Nos tomamos muy en
serio su privacidad. Consulte nuestra política de privacidad para obtener detalles y
With the Ntds.dit le decrypted,cualquier pregunta.
every user’s password hash is in my control so I
can perform actions on behalf of any user just as easily. This is a scary way to not
only gain unlimited access but to cover
sí my tracks
No and blend in as though I am
the users who I am impersonating.

Protecting Against Pass-the-Hash


Pass-the-Hash is dif cult to prevent, but Windows has introduced several new
features to make it harder to execute. The most effective approach is to
implement logon restrictions so your privileged account hashes are never stored
where they can be extracted. Microsoft provides best practices to follow a tiered
administrative model for Active Directory that ensures privileged accounts will
be signi cantly harder to compromise using such methods. Enabling LSA
Protection, leveraging the Protected Users security group, and using Restricted
Admin mode for Remote Desktop are some other ways in which you can protect
against these attacks.

In addition to proper upfront security, monitoring authentication and logon


activity for abnormalities can expose any attempts to leverage these attack
paths. Many times, these attacks follow patterns and result in accounts being
used in ways that are not normal. Being alerted to this as it occurs can detect an
attack before it is too late.

This is the nal installment in our blog series, 4 Active Directory Attacks and
How to Protect Against Them. To view the previous blogs, please click on the
links below.

AD Attack #1 – Performing Domain Reconnaissance (PowerShell)


AD Attack #2 – Local Admin Mapping (Bloodhound)
AD Attack #3 – Extracting Password Hashes from the Ntds.dit File

To watch the AD Attacks webinar, please click here.

Learn how StealthDEFEND helps protect against AD attacks here.

Don’t miss a post! Subscribe to The Insider Threat Security Blog here:

Name

¿Podemos utilizar cookies para rastrear sus actividades? Nos tomamos muy en
Email*
serio su privacidad. Consulte nuestra política de privacidad para obtener detalles y
cualquier pregunta.
SUBSCRIBE

sí No
Jeff Warren
Jeff Warren is Stealthbits’ General Manager of Products. Jeff has held multiple roles within the
Technical Product Management group since joining the organization in 2010, initially building
Stealthbits’ SharePoint management offerings before shifting focus to the organization’s Data
Access Governance solution portfolio as a whole. Before joining Stealthbits – now part of Netwrix,
Jeff was a Software Engineer at Wall Street Network, a solutions provider specializing in GIS
software and custom SharePoint development.

Con un profundo conocimiento y experiencia en tecnología, gestión de productos y proyectos,


Jeff y sus equipos son responsables de diseñar y entregar las soluciones innovadoras de alta
calidad de Stealthbits.

Jeff tiene una licenciatura en sistemas de información de la Universidad de Delaware.

Anterior próximo
ARTÍCULOS RELACIONADOS

Comprensión del movimiento lateral y la escalada de privilegios

CUENTA DE CONFIANZA DEL SERVIDOR (UN)

Haciendo más difícil el reconocimiento interno con NetCease y SAMRi10

Instalación, con guración y ejecución de tareas con Covenant: la guía completa

Protección contra DCShadow

¿Qué es un DCShadow Attack y cómo defenderse de él?

Frameworks C2 de código abierto de próxima generación en un mundo post


PSEmpire: Covenant

Detección de persistencia a través de derechos extendidos de Active Directory

Movimiento lateral a través de Pass-the-Cache

¿Podemos utilizar cookies para rastrear sus actividades? Nos tomamos muy en
Abuso deprivacidad.
serio su la delegación restringida
Consulte basada
nuestra ende
política recursos
privacidad para obtener detalles y
cualquier pregunta.

sí No
Activo destacado

A Practitioner's Guide to Active Directory


Learn why Active Directory security should be a priority for your
organization and ways to mitigate against a data breach with this free
white paper!

Read more

Comments (7)

rohit
April 13, 2018 at 12:47 pm

Wow. Brilliant Blogs !!! Mind blown by precision and clarity of content

pn
June 3, 2018 at 3:10 pm

Pardon my newbie question:

With regards to the statement:


‘By issuing a command with Mimikatz, I can elevate my account to that of the
¿Podemos utilizar cookies para rastrear sus actividades? Nos tomamos muy en
Domain Administrator account.’
serio su privacidad. Consulte nuestra política de privacidad para obtener detalles y
cualquier pregunta.
The /ntlm:xxx hash you are providing in the command – whereis this obtained?
Is this the local hash of the client admin user account? Or is Jeff the Domain
sí No
Controller Admin. In case of latter, Jeff already has access to the Domain
Controller machine, so this is moot.

Jeff Warren
June 4, 2018 at 8:43 am

Good question, I didn’t cover that much in this post, but the NTLM
hash can be obtained using another Mimikatz command
sekurlsa::logonpasswords. The user logged in (Adam) must be a local
Administrator to obtain other password data stored on that machine,
which In this example would obtain a Domain Administrator (Jeff). So
with no domain privileges at all and only local privileges, Adam is able
to extract Jeff’s password hash and pass it to a domain controller to
obtain Domain Admin rights.

Dipankar
October 3, 2018 at 9:00 am

Which actions are achieved by performing a Pass-the-Hash attack on a domain-


joined computer?

Jeff Warren
October 9, 2018 at 9:48 am

The simplest way to look at it is anything that can be done from a


command prompt. That could be interacting with a system through
PowerShell or directly connecting to a SQL Database. There are very
few limits to what can be done using pass-the-hash.

¿Podemos utilizar cookies para rastrear sus actividades? Nos tomamos muy en
serio su privacidad. Consulte nuestra política de privacidad para obtener detalles y
Rick cualquier pregunta.
April 10, 2019 at 9:37 am

sí No
Pardon the noob question.
After you dump the hash on a windows host. What would you use to PtH?

Such as:
1. Administrator:500:d9cdsfhtysrdfgsdfgdsfgfds:gsdgdsfgsdgdsfgsdfcab

2.
Administrator:500:aad3bdfghjfghgdfghdfghdfghdfghdfgh:31ddfgdsfgdfgsdfgsdf
gsdfg:asdfasdfasdfasdf

3. Administrator:$NTLM$112233445566778899asdfasdfsadfasdfasdf:::::::

4.
Administrator:$NTLMv2$NTLMV2WORKGROUP$dsfgsdfgsfdgdsfgdsfgdsfgdsfgs
dfg$sdf1100000000000fdsgfdgsdfgsdfgdfg00000000000000200120

These are several samples I’ve gathers but after you dump the hash, which of
the listed hashes you’d use to PtH? I am looking at the difference between
NTLMV2 and NTLM.. I’m guessing the v2 is much stronger and harder to crash
the hash?

Great video, I’m understanding your article well, just not sure how you used to
PtH.. I saw that you used the NTLM: value to PtH?

Again, pardon the noob question.

Jeff Warren
April 11, 2019 at 9:20 am

In my example, I am getting the NTHash using Mimikatz and the


sekurlsa::logonpasswords command. It looks like you may be grabbing
your hashes through network authentication with a tool such as
Responder. I would recommend using Mimikatz to grab the hashes
directly off of the Windows system and using those for pth.
Alternatively, you can use tools like John the Ripper to crack the
hashes from Responder.
¿Podemos utilizar cookies para rastrear sus actividades? Nos tomamos muy en
serio su privacidad. Consulte nuestra política de privacidad para obtener detalles y
Leave a Reply
cualquier pregunta.

Your email address will not be published.


sí Required
No elds are marked *
Comment

Name *

Email *

Website

Save my name, email, and website in this browser for the next time I comment.

POST COMMENT

SUBSCRIBE

DON’T MISS A POST. SUBSCRIBE


TO THE BLOG!
Nombre

¿Podemos utilizar cookies para rastrear sus actividades? Nos tomamos muy en
Correo electrónico
serio su privacidad. Consulte nuestra política de privacidad para obtener detalles y
cualquier pregunta.
  You have read and agreed to our Privacy Policy

sí No
SUBMIT
200 Central Ave
Hawthorne, NJ 07506

201-447-9300

SOLUTIONS
Data Access Governance

Active Directory Security

Privileged Access Management

Database Security Solutions

COMPLIANCE
EU GDPR

HIPAA

ITAR

NYCRR 500

PCI

SOX

NIST

CCPA

PRODUCT
StealthAUDIT Management Platform

StealthDEFEND

Stealthbits Privileged Activity Manager

StealthINTERCEPT

StealthRECOVER

¿Podemos utilizar cookies para rastrear sus actividades? Nos tomamos muy en
MODULES
serio su privacidad. Consulte nuestra política de privacidad para obtener detalles y
StealthAUDIT Active Directory Permissionscualquier
Analyzer pregunta.
StealthINTERCEPT Enterprise Password Enforcer

Stealthbits Activity Monitor sí No

SOCIOS
SOCIOS
Socios tecnológicos

Compañeros de Canal

Conviértete en un compañero

Registrar una oportunidad

Portal de socios

EMPRESA
Sobre nosotros

Equipo de gestión

Carreras

Premios y Reseñas

Blog

Noticias

Cobertura mediática

Apoyo

Contáctenos

Solicite una demostración

Tienda de la empresa

© 2021 Stealthbits Technologies, Inc.

Política de privacidad

¿Podemos utilizar cookies para rastrear sus actividades? Nos tomamos muy en
serio su privacidad. Consulte nuestra política de privacidad para obtener detalles y
cualquier pregunta.

sí No

También podría gustarte