Detection rules › Sigma

Linux Network Service Scanning Tools Execution

Status
test
Severity
low
Log source
product linux, category process_creation
Author
Alejandro Ortuno, oscd.community, Georg Lauenstein (sure[secure])
Source
github.com/SigmaHQ/sigma

Detects execution of network scanning and reconnaisance tools. These tools can be used for the enumeration of local or remote network services for example.

MITRE ATT&CK coverage

TacticTechniques
DiscoveryT1046 Network Service Discovery

Event coverage

Rule body yaml

title: Linux Network Service Scanning Tools Execution
id: 3e102cd9-a70d-4a7a-9508-403963092f31
status: test
description: Detects execution of network scanning and reconnaisance tools. These tools can be used for the enumeration of local or remote network services for example.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1046/T1046.md
    - https://github.com/projectdiscovery/naabu
    - https://github.com/Tib3rius/AutoRecon
author: Alejandro Ortuno, oscd.community, Georg Lauenstein (sure[secure])
date: 2020-10-21
modified: 2024-09-19
tags:
    - attack.discovery
    - attack.t1046
logsource:
    category: process_creation
    product: linux
detection:
    selection_netcat:
        Image|endswith:
            - '/nc'
            - '/ncat'
            - '/netcat'
            - '/socat'
    selection_network_scanning_tools:
        Image|endswith:
            - '/autorecon'
            - '/hping'
            - '/hping2'
            - '/hping3'
            - '/naabu'
            - '/nmap'
            - '/nping'
            - '/telnet' # could be wget, curl, ssh, many things. basically everything that is able to do network connection. consider fine tuning
            - '/zenmap'
    filter_main_netcat_listen_flag:
        CommandLine|contains:
            - ' --listen '
            - ' -l '
    condition: (selection_netcat and not filter_main_netcat_listen_flag) or selection_network_scanning_tools
falsepositives:
    - Legitimate administration activities
level: low

Stages and Predicates

Stage 0: condition

(selection_netcat and not filter_main_netcat_listen_flag) or selection_network_scanning_tools

Stage 1: selection_netcat

selection_netcat:
    Image|endswith:
        - '/nc'
        - '/ncat'
        - '/netcat'
        - '/socat'

Stage 2: not filter_main_netcat_listen_flag

filter_main_netcat_listen_flag:
    CommandLine|contains:
        - ' --listen '
        - ' -l '

Stage 3: selection_network_scanning_tools

selection_network_scanning_tools:
    Image|endswith:
        - '/autorecon'
        - '/hping'
        - '/hping2'
        - '/hping3'
        - '/naabu'
        - '/nmap'
        - '/nping'
        - '/telnet'
        - '/zenmap'

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
CommandLinematch --listen
CommandLinematch -l

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
Imageends_with
  • /autorecon
  • /hping
  • /hping2
  • /hping3
  • /naabu
  • /nc
  • /ncat
  • /netcat
  • /nmap
  • /nping
  • /socat
  • /telnet
  • /zenmap