跳到正文
Skillpedia
安全35k · #8164

moving-laterally-with-netexec

它能做什么

这个工具可以帮你测试和探索计算机网络,比如公司里的网络。它会检查凭据(比如用户名和密码)能否在多台计算机上通过验证,寻找安全弱点,甚至可以在远程计算机上运行命令,整个过程都是受控且安全的。

适用场景

  • ✓当你获得了测试网络安全的授权,并想看看你的凭据能在哪些地方访问时。
  • ✓想在不快速触发账户锁定的情况下,测试多个账户的密码时。
  • ✓想了解网络中计算机和用户的相关信息时。

技能链接

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/moving-laterally-with-netexec/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/moving-laterally-with-netexec/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“检查用户名“admin”的密码“Password123”能否在 192.168.1.0/24 网络中的所有计算机上通过验证。”

每周 5 个新技能,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!)”是什么意思?

这表示你所使用的凭据在该计算机上拥有管理员权限,这是进一步探索网络的一个入口。

我能用它来窃取密码吗?

这个工具可以从本地系统中提取凭据(哈希值)以供后续分析,但它的主要用途是获得授权的安全测试和访问路径梳理。

详情

作者的原始描述

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

repo: mukul975/Anthropic-Cybersecurity-Skills

热度

GitHub 星标
35k
排名
#8164
许可证
Apache-2.0
更新时间
2026/8/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能