CrackMapExec User-desc (ldap)


This page contains detailed information about how to use the user-desc CME module while using the ldap protocol. For list of all CrackMapExec modules, visit the CrackMapExec Module Library.

Description


Get user descriptions stored in Active Directory.

The user-desc module is OPSEC safe. This means that it doesn't touch the disk and therefore shouldn't trigger any alarms.

Supported Protocols


  • ldap

Module Source Code


Authors


Module Options


Here is a complete list of user-desc module options:

# cme ldap -M user-desc --options
[*] user-desc module options:

        LDAP_FILTER     Custom LDAP search filter (fully replaces the default search)
        DESC_FILTER     An additional seach filter for descriptions (supports wildcard *)
        DESC_INVERT     An additional seach filter for descriptions (shows non matching)
        USER_FILTER     An additional seach filter for usernames (supports wildcard *)
        USER_INVERT     An additional seach filter for usernames (shows non matching)
        KEYWORDS        Use a custom set of keywords (comma separated)
        ADD_KEYWORDS    Add additional keywords to the default set (comma separated)

Note that none of these options is required. If you want to change any of the default values, you can do so by adding, e.g. -o LDAP_FILTER=VALUE parameter to the command line.

Module Usage


This is how to use the user-desc module while using the ldap protocol:

Syntax:
# cme ldap <TARGET[s]> -u <USERNAME> -p <PASSWORD> -d <DOMAIN> -M user-desc

Local admin
# cme ldap 10.0.5.1 -u Administrator -p P@ss123 -d . -M user-desc
# cme ldap 10.0.5.1 -u Administrator -p P@ss123 --local-auth -M user-desc

Domain user
# cme ldap 10.0.5.1 -u bkpadmin -p P@ss123 -d target.corp -M user-desc

CrackMapExec also supports passing the hash, so you can specify NTLM hash instead of a password:

# cme ldap 10.0.5.1 -u Administrator -H 432b022dc22aa5afe884e986b8383ff2 -d . -M user-desc
# cme ldap 10.0.5.1 -u bkpadmin -H 432b022dc22aa5afe884e986b8383ff2 -d target.corp -M user-desc
The user-desc module can be also used against multiple hosts. Here's how to run it against multiple hosts:

# cme ldap target_list.txt -u Administrator -p P@ss123 -d . -M user-desc
# cme ldap 10.0.5.0/24 -u Administrator -p P@ss123 -d . -M user-desc
# cme ldap 10.0.5.1-100 -u Administrator -p P@ss123 -d . -M user-desc

Version


This page has been created based on CrackMapExec version 5.1.7dev.
Visit CrackMapExec Module Library for more modules.