heroui logo

Linux Auditd Shell from Web or Application Directory

Splunk Security Content

View Source
Summary
Detects shell commands started with -c or shell invocations from web/application directories by correlating Linux auditd events (SYSCALL, EXECVE, CWD) within the same audit event. The rule matches common shells (ash, bash, dash, sh, zsh, busybox, etc.) and checks for -c usage or BusyBox --command usage, while requiring the working directory to be within web/application paths (e.g., /app, /srv/http, /var/www, nginx html dirs, Tomcat webapps). It joins SYSCALL, EXECVE, and CWD records by the same audit_event_id and extracts fields such as audit_event_id, pid, ppid, shell_path, command_arg, and working_directory. The detection filters out known legitimate cases (e.g., Nessus agent, Jenkins homes) and highlights suspicious activity where a web app host executes a shell command from within its web directory. The rule is intended for endpoint threat detection and aligns with Unix shell execution techniques (MITRE ATT&CK T1059.004) and supports correlation with HTTP/app logs for investigations.
Categories
  • Endpoint
Data Sources
  • Logon Session
  • Windows Registry
  • Script
  • Image
  • Web Credential
  • Named Pipe
  • Certificate
  • WMI
  • Cloud Storage
  • Internet Scan
  • Persona
  • Group
  • Application Log
  • Logon Session
  • Instance
  • Sensor Health
  • File
  • Drive
  • Snapshot
  • Command
  • Kernel
  • Driver
  • Volume
  • Cloud Service
  • Malware Repository
  • Network Share
  • Network Traffic
  • Scheduled Job
  • Firmware
  • Active Directory
  • Service
  • Domain Name
  • Process
  • Firewall
  • Module
ATT&CK Techniques
  • T1059.004
Created: 2026-11-23