Detection rules › Sigma

Suspicious Package Installed - Linux

Status
test
Severity
medium
Log source
product linux, category process_creation
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects installation of suspicious packages using system installation utilities

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Suspicious Package Installed - Linux
id: 700fb7e8-2981-401c-8430-be58e189e741
status: test
description: Detects installation of suspicious packages using system installation utilities
references:
    - https://gist.githubusercontent.com/MichaelKoczwara/12faba9c061c12b5814b711166de8c2f/raw/e2068486692897b620c25fde1ea258c8218fe3d3/history.txt
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-01-03
modified: 2026-01-01
tags:
    - attack.defense-impairment
    - attack.t1553.004
logsource:
    product: linux
    category: process_creation
detection:
    selection_tool_apt:
        Image|endswith:
            - '/apt'
            - '/apt-get'
        CommandLine|contains: 'install'
    selection_tool_yum:
        Image|endswith: '/yum'
        CommandLine|contains:
            - 'localinstall'
            - 'install'
    selection_tool_rpm:
        Image|endswith: '/rpm'
        CommandLine|contains: '-i'
    selection_tool_dpkg:
        Image|endswith: '/dpkg'
        CommandLine|contains:
            - '--install'
            - '-i'
    selection_keyword:
        CommandLine|contains:
            # Add more suspicious packages
            - 'nmap'
            - ' nc'
            - 'netcat'
            - 'wireshark'
            - 'tshark'
            - 'openconnect'
            - 'proxychains'
            - 'socat'
    condition: 1 of selection_tool_* and selection_keyword
falsepositives:
    - Legitimate administration activities
level: medium

Stages and Predicates

Stage 0: condition

1 of selection_tool_* and selection_keyword

Stage 1: selection_tool_apt

selection_tool_apt:
    Image|endswith:
        - '/apt'
        - '/apt-get'
    CommandLine|contains: 'install'

Stage 2: selection_tool_yum

selection_tool_yum:
    Image|endswith: '/yum'
    CommandLine|contains:
        - 'localinstall'
        - 'install'

Stage 3: selection_tool_rpm

selection_tool_rpm:
    Image|endswith: '/rpm'
    CommandLine|contains: '-i'

Stage 4: selection_tool_dpkg

selection_tool_dpkg:
    Image|endswith: '/dpkg'
    CommandLine|contains:
        - '--install'
        - '-i'

Stage 5: selection_keyword

selection_keyword:
    CommandLine|contains:
        - 'nmap'
        - ' nc'
        - 'netcat'
        - 'wireshark'
        - 'tshark'
        - 'openconnect'
        - 'proxychains'
        - 'socat'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLinematch
  • nc
  • --install
  • -i
  • install
  • localinstall
  • netcat
  • nmap
  • openconnect
  • proxychains
  • socat
  • tshark
  • wireshark
Imageends_with
  • /apt
  • /apt-get
  • /dpkg
  • /rpm
  • /yum