moving-laterally-with-netexec
यह क्या करती है
यह टूल कंपनियों जैसे कंप्यूटर नेटवर्क को टेस्ट और समझने में मदद करता है। यह जाँचता है कि क्रेडेंशियल (जैसे यूज़रनेम और पासवर्ड) कई कंप्यूटरों पर काम करते हैं या नहीं, कमज़ोरियाँ ढूँढता है, और दूर के मशीनों पर कमांड भी चला सकता है, वह भी एक नियंत्रित और सुरक्षित तरीके से।
कब इस्तेमाल करें
- ✓जब आपके पास किसी नेटवर्क की सुरक्षा टेस्ट करने की अनुमति हो और आप देखना चाहते हों कि आपके क्रेडेंशियल कहाँ-कहाँ एक्सेस दिलाते हैं।
- ✓कई अकाउंट्स पर जल्दी लॉक हुए बिना पासवर्ड टेस्ट करने के लिए।
- ✓नेटवर्क पर कंप्यूटरों और यूज़र्स के बारे में जानकारी खोजने के लिए।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/moving-laterally-with-netexec/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“जाँचो कि क्या पासवर्ड 'Password123' यूज़र 'admin' के लिए 192.168.1.0/24 नेटवर्क के सभी कंप्यूटरों पर काम करता है।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
टूल अलग-अलग तरीकों (प्रोटोकॉल) से कंप्यूटरों से जुड़ता है और जानकारी की पुष्टि करने या काम करने की कोशिश करता है। यह कुशलता से काम करने और अपनी गतिविधियों को लॉग करने के लिए बनाया गया है, जिससे दूसरे सिस्टम तक पहुँच के रास्ते समझने में मदद मिलती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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 |
…
अक्सर पूछे जाने वाले सवाल
क्या इस टूल को इस्तेमाल करने के लिए अनुमति चाहिए?
हाँ, किसी भी नेटवर्क पर इस टूल को इस्तेमाल करने से पहले स्पष्ट लिखित अनुमति होना बहुत ज़रूरी है। बिना अनुमति इसे इस्तेमाल करना गैरकानूनी है।
आउटपुट में '(Pwn3d!)' का क्या मतलब है?
इसका मतलब है कि जो क्रेडेंशियल इस्तेमाल हुए हैं, उनके पास उस कंप्यूटर पर एडमिनिस्ट्रेटर एक्सेस है, जो आगे नेटवर्क खोजने का एंट्री पॉइंट बन सकता है।
क्या इसे पासवर्ड चुराने के लिए इस्तेमाल कर सकते हैं?
टूल लोकल सिस्टम से क्रेडेंशियल (hashes) निकाल सकता है ताकि बाद में उनका विश्लेषण हो सके, लेकिन इसका मुख्य उपयोग अधिकृत सिक्योरिटी टेस्टिंग और एक्सेस मैपिंग के लिए है।
जानकारी
लेखक का मूल विवरण
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
लोकप्रियता
- GitHub स्टार
- 35k
- रैंकिंग में स्थान
- #8164
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 31/8/2026
कमेंट
- …
इस repository की और skills
abusing-dpapi-for-credential-access
35kआपके AI एजेंट को किसी खास काम के लिए तैयार instructions देता है, ताकि वह उसे बेहतर और तेज़ी से कर सके।
abusing-shadow-credentials-for-privesc
35kआपके AI एजेंट को साफ़ और अच्छी तरह से व्यवस्थित लिखना सिखाता है।
achieving-cmmc-level-2-compliance
35kयह आपके एजेंट को CMMC Level 2 compliance के लिए environment तैयार करने में मदद करता है। यह security requirements लागू करता है और ज़रूरी documentation संभालता है।
acquiring-disk-image-with-dd-and-dcfldd
35kआपके एजेंट को hard drives की exact copies बनाने में मदद करता है। जाँच के दौरान किसी भी जानकारी के खोने या बदलने से बचाने के लिए यह उपयोगी है।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।