macos community v1.0.0

mktemp

Create a temporary file or directory and return the file/directory name to stdout

📋 Live Preview
mktemp
mktemp

Sandbox: execFile · Timeout: 30s

Capabilities

security.defenseevasion.bypass

Examples

Generate payload directory (Shlayer): The following command can be used to generate a random directory name for staging payloads

export tmpDir="$(mktemp -d /tmp/XXXXXXXXXXXX)"

Generate directory based on template file (Bundlore): The following command can be used to generate a unique directory based on a template

TMP_DIR="mktemp -d -t x"

Detection

TypeRule / Indicator
other No detections at time of publishing

Documentation

The mktemp binary located in "usr/bin/mktemp" can generate unique directory or file names and has historically been used to generate unique payloads.

References