Skip to content

Commit

Permalink
rename worflow run
Browse files Browse the repository at this point in the history
debug

debug

debug

debug

debug

debug

Update windows-run.yml

Signed-off-by: mpgn <[email protected]>

debug

debug

debug

debug

debug

debug

debug

debug

debug
  • Loading branch information
mpgn authored Jun 19, 2024
1 parent 6243163 commit a866ab8
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 14 deletions.
File renamed without changes.
File renamed without changes.
7 changes: 2 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Empty file added .github/workflows/master.yml
Empty file.
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: NetExec Tests

on:
workflow_dispatch:
pull_request_review:
types: [submitted]

jobs:
build:
Expand Down
71 changes: 64 additions & 7 deletions .github/workflows/windows-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ on:
workflow_dispatch:

jobs:
test:
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
Expand Down Expand Up @@ -35,10 +38,64 @@ jobs:
- name: Install libraries without dev group
run: |
poetry install
- name: Dumping some credzzzzz
- name: Dumping sam
run: |
poetry run netexec smb 127.0.0.1 -u nxc -p Pwn3d!!! --sam
poetry run netexec smb 127.0.0.1 -u nxc -p Pwn3d!!! --lsa
poetry run netexec smb 127.0.0.1 -u nxc -p Pwn3d!!! --dpapi
poetry run netexec smb 127.0.0.1 -u nxc -p Pwn3d!!! -M lsassy
poetry run netexec smb 127.0.0.1 -u nxc -p Pwn3d!!! -M procdump
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: 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 python${{ matrix.python-version }}
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
1 change: 1 addition & 0 deletions nxc/modules/procdump.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def on_admin_login(self, context, connection):
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)"
Expand Down

0 comments on commit a866ab8

Please sign in to comment.