Skip to content

Commit 1272f12

Browse files
authored
Merge branch 'Pennyw0rth:main' into CVE-2025-33073
2 parents 7d3e48d + 864c88b commit 1272f12

209 files changed

Lines changed: 14153 additions & 6544 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ assignees: ''
77

88
---
99

10+
# ❗❗❗ Before filing this bug report, MAKE SURE you have already downloaded the newest version of NetExec from GitHub and installed it! Many issues have already been reported and fixed, _especially_ if you are running the native Kali version! Please delete this line before submitting your issue if you have done so.❗❗❗
11+
12+
13+
1014
**Describe the bug**
1115
A clear and concise description of what the bug is.
1216

@@ -30,8 +34,8 @@ If applicable, add screenshots to help explain your problem.
3034

3135
**NetExec info**
3236
- OS: [e.g. Kali]
33-
- Version of nxc: [e.g. v1.5.2]
34-
- Installed from: apt/github/pip/docker/...? Please try with latest release before openning an issue
37+
- Version of nxc: [e.g. v1.5.2] (run nxc --version and post the _exact_ string that is output)
38+
- Installed from: apt/github/pip/docker/...? Please try with latest release before opening an issue
3539

3640
**Additional context**
3741
Add any other context about the problem here.

.github/PULL_REQUEST_TEMPLATE/pull_request_template.md renamed to .github/PULL_REQUEST_TEMPLATE.md

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,35 @@
1-
---
2-
name: Pull request
3-
about: Update code to fix a bug or add an enhancement/feature
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
8-
---
91
## Description
102

113
Please include a summary of the change and which issue is fixed, or what the enhancement does.
12-
Please also include relevant motivation and context.
134
List any dependencies that are required for this change.
145

156
## Type of change
16-
Please delete options that are not relevant.
7+
Insert an "x" inside the brackets for relevant items (do not delete options)
8+
179
- [ ] Bug fix (non-breaking change which fixes an issue)
1810
- [ ] New feature (non-breaking change which adds functionality)
1911
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
12+
- [ ] Deprecation of feature or functionality
2013
- [ ] This change requires a documentation update
2114
- [ ] This requires a third party update (such as Impacket, Dploot, lsassy, etc)
2215

23-
## How Has This Been Tested?
24-
Please describe the tests that you ran to verify your changes (e2e, single commands, etc)
25-
Please also list any relevant details for your test configuration, such as your locally running machine Python version & OS, as well as the target(s) you tested against, including software versions
26-
27-
If you are using poetry, you can easily run tests via:
28-
`poetry run python tests/e2e_tests.py -t $TARGET -u $USER -p $PASSWORD`
29-
There are additional options like `--errors` to display ALL errors (some may not be failures), `--poetry` (output will include the poetry run prepended), `--line-num $START-$END $SINGLE` for only running a subset
16+
## Setup guide for the review
17+
Please provide guidance on what setup is needed to test the introduced changes, such as your locally running machine Python version & OS, as well as the target(s) you tested against, including software versions.
18+
In particular:
19+
- Bug Fix: Please provide a short description on how to trigger the bug, to make the bug reproducable for the reviewer.
20+
- Added Feature/Enhancement: Please specify what setup is needed in order to test the changes. E.g. is additional software needed? GPO changes required? Specific registry settings that need to be changed?
3021

3122
## Screenshots (if appropriate):
3223
Screenshots are always nice to have and can give a visual representation of the change.
3324
If appropriate include before and after screenshot(s) to show which results are to be expected.
3425

3526
## Checklist:
27+
Insert an "x" inside the brackets for completed and relevant items (do not delete options)
3628

