Detection rules › Sigma

UNC4841 - Download Tar File From Untrusted Direct IP Via Wget

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

Detects execution of "wget" to download a "tar" from an IP address that doesn't have a trusted certificate. As seen used by UNC4841 during their Barracuda ESG zero day exploitation.

MITRE ATT&CK coverage

Telemetry coverage

PlatformRecord / event type
LinuxEvent ID 1: Process Create

Rule body

title: UNC4841 - Download Tar File From Untrusted Direct IP Via Wget
id: 23835beb-ec38-4e74-a5d4-b99af6684e91
status: test
description: Detects execution of "wget" to download a "tar" from an IP address that doesn't have a trusted certificate. As seen used by UNC4841 during their Barracuda ESG zero day exploitation.
references:
    - https://www.mandiant.com/resources/blog/barracuda-esg-exploited-globally
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-06-16
tags:
    - attack.stealth
    - attack.t1140
    - detection.emerging-threats
logsource:
    product: linux
    category: process_creation
detection:
    selection:
        Image|endswith: '/wget'
        CommandLine|re: 'https://[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
        CommandLine|contains: '--no-check-certificate'
        CommandLine|endswith: '.tar'
    filter_main_local_ips:
        # Note: Uncomment this filter if you want to exclude local IPs
        CommandLine|contains:
            - 'https://10.' # 10.0.0.0/8
            - 'https://192.168.' # 192.168.0.0/16
            - 'https://172.16.' # 172.16.0.0/12
            - 'https://172.17.'
            - 'https://172.18.'
            - 'https://172.19.'
            - 'https://172.20.'
            - 'https://172.21.'
            - 'https://172.22.'
            - 'https://172.23.'
            - 'https://172.24.'
            - 'https://172.25.'
            - 'https://172.26.'
            - 'https://172.27.'
            - 'https://172.28.'
            - 'https://172.29.'
            - 'https://172.30.'
            - 'https://172.31.'
            - 'https://127.' # 127.0.0.0/8
            - 'https://169.254.' # 169.254.0.0/16
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    Image|endswith: '/wget'
    CommandLine|re: 'https://[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
    CommandLine|contains: '--no-check-certificate'
    CommandLine|endswith: '.tar'

Stage 2: not filter_main_local_ips

filter_main_local_ips:
    CommandLine|contains:
        - 'https://10.'
        - 'https://192.168.'
        - 'https://172.16.'
        - 'https://172.17.'
        - 'https://172.18.'
        - 'https://172.19.'
        - 'https://172.20.'
        - 'https://172.21.'
        - 'https://172.22.'
        - 'https://172.23.'
        - 'https://172.24.'
        - 'https://172.25.'
        - 'https://172.26.'
        - 'https://172.27.'
        - 'https://172.28.'
        - 'https://172.29.'
        - 'https://172.30.'
        - 'https://172.31.'
        - 'https://127.'
        - 'https://169.254.'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
CommandLinematchhttps://10.excludes:CommandLine field:"CommandLine" value:"https://10."
CommandLinematchhttps://127.excludes:CommandLine field:"CommandLine" value:"https://127."
CommandLinematchhttps://169.254.excludes:CommandLine field:"CommandLine" value:"https://169.254."
CommandLinematchhttps://172.16.excludes:CommandLine field:"CommandLine" value:"https://172.16."
CommandLinematchhttps://172.17.excludes:CommandLine field:"CommandLine" value:"https://172.17."
CommandLinematchhttps://172.18.excludes:CommandLine field:"CommandLine" value:"https://172.18."
CommandLinematchhttps://172.19.excludes:CommandLine field:"CommandLine" value:"https://172.19."
CommandLinematchhttps://172.20.excludes:CommandLine field:"CommandLine" value:"https://172.20."
CommandLinematchhttps://172.21.excludes:CommandLine field:"CommandLine" value:"https://172.21."
CommandLinematchhttps://172.22.excludes:CommandLine field:"CommandLine" value:"https://172.22."
CommandLinematchhttps://172.23.excludes:CommandLine field:"CommandLine" value:"https://172.23."
CommandLinematchhttps://172.24.excludes:CommandLine field:"CommandLine" value:"https://172.24."
CommandLinematchhttps://172.25.excludes:CommandLine field:"CommandLine" value:"https://172.25."
CommandLinematchhttps://172.26.excludes:CommandLine field:"CommandLine" value:"https://172.26."
CommandLinematchhttps://172.27.excludes:CommandLine field:"CommandLine" value:"https://172.27."
CommandLinematchhttps://172.28.excludes:CommandLine field:"CommandLine" value:"https://172.28."
CommandLinematchhttps://172.29.excludes:CommandLine field:"CommandLine" value:"https://172.29."
CommandLinematchhttps://172.30.excludes:CommandLine field:"CommandLine" value:"https://172.30."
CommandLinematchhttps://172.31.excludes:CommandLine field:"CommandLine" value:"https://172.31."
CommandLinematchhttps://192.168.excludes:CommandLine field:"CommandLine" value:"https://192.168."

Indicators

These rows show field, operator, and value matches.