-
Notifications
You must be signed in to change notification settings - Fork 575
Winrm relay newmodule #903
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?
Winrm relay newmodule #903
Conversation
Signed-off-by: overgrowncarrot1 <78485709+overgrowncarrot1@users.noreply.github.com>
Signed-off-by: overgrowncarrot1 <78485709+overgrowncarrot1@users.noreply.github.com>
Signed-off-by: overgrowncarrot1 <78485709+overgrowncarrot1@users.noreply.github.com>
Signed-off-by: overgrowncarrot1 <78485709+overgrowncarrot1@users.noreply.github.com>
Signed-off-by: overgrowncarrot1 <78485709+overgrowncarrot1@users.noreply.github.com>
Signed-off-by: overgrowncarrot1 <78485709+overgrowncarrot1@users.noreply.github.com>
Hi thanks for the PR. A few points:
|
Hey! I don't really understand what this module is used for to be honest. Why would you bother having such a module while you can already do something like:
Isn't too much ? |
Okay I got the idea, basically you are jumping from one host (the one from nxc winrm) to other ones using the invoke command. I like that but I'd rename the module to winrmjump or something as winrm_relay looks more like something related to ntlmrelayx and coerces. What do you think ? |
…dule to winrmjump
Sounds good, I changed then name to winrmjump, fixed the options and changed e2e_commands.txt. I was also able to update it to allow for -x or -X and REMOTE_COMMANDS. Will do a PR for wiki when time allows. |
Description
New module that relays from a target machine on a network to other machines. This allows for one connection to be made, and then information relayed utilizing new-pssession and scriptblock. This can be used to go from external to internal machines, one domain to another domain and so on. The script does a Reverse DNS lookup so kerberos is used, nothing needs to be added to trusted hosts. The script also allows for the user to change what domain to go to, what username / password to use and also what command to run on a target machine. Machines do need to be allowed to talk to each other over windows remote management. This means having servers utilized instead of host machines.
Type of change
Insert an "x" inside the brackets for relevant items (do not delete options)
Setup guide for the review
The attackers machine needs pywinrm, this is not installed by default on new Kali builds. Other than that, I used GOAD to show the winrm_relay.
In particular:
The script utilizes <hostname/ip>::::. As shown below with the options we are using an IP address (reverse DNS lookup happens), then on the other machine (kingslanding) we are utilizing the hostname.
nxc winrm 192.168.56.11 -u vagrant -p vagrant -M winrm_relay -o REMOTE='192.168.56.12:admin:P@ssw0rd!:ESSOS.LOCAL:whoami;hostname','KINGSLANDING:admin:P@ssw0rd!:sevenkingdoms.local:hostname'
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.
Wireshark shows other machine did not directly connect to kali, the commands were relayed to the other machine.
Checklist:
Insert an "x" inside the brackets for completed and relevant items (do not delete options)
poetry run python -m ruff check . --preview
, use--fix
to automatically fix what it can)tests/e2e_commands.txt
file if necessary (new modules or features are required to be added to the e2e tests)