HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

nxc winrm — Pentest and exploit Windows Remote Management (winrm). More information: <https://www.netexec.wiki/w

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandwindowsandnxc winrmexploitclipentestremote

Problem

How to use the nxc winrm command: Pentest and exploit Windows Remote Management (winrm). More information: <https://www.netexec.wiki/winrm-protocol/password-spraying>.

Solution

nxc winrm — Pentest and exploit Windows Remote Management (winrm). More information: <https://www.netexec.wiki/winrm-protocol/password-spraying>.

Search for valid credentials by trying out every combination in the specified lists of usernames and passwords:
nxc winrm {{192.168.178.2}} {{[-u|--username]}} {{path/to/usernames.txt}} {{[-p|--password]}} {{path/to/passwords.txt}}


Specify the domain to authenticate to (avoids an initial SMB connection):
nxc winrm {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} -d {{domain_name}}


Execute the specified command on the host:
nxc winrm {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} -x {{whoami}}


Execute the specified PowerShell command on the host as administrator using LAPS:
nxc winrm {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} --laps -X {{whoami}}

Code Snippets

Search for valid credentials by trying out every combination in the specified lists of usernames and passwords

nxc winrm {{192.168.178.2}} {{[-u|--username]}} {{path/to/usernames.txt}} {{[-p|--password]}} {{path/to/passwords.txt}}

Specify the domain to authenticate to (avoids an initial SMB connection)

nxc winrm {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} -d {{domain_name}}

Execute the specified command on the host

nxc winrm {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} -x {{whoami}}

Execute the specified PowerShell command on the host as administrator using LAPS

nxc winrm {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} --laps -X {{whoami}}

Context

tldr-pages: common/nxc winrm

Revisions (0)

No revisions yet.