Creation of Hidden Shared Object File
Description
Identifies the creation of a hidden shared object (.so) file. Users can mark specific files as hidden simply by putting a "." as the first character in the file or folder name. Adversaries can use this to their advantage to hide files and folders on the system for persistence and defense evasion.
Query · eql
file where event.type == "creation" and file.name like~ ".*.so" and (
process.name in (
"sudo", "link", "find", "xargs", "install", "coreutils", "gzip", "bzip2", "mv", "ln", "busybox",
"bash", "zsh", "sh", "tcsh", "csh", "ksh", "fish", "mksh", "touch", "curl", "wget"
) or
process.name like ".*" or
process.executable like (
"./*", "/dev/shm/*", "/tmp/*", "/var/tmp/*", "/run/*", "/var/run/*", "/boot/*", "/sys/*",
"/lost+found/*", "/proc/*", "/var/mail/*", "/var/www/*", "/root/*", "/home/*"
)
) and
not (
process.executable like (
"/home/*/.opencode/bin/opencode", "/home/*/.nvm/*/bin/kilo", "/home/*/.vscode-server/*/server/node",
"/home/*/.local/share/containers/storage/overlay/*/opencode", "./usr/bin/podman",
"/usr/local/share/npm-global/lib/node_modules/opencode-ai/bin/.opencode", "/home/*/.aimee-code/bin/opencode",
"/root/.opencode/bin/opencode", "/home/*/.opencode/bin/.nfs*",
"/home/*/.vscode/extensions/kilocode.kilo-code-*/bin/kilo",
"/home/*/.vscode-server/extensions/kilocode.kilo-code-*/bin/kilo",
"/root/.vscode-server/extensions/kilocode.kilo-code-*/bin/kilo"
) or
file.name like ("._*", ".*-00000000.so") or
file.path like ("/home/*/.local/share/containers/storage/overlay/*", "/scratch/user/*/ZEBULON/CODE/.files-libLocal.so")
)