mirror of
https://github.com/Pennyw0rth/NetExec.git
synced 2026-11-08 02:08:18 -10:00
Compare commits
17
Commits
main
...
windows-test
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77b3797da6 | ||
|
|
5e416d7b3e | ||
|
|
b565bed227 | ||
|
|
9c41c567b9 | ||
|
|
3fa07310c5 | ||
|
|
7b5ca88243 | ||
|
|
b77fc9d919 | ||
|
|
bb030122fe | ||
|
|
21e320af41 | ||
|
|
cf2c0a3b66 | ||
|
|
75ba2e2afd | ||
|
|
06e45dd23f | ||
|
|
a866ab825c | ||
|
|
6243163ad8 | ||
|
|
da344b3b5f | ||
|
|
eb8ceab063 | ||
|
|
a2507f85b0 |
No files matched your search
@@ -0,0 +1,179 @@
|
||||
name: NetExec Checker
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
uses: ./.github/workflows/lint.yml
|
||||
nxc-smb:
|
||||
runs-on: windows-latest
|
||||
needs: [lint]
|
||||
# technique stolen from @Hackndo my best friend for life <3
|
||||
steps:
|
||||
- name: Create new user
|
||||
run: |
|
||||
net user nxc Pwn3d!!! /add
|
||||
- name: Add to local admin
|
||||
run: |
|
||||
net localgroup Administrators nxc /add
|
||||
- name: Update registry key
|
||||
run: |
|
||||
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
|
||||
- name: 👾 Disable defender
|
||||
run: start-process -filepath powershell -ArgumentList '/c','Set-MpPreference -DisableRealtimeMonitoring $true' -verb RunAs
|
||||
shell: powershell
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install poetry
|
||||
run: |
|
||||
pipx install poetry --python python3.11
|
||||
poetry --version
|
||||
poetry env info
|
||||
- name: Install libraries without dev group
|
||||
run: |
|
||||
poetry install
|
||||
- name: Dumping sam
|
||||
run: |
|
||||
poetry run netexec smb %COMPUTERNAME% -u nxc -p Pwn3d!!! --sam
|
||||
- name: Dumping lsa
|
||||
run: |
|
||||
poetry run netexec smb %COMPUTERNAME% -u nxc -p Pwn3d!!! --lsa
|
||||
- name: Dumping dpapi
|
||||
run: |
|
||||
poetry run netexec smb %COMPUTERNAME% -u nxc -p Pwn3d!!! --dpapi
|
||||
- name: Dumping with lsassy
|
||||
run: |
|
||||
poetry run netexec smb %COMPUTERNAME% -u nxc -p Pwn3d!!! -M lsassy
|
||||
- name: Exec command
|
||||
run: |
|
||||
poetry run netexec smb %COMPUTERNAME% -u nxc -p Pwn3d!!! -x whoami --exec-method=smbexec
|
||||
poetry run netexec smb %COMPUTERNAME% -u nxc -p Pwn3d!!! -x whoami --exec-method=wmiexec
|
||||
poetry run netexec smb %COMPUTERNAME% -u nxc -p Pwn3d!!! -x whoami --exec-method=atexec
|
||||
poetry run netexec smb %COMPUTERNAME% -u nxc -p Pwn3d!!! -x whoami --exec-method=mmcexec
|
||||
- name: Dumping with procdump
|
||||
run: |
|
||||
poetry run netexec --verbose smb %COMPUTERNAME% %COMPUTERNAME% %COMPUTERNAME% -u nxc -p Pwn3d!!! -M procdump
|
||||
|
||||
nxc-winrm:
|
||||
runs-on: windows-latest
|
||||
needs: [lint]
|
||||
# technique stolen from @Hackndo my best friend for life <3
|
||||
steps:
|
||||
- name: Create new user
|
||||
run: |
|
||||
net user nxc Pwn3d!!! /add
|
||||
- name: Add to local admin
|
||||
run: |
|
||||
net localgroup Administrators nxc /add
|
||||
- name: Update registry key
|
||||
run: |
|
||||
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
|
||||
- name: Enable WinRM
|
||||
run: |
|
||||
winrm quickconfig -quiet
|
||||
- name: 👾 Disable defender
|
||||
run: start-process -filepath powershell -ArgumentList '/c','Set-MpPreference -DisableRealtimeMonitoring $true' -verb RunAs
|
||||
shell: powershell
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install poetry
|
||||
run: |
|
||||
pipx install poetry --python python3.11
|
||||
poetry --version
|
||||
poetry env info
|
||||
- name: Install libraries without dev group
|
||||
run: |
|
||||
poetry install
|
||||
- name: Dumping sam
|
||||
run: |
|
||||
poetry run netexec winrm 127.0.0.1 -u nxc -p Pwn3d!!! --sam
|
||||
- name: Dumping lsa
|
||||
run: |
|
||||
poetry run netexec winrm 127.0.0.1 -u nxc -p Pwn3d!!! --lsa
|
||||
- name: Exec command
|
||||
run: |
|
||||
poetry run netexec winrm 127.0.0.1 -u nxc -p Pwn3d!!! -x whoami
|
||||
|
||||
nxc-rdp:
|
||||
runs-on: windows-latest
|
||||
needs: [lint]
|
||||
# technique stolen from @Hackndo my best friend for life <3
|
||||
steps:
|
||||
- name: Create new user
|
||||
run: |
|
||||
net user nxc Pwn3d!!! /add
|
||||
- name: Add to local admin
|
||||
run: |
|
||||
net localgroup Administrators nxc /add
|
||||
- name: Update registry key
|
||||
run: |
|
||||
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
|
||||
- name: Update registry key rdo
|
||||
run: |
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
|
||||
- name: Open Firewall
|
||||
run: |
|
||||
netsh advfirewall firewall add rule name="Open Remote Desktop" protocol=TCP dir=in localport=3389 action=allow
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install poetry
|
||||
run: |
|
||||
pipx install poetry --python python3.11
|
||||
poetry --version
|
||||
poetry env info
|
||||
- name: Install libraries without dev group
|
||||
run: |
|
||||
poetry install
|
||||
- name: Checking rdp
|
||||
run: |
|
||||
poetry run netexec rdp 127.0.0.1
|
||||
- name: Checking auth
|
||||
run: |
|
||||
poetry run netexec rdp 127.0.0.1 -u nxc -p Pwn3d!!!
|
||||
|
||||
nxc-ssh:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [lint]
|
||||
# technique stolen from @Hackndo my best friend for life <3
|
||||
steps:
|
||||
- name: Enable ssh
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install openssh-server
|
||||
sudo systemctl status ssh
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install poetry
|
||||
run: |
|
||||
pipx install poetry --python python3.11
|
||||
poetry --version
|
||||
poetry env info
|
||||
- name: Install libraries without dev group
|
||||
run: |
|
||||
poetry install
|
||||
- name: Connection with user
|
||||
run: |
|
||||
poetry run netexec ssh 127.0.0.1
|
||||
@@ -1,14 +1,11 @@
|
||||
name: Lint Python code with ruff
|
||||
name: lint
|
||||
# Caching source: https://gist.github.com/gh640/233a6daf68e9e937115371c0ecd39c61?permalink_comment_id=4529233#gistcomment-4529233
|
||||
|
||||
on:
|
||||
push:
|
||||
on: [workflow_call]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
if:
|
||||
github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
Whitespace-only changes.
@@ -2,8 +2,6 @@ name: NetExec Tests
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request_review:
|
||||
types: [submitted]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -14,7 +12,7 @@ jobs:
|
||||
max-parallel: 5
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
||||
python-version: ["3.10", "3.11", "3.12"]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install poetry
|
||||
|
||||
@@ -78,6 +78,7 @@ class NXCModule:
|
||||
dump = True
|
||||
else:
|
||||
context.log.fail("Process lsass.exe error un dump, try with verbose")
|
||||
sys.exit(1)
|
||||
|
||||
if dump:
|
||||
regex = r"([A-Za-z0-9-]*.dmp)"
|
||||
|
||||
Reference in new issue
Block a user