linux-hidden-files

Searches the /tmp, /dev, /home directories and their subdirectories on a Linux system for hidden files and directories whose names start with a period (.). You can use this to detect files hidden by attackers during forensic analysis.

Command properties

PropertyValue
Command typeDriver query
Required permissionAdministrator
License usageCounted
Parallel executionNot supported
Distributed executionRuns on Data Node (mapper)

Syntax

linux-hidden-files

Output fields

FieldTypeDescription
file_pathstringAbsolute path of the file
file_namestringFile name
file_typestringFile type. file: regular file, directory: directory
permissionsstringPOSIX file permission string (e.g., rwxr-xr-x). Returns null if permissions cannot be read.
file_sizelongFile size (bytes)
file_ctimetimestampFile creation time
file_mtimetimestampLast modification time
file_atimetimestampLast access time
owner_readbooleanWhether the owner has read permission
owner_writebooleanWhether the owner has write permission
owner_executebooleanWhether the owner has execute permission
group_readbooleanWhether the group has read permission
group_writebooleanWhether the group has write permission
group_executebooleanWhether the group has execute permission
others_readbooleanWhether others have read permission
others_writebooleanWhether others have write permission
others_executebooleanWhether others have execute permission

Error codes

Parsing errors
Error codeMessageDescription
95040no-read-permissionExecuted without administrator privileges
Runtime errors

N/A

Description

The linux-hidden-files command recursively searches the /tmp, /dev, and /home directories for hidden files and directories whose names start with .. For each item found, it collects metadata including the file path, size, timestamps, and POSIX file permissions, and assigns them to output fields.

It follows symbolic links to read file attributes. If visiting a file fails (e.g., insufficient permissions), that file is skipped and the search continues.

This command requires administrator privileges. If privileges are insufficient, an error occurs at the parsing stage.

Examples

  1. Query hidden files

    linux-hidden-files
    

    Queries all hidden files and directories in the /tmp, /dev, and /home directories whose names start with ..

  2. Filter hidden files with execute permission

    linux-hidden-files
    | search file_type == "file" and owner_execute == true
    

    Filters only hidden files where the owner has execute permission.

  3. Query recently modified hidden files

    linux-hidden-files
    | search file_mtime >= ago("7d")
    | sort -file_mtime
    

    Queries hidden files modified within the last 7 days, sorted by modification time in descending order.