moving-laterally-with-netexec
Helps your agent test credentials and find paths to move within networks. It's useful for checking system security after gaining access.
What it does
This tool helps test and explore computer networks, like those in companies. It checks if credentials (like usernames and passwords) work on multiple computers, looks for weaknesses, and can even run commands on remote machines, all in a controlled and safe way.
When to use it
- ✓When you have permission to test a network's security and want to see where your credentials grant access.
- ✓To test passwords on many accounts without locking them out quickly.
- ✓To discover information about computers and users on a network.
Example of what to ask your AI
“Check if the password 'Password123' works for the user 'admin' on all computers in the 192.168.1.0/24 network.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool connects to computers using different methods (protocols) and tries to validate information or perform tasks. It's designed to be efficient and log its actions, helping to map paths for accessing other systems.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill moving-laterally-with-netexecOr download just the file:
curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/moving-laterally-with-netexec/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from 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 |
…
FAQ
Do I need permission to use this tool?
Yes, it is crucial to have explicit written authorization before using this tool on any network. Using it without permission is illegal.
What does '(Pwn3d!)' in the output mean?
This indicates that the credentials used have administrator access on that computer, which is an entry point for further network exploration.
Can I use this to steal passwords?
The tool can extract credentials (hashes) from local systems for later analysis, but its primary use is for authorized security testing and access mapping.
Details
Original description by the author
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
Popularity
- GitHub stars
- 35k
- Ranking position
- #6001
- License
- Apache-2.0
- Updated
- 8/31/2026
Comments
- …
More skills from this repository
abusing-dpapi-for-credential-access
Gives your AI agent ready-made instructions for a specific task, so it does it better and faster.
mukul975/Anthropic-Cybersecurity-Skills
abusing-shadow-credentials-for-privesc
Teaches your AI agent to write clear, well-structured text.
mukul975/Anthropic-Cybersecurity-Skills
achieving-cmmc-level-2-compliance
Helps your agent prepare an environment for CMMC Level 2 compliance. It implements security requirements and manages necessary documentation.
mukul975/Anthropic-Cybersecurity-Skills
acquiring-disk-image-with-dd-and-dcfldd
Helps your agent create exact copies of hard drives. This is useful for ensuring no information is lost or altered during investigations.
mukul975/Anthropic-Cybersecurity-Skills
Similar skills
dashboard-builder
Helps your agent create useful monitoring dashboards. It turns data into charts that answer important system questions.
affaan-m/ECC
dev-team
Simulates a collaborative development team where different roles respond to a problem together. It's useful for getting multiple perspectives without manually switching agents.
affaan-m/ECC
ecc-council
Has your agent convene a four-voice council for difficult decisions. It's useful when there are multiple good options and debate is needed before choosing.
affaan-m/ECC