Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ToolExec Module #567

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

KriyosArcane
Copy link

@KriyosArcane KriyosArcane commented Feb 13, 2025

Description

This tool is designed for CTFs and competitions that do not require OPSEC or any kind of restrictions. It downloads tools to your local directory at '/home/$USER/.nxc/logs/Tools' and transfer to the target. It checks if the tools exists either on local or target. Added MD5 check as suggested by @Marshall-Hallenbeck .Also added exec option to not even need to get shell at all. Do your enum, get your tools, execute them and you are done!
Motivation came from CPTC :D. Just wanted quickly have tools to continue the pentest without trying to find them online and download. Used to have a pingcastle option but decided to leave that a seperate module on its own so people can find it easily (working on that module aswell).

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes (e2e, single commands, etc)
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
Tested against various HackTheBox boxes. Options were tested as single commands
If you are using poetry, you can easily run tests via:
poetry run python tests/e2e_tests.py -t $TARGET -u $USER -p $PASSWORD
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

Screenshots (if appropriate):

Screenshots are always nice to have and can give a visual representation of the change.
If appropriate include before and after screenshot(s) to show which results are to be expected.
250213_16h40m53s_screenshot
250213_16h47m50s_screenshot
250213_16h46m48s_screenshot

Checklist:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant