CrackMapExec Enum_dns (smb)
This page contains detailed information about how to use the enum_dns CME module while using the smb protocol. For list of all CrackMapExec modules, visit the CrackMapExec Module Library.
Description
This module uses WMI to dump DNS information from an Active Directory DNS Server. It extracts MicrosoftDNS_ResourceRecord (complete zone information) from all found domains.
The enum_dns module is OPSEC safe. This means that it doesn't touch the disk and therefore shouldn't trigger any alarms.
Supported Protocols
- smb
Module Source Code
Authors
Module Options
As you can see below, the enum_dns module has one option:
# cme smb -M enum_dns --options
[*] enum_dns module options:
DOMAIN Domain to enumerate DNS for. Defaults to all zones.
Note that this option is not required. If you want to change the default value, you can do so by appending -o DOMAIN=VALUE parameter to the command line.
Module Usage
This is how to use the enum_dns module while using the smb protocol:
Syntax:
# cme smb <TARGET[s]> -u <USERNAME> -p <PASSWORD> -d <DOMAIN> -M enum_dns
Local admin:
# cme smb 10.0.5.1 -u Administrator -p P@ss123 -d . -M enum_dns
# cme smb 10.0.5.1 -u Administrator -p P@ss123 --local-auth -M enum_dns
Domain user:
# cme smb 10.0.5.1 -u bkpadmin -p P@ss123 -d target.corp -M enum_dns
CrackMapExec also supports passing the hash, so you can specify NTLM hash instead of a password:
# cme smb 10.0.5.1 -u Administrator -H 432b022dc22aa5afe884e986b8383ff2 -d . -M enum_dns
# cme smb 10.0.5.1 -u bkpadmin -H 432b022dc22aa5afe884e986b8383ff2 -d target.corp -M enum_dns
The enum_dns module can be also used against multiple hosts. Here's how to run it against multiple hosts:# cme smb target_list.txt -u Administrator -p P@ss123 -d . -M enum_dns
# cme smb 10.0.5.0/24 -u Administrator -p P@ss123 -d . -M enum_dns
# cme smb 10.0.5.1-100 -u Administrator -p P@ss123 -d . -M enum_dns
References
- https://docs.microsoft.com/en-us/windows/win32/dns/microsoftdns-zone
- https://docs.microsoft.com/en-us/windows/win32/dns/microsoftdns-resourcerecord
Version
This page has been created based on CrackMapExec version 5.1.7dev.
Visit CrackMapExec Module Library for more modules.