-
Notifications
You must be signed in to change notification settings - Fork 603
Ephemeral module #924
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
base: main
Are you sure you want to change the base?
Ephemeral module #924
Conversation
|
Very cool, thanks for the PR. It looks like the tests run the module without the options, can you add in running it with a command (just like |
Added, I put a script in there with 3 simple commands and updated the e2e_commands.txt file to show options with said script |
|
Nice one! |
This is to ensure reliability, I noticed that without another thread we could not get data back reliably in real time. The other thread is to ensure that output comes back to the user in a reliable fashion without affecting netexec execution. I was also looking at integrating a kill-switch with it. For instance, utilizing the public key of a user it is sent across and those goes against the users private key, as long as both are good information continues to be sent. This is to ensure that during script, a MITM cannot happen, again that is something I was looking at with a true or false KILLSWITCH=TRUE in options and mostly just for red team operations, the other thread would be needed for that. |
I can see why you would like to have a life feed of the output of the execution, but i am not sure if that is the way to go. NetExec is designed to have synchronous execution per host. Adding threads inside the protocol thread can have a bunch of unwanted side effects such as race conditions in NetExec, hanging threads that result in NetExec not finishing etc. Usually you would execute a command, wait until the command has finished, retrieve the output of that command and than format/print the result via the nxc_logger. Imo we shouldn't introduce yet another thread just for asynchronous output, which could heavily mess influence other parts of NetExec as a side effect. A few other notes:
|
Got rid of thread, made changes requested Signed-off-by: Ryan Yager <[email protected]>
|
|
Sorry it took so long, work, however, I have updated the ephermal.py to not use threads. |
Description
SSH module that allows for commands to be ran in Linux memory.
Type of change
Insert an "x" inside the brackets for relevant items (do not delete options)
Setup guide for the review
Ubuntu machine with ssh enabled
Screenshots (if appropriate):
I know the turtle is ugly, the rest of it looks fine just wanted to show it can run LinPeas also (or other scripts) in memory.
Checklist:
Insert an "x" inside the brackets for completed and relevant items (do not delete options)
poetry run python -m ruff check . --preview, use--fixto automatically fix what it can)tests/e2e_commands.txtfile if necessary (new modules or features are required to be added to the e2e tests)