Detection rules › Splunk

Linux Auditd Hardware Addition Swapoff

Status
production
Severity
low
Group by
dest, proctitle
Author
Teoderick Contreras, Splunk
Source
github.com/splunk/security_content

The following analytic detects the execution of the "swapoff" command, which disables the swapping of paging devices on a Linux system. It leverages data from Endpoint Detection and Response (EDR) agents, focusing on process execution logs. This activity is significant because disabling swap can be a tactic used by malware, such as Awfulshred, to evade detection and hinder forensic analysis. If confirmed malicious, this action could allow an attacker to manipulate system memory management, potentially leading to data corruption, system instability, or evasion of memory-based detection mechanisms.

Known false positives

  • administrator may disable swapping of devices in a linux host. Filter is needed.

MITRE ATT&CK coverage

TacticTechniques
Initial Access

Telemetry coverage

Rule body

name: Linux Auditd Hardware Addition Swapoff
id: 5728bb16-1a0b-4b66-bce2-0074ac839770
version: 10
creation_date: '2023-02-08'
modification_date: '2026-05-13'
author: Teoderick Contreras, Splunk
status: production
type: Anomaly
description: The following analytic detects the execution of the "swapoff" command, which disables the swapping of paging devices on a Linux system. It leverages data from Endpoint Detection and Response (EDR) agents, focusing on process execution logs. This activity is significant because disabling swap can be a tactic used by malware, such as Awfulshred, to evade detection and hinder forensic analysis. If confirmed malicious, this action could allow an attacker to manipulate system memory management, potentially leading to data corruption, system instability, or evasion of memory-based detection mechanisms.
data_source:
    - Linux Auditd Execve
search: |-
    `linux_auditd` proctitle = "*swapoff*" AND proctitle = "*-a*"
      | rename host as dest
      | stats count min(_time) as firstTime max(_time) as lastTime
        BY proctitle dest
      | `security_content_ctime(firstTime)`
      | `security_content_ctime(lastTime)`
      | `linux_auditd_hardware_addition_swapoff_filter`
how_to_implement: To implement this detection, the process begins by ingesting auditd data, that consists of SYSCALL, TYPE, EXECVE and PROCTITLE events, which captures command-line executions and process details on Unix/Linux systems. These logs should be ingested and processed using Splunk Add-on for Unix and Linux (https://splunkbase.splunk.com/app/833), which is essential for correctly parsing and categorizing the data. The next step involves normalizing the field names  to match the field names set by the Splunk Common Information Model (CIM) to ensure consistency across different data sources and enhance the efficiency of data modeling. This approach enables effective monitoring and detection of linux endpoints where auditd is deployed
known_false_positives: administrator may disable swapping of devices in a linux host. Filter is needed.
references:
    - https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/overview-of-the-cyber-weapons-used-in-the-ukraine-russia-war/
intermediate_findings:
    entities:
        - field: dest
          type: system
          score: 20
          message: A [$proctitle$] event occurred on host - [$dest$] to disable the swapping of paging devices on a Linux system.
analytic_story:
    - Data Destruction
    - AwfulShred
    - Compromised Linux Host
    - Scattered Lapsus$ Hunters
asset_type: Endpoint
mitre_attack_id:
    - T1200
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint

Stages and Predicates

Stage 1: search

`linux_auditd` proctitle = "*swapoff*" AND proctitle = "*-a*"

Stage 2: rename

| rename host as dest

Stage 3: stats

| stats count min(_time) as firstTime max(_time) as lastTime
    BY proctitle dest

Stage 4: search

| `security_content_ctime(firstTime)`

Stage 5: search

| `security_content_ctime(lastTime)`

Stage 6: search

| `linux_auditd_hardware_addition_swapoff_filter`

Indicators

These rows show field, operator, and value matches.