Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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 subsetScreenshots (if appropriate):
Screenshots are always nice to have and can give a visual representation of the change.
![250213_16h40m53s_screenshot](https://private-user-images.githubusercontent.com/60072023/413076821-583d933c-79b7-422d-960c-e9e1fbb26260.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NzkxMzQsIm5iZiI6MTczOTU3ODgzNCwicGF0aCI6Ii82MDA3MjAyMy80MTMwNzY4MjEtNTgzZDkzM2MtNzliNy00MjJkLTk2MGMtZTllMWZiYjI2MjYwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAwMjAzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJiM2JiN2VkYjc3N2NkMzA0Y2ExM2FmMGFjNzA3NTU0YzdlYmYwNDNjZDUzNTMwZTIzZWY5M2ZiYjRiMzc2ZWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Hg3fh2XsXBNLz-4w8cdBgeTgImhInJV-W0uRNZeiWRA)
![250213_16h47m50s_screenshot](https://private-user-images.githubusercontent.com/60072023/413076544-af4a9553-a128-4a07-ab30-22d7113cf28d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NzkxMzQsIm5iZiI6MTczOTU3ODgzNCwicGF0aCI6Ii82MDA3MjAyMy80MTMwNzY1NDQtYWY0YTk1NTMtYTEyOC00YTA3LWFiMzAtMjJkNzExM2NmMjhkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAwMjAzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVkMGFmOTlhZjcyM2MwZmJmODQzZWU5YzQxYTE1Njc4NTMxNTg2NjhiNDZkZWI2NDgwODkwMzg1ZDgyYzY0MjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.GxRsdTE061ub9tQkfD5lIoiia0TOYlH1yajuixcmQYs)
![250213_16h46m48s_screenshot](https://private-user-images.githubusercontent.com/60072023/413077566-1b22eaf5-9c35-487d-a75f-aca698ff23de.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NzkxMzQsIm5iZiI6MTczOTU3ODgzNCwicGF0aCI6Ii82MDA3MjAyMy80MTMwNzc1NjYtMWIyMmVhZjUtOWMzNS00ODdkLWE3NWYtYWNhNjk4ZmYyM2RlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAwMjAzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNkZjAwMGIwNzZiZWMwMTkwY2ZmYjEwOTkwNjBiMzhiZTkyMWI1MmZiYmMxM2U1MjhlOGYyYmFhNjVlMWE5MTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Bq8BQavOVUum8P8_t8ovpNis7SwhHgVm4Tha-bjNShQ)
If appropriate include before and after screenshot(s) to show which results are to be expected.
Checklist:
poetry run python -m ruff check . --preview
, use--fix
to automatically fix what it can)