moving-laterally-with-netexec
Qué hace
Esta herramienta ayuda a probar y explorar redes de equipos, como las de las empresas. Comprueba si las credenciales (como nombres de usuario y contraseñas) funcionan en varios equipos, busca debilidades e incluso puede ejecutar comandos en equipos remotos, todo de forma controlada y segura.
Cuándo usarla
- ✓Cuando tienes permiso para probar la seguridad de una red y quieres ver a qué accesos te permiten llegar tus credenciales.
- ✓Para probar contraseñas en muchas cuentas sin bloquearlas rápidamente.
- ✓Para descubrir información sobre equipos y usuarios de una red.
Link de la skill
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/moving-laterally-with-netexec/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Comprueba si la contraseña 'Password123' funciona para el usuario 'admin' en todos los equipos de la red 192.168.1.0/24.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La herramienta se conecta a los equipos usando distintos métodos (protocolos) e intenta validar información o realizar tareas. Está diseñada para ser eficiente y registrar sus acciones, lo que ayuda a trazar rutas para acceder a otros sistemas.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Moving Laterally with NetExec
Authorized Use Only: This skill is for authorized penetration testing, red-team engagements, and educational labs only. NetExec authenticates to, executes code on, and extracts credentials from remote hosts. Running it against systems you do not own or lack explicit written authorization to test is illegal under computer-misuse laws (e.g. the US CFAA, UK Computer Misuse Act). Confirm scope and rules of engagement before use.
Overview
NetExec (nxc) is the actively maintained successor to CrackMapExec, a network-service swiss-army knife for assessing and exploiting Windows/Active Directory and Linux environments. It wraps Impacket and other libraries behind a unified CLI so an operator can authenticate against many hosts at once, validate harvested credentials, spray passwords, enumerate shares/users/policies, execute commands, and dump credentials — all while logging cleanly for reporting.
NetExec is protocol-oriented: every invocation starts with a protocol module. As of the 2025 releases it supports smb, winrm, mssql, ldap, ssh, ftp, wmi, rdp, vnc, and nfs. Command execution (-x/-X) is available on SMB, WINRM, SSH, MSSQL, WMI and (since summer 2025) RDP. A built-in module system (-M) adds capabilities such as LAPS retrieval, LSASS dumping via lsassy, BloodHound collection, and share spidering.
For lateral movement specifically, NetExec maps directly to MITRE ATT&CK T1021.002 (Remote Services: SMB/Windows Admin Shares): it authenticates over SMB (port 445), reaches ADMIN$/C$, and uses named-pipe or task-scheduler execution to run code on remote machines. The (Pwn3d!) marker in output signals that the supplied principal has local-admin code-execution rights on a host — the green light for lateral movement.
When to Use
- During an internal network penetration test after obtaining one or more valid credentials/hashes, to identify every host where those credentials grant admin access.
- To perform controlled password spraying against a domain while respecting lockout thresholds.
- To enumerate SMB shares, domain users, password policy, and loggedon sessions across a subnet in one sweep.
- To execute commands or dump SAM/LSA/NTDS credentials on authorized targets during post-exploitation.
- To collect BloodHound data or LAPS passwords using NetExec modules instead of separate tooling.
Prerequisites
- A Linux operator host (Kali/Parrot/Ubuntu). Install via pipx (recommended):
sudo apt install -y pipx git pipx ensurepath pipx install git+https://github.com/Pennyw0rth/NetExec # verify nxc --version nxc smb --help - Docker alternative:
git clone https://github.com/Pennyw0rth/NetExec cd NetExec docker build -t netexec . docker run --rm -it netexec smb --help - Network reachability to target ports (445/SMB, 5985-5986/WinRM, 389-636/LDAP, 1433/MSSQL).
- Valid credentials, NT hashes, or Kerberos tickets within an authorized scope.
- A signed rules-of-engagement document and knowledge of the account-lockout policy before spraying.
Objectives
- Validate harvested credentials across a host range and locate
(Pwn3d!)admin access. - Enumerate shares, users, and password policy over SMB and LDAP.
- Conduct lockout-safe password spraying with
--continue-on-success. - Execute commands on authorized hosts and select an appropriate
--exec-method. - Dump SAM, LSA, and NTDS credentials and collect them into the NetExec workspace.
- Drive AD attacks (Kerberoasting, ASREPRoast, BloodHound collection) through LDAP modules.
MITRE ATT&CK Mapping
| Technique ID | Official Name | How NetExec Implements It |
|---|---|---|
| T1021.002 | Remote Services: SMB/Windows Admin Shares | Authenticates over SMB to ADMIN$/C$ and executes code on remote hosts (-x, --exec-method) |
| T1110.003 | Brute Force: Password Spraying | One password against many accounts with --continue-on-success |
| T1003.002 | OS Credential Dumping: Security Account Manager | --sam dumps local SAM hashes |
| T1003.004 | OS Credential Dumping: LSA Secrets | --lsa dumps LSA secrets and cached credentials |
| T1003.006 | OS Credential Dumping: DCSync | --ntds via drsuapi extracts the domain database |
| T1558.003 | Steal or Forge Kerberos Tickets: Kerberoasting | ldap --kerberoasting requests service tickets |
…
Preguntas frecuentes
¿Necesito permiso para usar esta herramienta?
Sí, es fundamental contar con una autorización explícita y por escrito antes de usarla en cualquier red. Usarla sin permiso es ilegal.
¿Qué significa '(Pwn3d!)' en la salida?
Indica que las credenciales usadas tienen acceso de administrador en ese equipo, lo que supone un punto de entrada para seguir explorando la red.
¿Puedo usarla para robar contraseñas?
La herramienta puede extraer credenciales (hashes) de sistemas locales para analizarlas después, pero su uso principal es la prueba de seguridad autorizada y el trazado de accesos.
Detalles
Descripción original del autor
Use NetExec (nxc) to validate credentials, enumerate SMB shares/users/policy, password-spray safely across lockout thresholds, execute commands, and dump SAM/LSA/NTDS credentials across SMB, WinRM, LDAP, MSSQL, SSH, and other protocol modules. Use during authorized internal penetration tests to find lateral-movement paths after obtaining credentials or hashes, or to conduct controlled password spr
Popularidad
- Estrellas en GitHub
- 35 mil
- Posición en el ranking
- #8164
- Licencia
- Apache-2.0
- Actualizada
- 31/8/2026
Comentarios
- …
Más skills de este repositorio
abusing-dpapi-for-credential-access
35 milDa a tu agente de IA instrucciones listas para una tarea específica, para que la haga mejor y más rápido.
abusing-shadow-credentials-for-privesc
35 milEnseña a tu agente de IA a escribir textos claros y bien estructurados.
achieving-cmmc-level-2-compliance
35 milAyuda a tu agente a preparar un entorno para el cumplimiento de CMMC Nivel 2. Implementa los requisitos de seguridad y gestiona la documentación necesaria.
acquiring-disk-image-with-dd-and-dcfldd
35 milAyuda a tu agente a crear copias exactas de discos duros. Es útil para asegurar que no se pierda ni altere información durante las investigaciones.
Skills parecidas
reverse-engineer-anything
422 milAyuda a tu agente a revisar apps y paquetes ya publicados para explicar sus funciones, comparar versiones o guiar una reconstrucción, usando la herramienta REA.
1password
394 milAyuda a tu agente a instalar la CLI de 1Password, iniciar sesión y leer o inyectar secretos sin imprimir sus valores en el chat.
healthcheck
394 milAyuda a tu agente a auditar el ordenador o servidor que ejecuta OpenClaw en busca de riesgos de seguridad, como SSH, cortafuegos, actualizaciones y copias de seguridad, y después sugerir arreglos seguros.