CrackMapExec Get_netdomaincontroller (mssql)
This page contains detailed information about how to use the get_netdomaincontroller CME module while using the mssql protocol. For list of all CrackMapExec modules, visit the CrackMapExec Module Library.
Description
This module enumerates all Active Directory domain controllers by running the PowerSploit's PowerView.ps1 recon script.
The get_netdomaincontroller module is OPSEC safe. This means that it doesn't touch the disk and therefore shouldn't trigger any alarms.
Supported Protocols
- mssql
- smb
Module Source Code
Authors
Module Options
As you can see below, the get_netdomaincontroller module has one option:
# cme mssql -M get_netdomaincontroller --options
[*] get_netdomaincontroller module options:
INJECT If set to true, this allows PowerView to work over 'stealthier' execution methods which have non-interactive contexts (e.g. WMI) (default: True)
Note that this option is not required. If you want to change the default value, you can do so by appending -o INJECT=VALUE parameter to the command line.
Module Usage
This is how to use the get_netdomaincontroller module while using the mssql protocol:
Syntax:
# cme mssql <TARGET[s]> -u <USERNAME> -p <PASSWORD> -d <DOMAIN> -M get_netdomaincontroller
Admin user:
# cme mssql 10.0.5.1 -u sa -p P@ss123 -d . -M get_netdomaincontroller
# cme mssql 10.0.5.1 -u sa -p P@ss123 --local-auth -M get_netdomaincontroller
Normal user:
# cme mssql 10.0.5.1 -u dbuser -p P@ss123 -d target.corp -M get_netdomaincontroller
CrackMapExec also supports passing the hash, so you can specify NTLM hash instead of a password:
# cme mssql 10.0.5.1 -u sa -H 432b022dc22aa5afe884e986b8383ff2 -d . -M get_netdomaincontroller
# cme mssql 10.0.5.1 -u dbuser -H 432b022dc22aa5afe884e986b8383ff2 -d target.corp -M get_netdomaincontroller
The module can be run only on a single host. Running against multiple hosts is not supported.
References
Version
This page has been created based on CrackMapExec version 5.1.7dev.
Visit CrackMapExec Module Library for more modules.