2024-10-31 22:43:58 +01:00
|
|
|
# nxc wmi
|
|
|
|
|
|
|
|
> Pentest and exploit the Windows Management Instrumentation (WMI).
|
|
|
|
> More information: <https://www.netexec.wiki/wmi-protocol>.
|
|
|
|
|
2025-05-04 20:03:26 +03:00
|
|
|
- Search for valid credentials by trying out every combination in the specified lists of usernames and passwords:
|
2024-10-31 22:43:58 +01:00
|
|
|
|
2025-05-04 20:03:26 +03:00
|
|
|
`nxc wmi {{192.168.178.2}} {{[-u|--username]}} {{path/to/usernames.txt}} {{[-p|--password]}} {{path/to/passwords.txt}}`
|
2024-10-31 22:43:58 +01:00
|
|
|
|
|
|
|
- Authenticate via local authentication (as opposed to authenticating to the domain):
|
|
|
|
|
2025-05-04 20:03:26 +03:00
|
|
|
`nxc wmi {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} --local-auth`
|
2024-10-31 22:43:58 +01:00
|
|
|
|
|
|
|
- Issue the specified WMI query:
|
|
|
|
|
2025-05-04 20:03:26 +03:00
|
|
|
`nxc wmi {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} --wmi {{wmi_query}}`
|
2024-10-31 22:43:58 +01:00
|
|
|
|
|
|
|
- Execute the specified command on the targeted host:
|
|
|
|
|
2025-05-04 20:03:26 +03:00
|
|
|
`nxc wmi {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} -x {{command}}`
|