3729
- [ ] I have ran Ruff against my changes (via poetry: `poetry run python -m ruff check . --preview`, use `--fix` to automatically fix what it can)
38-
- [ ] I have added or updated the tests/e2e_commands.txt file if necessary
30+
- [ ] I have added or updated the `tests/e2e_commands.txt` file if necessary (new modules or features are _required_ to be added to the e2e tests)
3931
- [ ] New and existing e2e tests pass locally with my changes
40-
- [ ] My code follows the style guidelines of this project (should be covered by Ruff above)
41-
- [ ] If reliant on third party dependencies, such as Impacket, dploot, lsassy, etc, I have linked the relevant PRs in those projects
32+
- [ ] If reliant on changes of third party dependencies, such as Impacket, dploot, lsassy, etc, I have linked the relevant PRs in those projects
4233
- [ ] I have performed a self-review of my own code
4334
- [ ] I have commented my code, particularly in hard-to-understand areas
4435
- [ ] I have made corresponding changes to the documentation (PR here: https://github.com/Pennyw0rth/NetExec-Wiki)

.github/workflows/build-binaries.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
matrix:
1212
os: [ubuntu-latest, macOS-latest, windows-latest]
13-
python-version: ["3.11"]
13+
python-version: ["3.13"]
1414
#python-version: ["3.8", "3.9", "3.10", "3.11"] # for binary builds we only need one version
1515
steps:
1616
- uses: actions/checkout@v4
@@ -20,18 +20,18 @@ jobs:
2020
python-version: ${{ matrix.python-version }}
2121
- name: Build Native Binary
2222
run: |
23-
pip install pyinstaller
23+
pip install pyinstaller pillow
2424
pip install .
2525
pyinstaller netexec.spec
2626
- name: Upload Windows Binary
2727
if: runner.os == 'windows'
28-
uses: actions/upload-artifact@v3
28+
uses: actions/upload-artifact@v4
2929
with:
3030
name: nxc.exe
3131
path: dist/nxc.exe
3232
- name: Upload Nix/OSx Binary
3333
if: runner.os != 'windows'
34-
uses: actions/upload-artifact@v3
34+
uses: actions/upload-artifact@v4
3535
with:
3636
name: nxc-${{ matrix.os }}
3737
path: dist/nxc

.github/workflows/build-zipapps.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
matrix:
1212
os: [ubuntu-latest, macOS-latest, windows-latest]
13-
python-version: ["3.8", "3.9", "3.10", "3.11"]
13+
python-version: ["3.10", "3.11", "3.12", "3.13"]
1414
steps:
1515
- uses: actions/checkout@v4
1616
- name: NetExec set up python on ${{ matrix.os }}
@@ -22,12 +22,12 @@ jobs:
2222
pip install shiv
2323
python build_collector.py
2424
- name: Upload nxc ZipApp
25-
uses: actions/upload-artifact@v3
25+
uses: actions/upload-artifact@v4
2626
with:
2727
name: nxc-zipapp-${{ matrix.os }}-${{ matrix.python-version }}
2828
path: bin/nxc
2929
- name: Upload nxcdb ZipApp
30-
uses: actions/upload-artifact@v3
30+
uses: actions/upload-artifact@v4
3131
with:
3232
name: nxcdb-zipapp-${{ matrix.os }}-${{ matrix.python-version }}
3333
path: bin/nxcdb

.github/workflows/lint.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ name: Lint Python code with ruff
44
on:
55
push:
66
workflow_dispatch:
7+
pull_request_review:
8+
types: [submitted]
79

810
jobs:
911
lint:
1012
runs-on: ubuntu-latest
1113
if:
12-
github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
14+
github.event_name == 'push' || github.event.review.state == 'APPROVED' || github.event_name == 'workflow_dispatch'
1315

1416
steps:
1517
- uses: actions/checkout@v4
@@ -19,7 +21,7 @@ jobs:
1921
- name: Set up Python
2022
uses: actions/setup-python@v5
2123
with:
22-
python-version: 3.11
24+
python-version: 3.13
2325
cache: poetry
2426
cache-dependency-path: poetry.lock
2527
- name: Install dependencies with dev group

.github/workflows/test.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@ on:
88
jobs:
99
build:
1010
name: Test for Py${{ matrix.python-version }}
11-
if: github.event.review.state == 'APPROVED'
11+
if: github.event.review.state == 'APPROVED' || github.event_name == 'workflow_dispatch'
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
max-parallel: 5
1515
matrix:
1616
os: [ubuntu-latest]
17-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
17+
python-version: ["3.10", "3.11", "3.12", "3.13"]
1818
steps:
1919
- uses: actions/checkout@v4
2020
- name: Install poetry
2121
run: |
2222
pipx install poetry
23+
poetry --version
24+
poetry env info
2325
- name: NetExec set up python ${{ matrix.python-version }} on ${{ matrix.os }}
2426
uses: actions/setup-python@v5
2527
with:
@@ -29,11 +31,6 @@ jobs:
2931
- name: Install with pipx
3032
run: |
3133
pipx install . --python python${{ matrix.python-version }}
32-
- name: Install poetry
33-
run: |
34-
pipx install poetry --python python${{ matrix.python-version }}
35-
poetry --version
36-
poetry env info
3734
- name: Install libraries with dev group
3835
run: |
3936
poetry install --with dev
@@ -48,4 +45,4 @@ jobs:
4845
poetry run netexec mssql 127.0.0.1
4946
poetry run netexec ssh 127.0.0.1
5047
poetry run netexec ftp 127.0.0.1
51-
poetry run netexec smb 127.0.0.1 -M veeam
48+
poetry run netexec smb 127.0.0.1 -L

Dockerfile

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,45 @@
1-
FROM python:3.11-slim
2-
1+
FROM python:3.13-slim-bookworm AS builder
32
ENV LANG=C.UTF-8
43
ENV LC_ALL=C.UTF-8
54
ENV PIP_NO_CACHE_DIR=off
65

76
WORKDIR /usr/src/netexec
87

9-
RUN apt-get update && \
10-
apt-get install -y libffi-dev libxml2-dev libxslt-dev libssl-dev openssl autoconf g++ python3-dev curl git
11-
RUN apt-get update
12-
# Get Rust
13-
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
14-
# Add .cargo/bin to PATH
8+
RUN apt update && \
9+
apt install -y --no-install-recommends \
10+
libffi-dev \
11+
libxml2-dev \
12+
libxslt-dev \
13+
libssl-dev \
14+
openssl \
15+
autoconf \
16+
g++ \
17+
python3-dev \
18+
curl \
19+
git \
20+
unzip \
21+
&& apt clean && rm -rf /var/lib/apt/lists/*
22+
23+
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain stable
1524
ENV PATH="/root/.cargo/bin:${PATH}"
16-
# Check cargo is visible
17-
RUN cargo --help
1825

19-
COPY . .
20-
RUN pip install .
26+
RUN git clone https://github.com/Pennyw0rth/NetExec.git . \
27+
&& pip install .
28+
29+
FROM python:3.13-slim-bookworm
30+
31+
ENV LANG=C.UTF-8
32+
ENV LC_ALL=C.UTF-8
33+
ENV PIP_NO_CACHE_DIR=off
34+
35+
WORKDIR /usr/src/netexec
36+
37+
COPY --from=builder /usr/local/lib/python3.13/site-packages /usr/local/lib/python3.13/site-packages
38+
COPY --from=builder /usr/local/bin /usr/local/bin
39+
40+
RUN apt update && \
41+
apt install -y --no-install-recommends \
42+
openssl \
43+
&& apt clean && rm -rf /var/lib/apt/lists/*
2144

22-
ENTRYPOINT [ "nxc" ]
45+
ENTRYPOINT ["nxc"]

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2023, Marshall-Hallenbeck, NeffIsBack, zblurx, mpgn_x64
1+
Copyright (c) 2025, Marshall-Hallenbeck, NeffIsBack, zblurx, mpgn_x64
22
Copyright (c) 2022, byt3bl33d3r
33
All rights reserved.
44

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Supported Python versions](https://img.shields.io/badge/python-3.8+-blue.svg)
1+
![Supported Python versions](https://img.shields.io/badge/python-3.10+-blue.svg)
22
[![Twitter](https://img.shields.io/twitter/follow/al3xn3ff?label=al3x_n3ff&style=social)](https://twitter.com/intent/follow?screen_name=al3x_n3ff)
33
[![Twitter](https://img.shields.io/twitter/follow/_zblurx?label=_zblurx&style=social)](https://twitter.com/intent/follow?screen_name=_zblurx)
44
[![Twitter](https://img.shields.io/twitter/follow/MJHallenbeck?label=MJHallenbeck&style=social)](https://twitter.com/intent/follow?screen_name=MJHallenbeck)
@@ -63,3 +63,5 @@ Awesome code contributors of NetExec:
6363
[![](https://github.com/NeffIsBack.png?size=50)](https://github.com/NeffIsBack)
6464
[![](https://github.com/Hackndo.png?size=50)](https://github.com/Hackndo)
6565
[![](https://github.com/XiaoliChan.png?size=50)](https://github.com/XiaoliChan)
66+
[![](https://github.com/termanix.png?size=50)](https://github.com/termanix)
67+
[![](https://github.com/Dfte.png?size=50)](https://github.com/Dfte)

netexec.spec

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,20 @@ a = Analysis(
2020
'aardwolf.commons.target',
2121
'aardwolf.protocol.x224.constants',
2222
'impacket.examples.secretsdump',
23+
'impacket.examples.regsecrets',
2324
'impacket.dcerpc.v5.lsat',
2425
'impacket.dcerpc.v5.transport',
2526
'impacket.dcerpc.v5.lsad',
2627
'impacket.dcerpc.v5.gkdi',
2728
'impacket.dcerpc.v5.rprn',
29+
'impacket.dcerpc.v5.even',
30+
'impacket.dcerpc.v5.even6',
2831
'impacket.dpapi_ng',
2932
'impacket.tds',
3033
'impacket.version',
3134
'impacket.ldap.ldap',
35+
'jwt',
3236
'nxc.connection',
33-
'nxc.servers.smb',
3437
'nxc.protocols.smb.wmiexec',
3538
'nxc.protocols.smb.atexec',
3639
'nxc.protocols.smb.smbexec',
@@ -41,13 +44,14 @@ a = Analysis(
4144
'nxc.parsers.ldap_results',
4245
'nxc.helpers.bash',
4346
'nxc.helpers.bloodhound',
47+
'nxc.helpers.even6_parser',
4448
'nxc.helpers.msada_guids',
4549
'nxc.helpers.ntlm_parser',
4650
'paramiko',
4751
'pypsrp.client',
48-
'pywerview.cli.helpers',
4952
'pylnk3',
5053
'pypykatz',
54+
'pyNfsClient',
5155
'masky',
5256
'msldap',
5357
'msldap.connection',
@@ -69,6 +73,7 @@ a = Analysis(
6973
'dploot.triage.masterkeys',
7074
'dploot.triage.mobaxterm',
7175
'dploot.triage.backupkey',
76+
'dploot.triage.wam',
7277
'dploot.triage.wifi',
7378
'dploot.triage.sccm',
7479
'dploot.lib.target',

0 commit comments

Comments
 (0)