dploot.triage.cng missing from hiddenimports in netexec.spec causes SMB protocol to fail in compiled binary
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python
- Domain
- build-system
Research direction
The missing module is imported at line 66 of nxc/protocols/smb.py, and the hiddenimports list in netexec.spec is where the dploot.triage.* entries live. Read that list to see which submodules are already present, then rebuild with PyInstaller and run the SMB protocol import to confirm the ModuleNotFoundError is gone. Done means the compiled binary loads the SMB module and nxc smb HOST -u USER -p PASS --users runs without that error.
Written by the indexing model from the issue text.
Description
Describe the bug
When building NetExec from source using PyInstaller, the compiled binary fails to load the SMB protocol due to a missing dploot.triage.cng submodule, even though other dploot.triage.* submodules are already listed in hiddenimports in netexec.spec.
To Reproduce
Command: nxc smb HOST -u USER -p PASS --users
Resulted in:
Traceback (most recent call last):
File "netexec.py"
File "nxc/protocols/smb.py", line 66, in <module>
from dploot.triage.cng import CngTriage
ModuleNotFoundError: No module named 'dploot.triage.cng'
[PYI-194271:ERROR] Failed to execute script 'netexec' due to unhandled exception!
Expected behavior
SMB protocol loads successfully without import errors.
Root Cause
dploot.triage.cng is imported in smb.py but missing from hiddenimports in netexec.spec. Other dploot.triage.* submodules are already listed, but cng was not included.
Fix
Add 'dploot.triage.cng' to the hiddenimports list in netexec.spec:
'dploot',
'dploot.triage',
'dploot.triage.cng',
'dploot.triage.rdg',
.....
Suggested long-term fix
Replace manual submodule entries with collect_all in netexec.spec to avoid recurring issues as new submodules are added:
from PyInstaller.utils.hooks import collect_all
dploot_datas, dploot_binaries, dploot_hiddenimports = collect_all("dploot")
NetExec info
- OS: Kali Linux
- Version of nxc: 1.5.1 - Yippie-Ki-Yay - af454118 - 273
- Installed from: GitHub source, built manually with PyInstaller 6.19.0
- Python: 3.12.3
- Dominant language
- Python
- Stars
- 6k
- Forks
- 803
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 23
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Pennyw0rth/NetExec
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Pennyw0rth/NetExec#1544 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Pennyw0rth/NetExec#1542 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 22/100
Pennyw0rth/NetExec#1502 · 1 reaction ·
Maintainers usually reply within 1 day
-
Speed improvements tracking (load time, exec waits, Kerberos)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 5/5 Over a week Newbie friendliness 12/100
Pennyw0rth/NetExec#1478 ·
Maintainers usually reply within 1 day
-
Users-export flag does not honor active-users flagPossibly taken @H1DroZz claimed this 287 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 32/100
Pennyw0rth/NetExec#1458 · 3 comments ·
Maintainers usually reply within 1 day
All issues in Pennyw0rth/NetExec
Similar issues
-
bug docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ActivityWatch/docs#223 ·
-
[Bug]: OpenCode v2 skips an assistant message that gains text after an earlier capturePossibly taken @jianyx1 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
volcengine/OpenViking#8354 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ARTPARK-SAHAI-ORG/calibrate-frontend#842 ·
Maintainers usually reply within 1 day
-
comp/tools P2 tool/skills type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#159541 ·
Maintainers usually reply within 1 day