Detection rules › Sigma

DNS Query To AzureWebsites.NET By Non-Browser Process

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

Detects a DNS query by a non browser process on the system to "azurewebsites.net". The latter was often used by threat actors as a malware hosting and exfiltration site.

Known false positives

  • Likely with other browser software. Apply additional filters for any other browsers you might use.

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 22: DNSEvent (DNS query)

Rule body

title: DNS Query To AzureWebsites.NET By Non-Browser Process
id: e043f529-8514-4205-8ab0-7f7d2927b400
related:
    - id: 5c80b618-0dbb-46e6-acbb-03d90bcb6d83
      type: derived
status: test
description: |
    Detects a DNS query by a non browser process on the system to "azurewebsites.net". The latter was often used by threat actors as a malware hosting and exfiltration site.
references:
    - https://www.sentinelone.com/labs/wip26-espionage-threat-actors-abuse-cloud-infrastructure-in-targeted-telco-attacks/
    - https://symantec-enterprise-blogs.security.com/threat-intelligence/harvester-new-apt-attacks-asia
    - https://www.ptsecurity.com/ww-en/analytics/pt-esc-threat-intelligence/higaisa-or-winnti-apt-41-backdoors-old-and-new/
    - https://intezer.com/blog/research/how-we-escaped-docker-in-azure-functions/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2024-06-24
tags:
    - attack.command-and-control
    - attack.t1219.002
logsource:
    product: windows
    category: dns_query
detection:
    selection:
        QueryName|endswith: 'azurewebsites.net'
    filter_optional_chrome:
        Image:
            - 'C:\Program Files\Google\Chrome\Application\chrome.exe'
            - 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'
    filter_optional_firefox:
        Image:
            - 'C:\Program Files\Mozilla Firefox\firefox.exe'
            - 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'
    filter_optional_ie:
        Image:
            - 'C:\Program Files (x86)\Internet Explorer\iexplore.exe'
            - 'C:\Program Files\Internet Explorer\iexplore.exe'
    filter_optional_edge_1:
        - Image|startswith: 'C:\Program Files (x86)\Microsoft\EdgeWebView\Application\'
        - Image|endswith: '\WindowsApps\MicrosoftEdge.exe'
        - Image:
              - 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe'
              - 'C:\Program Files\Microsoft\Edge\Application\msedge.exe'
    filter_optional_edge_2:
        Image|startswith:
            - 'C:\Program Files (x86)\Microsoft\EdgeCore\'
            - 'C:\Program Files\Microsoft\EdgeCore\'
        Image|endswith:
            - '\msedge.exe'
            - '\msedgewebview2.exe'
    filter_optional_safari:
        Image|endswith: '\safari.exe'
    filter_optional_defender:
        Image|endswith:
            - '\MsMpEng.exe' # Microsoft Defender executable
            - '\MsSense.exe' # Windows Defender Advanced Threat Protection Service Executable
    filter_optional_brave:
        Image|endswith: '\brave.exe'
        Image|startswith: 'C:\Program Files\BraveSoftware\'
    filter_optional_maxthon:
        Image|contains: '\AppData\Local\Maxthon\'
        Image|endswith: '\maxthon.exe'
    filter_optional_opera:
        Image|contains: '\AppData\Local\Programs\Opera\'
        Image|endswith: '\opera.exe'
    filter_optional_seamonkey:
        Image|startswith:
            - 'C:\Program Files\SeaMonkey\'
            - 'C:\Program Files (x86)\SeaMonkey\'
        Image|endswith: '\seamonkey.exe'
    filter_optional_vivaldi:
        Image|contains: '\AppData\Local\Vivaldi\'
        Image|endswith: '\vivaldi.exe'
    filter_optional_whale:
        Image|startswith:
            - 'C:\Program Files\Naver\Naver Whale\'
            - 'C:\Program Files (x86)\Naver\Naver Whale\'
        Image|endswith: '\whale.exe'
    filter_optional_tor:
        Image|contains: '\Tor Browser\'
    filter_optional_whaterfox:
        Image|startswith:
            - 'C:\Program Files\Waterfox\'
            - 'C:\Program Files (x86)\Waterfox\'
        Image|endswith: '\Waterfox.exe'
    filter_optional_midori:
        Image|contains: '\AppData\Local\Programs\midori-ng\'
        Image|endswith: '\Midori Next Generation.exe'
    filter_optional_slimbrowser:
        Image|startswith:
            - 'C:\Program Files\SlimBrowser\'
            - 'C:\Program Files (x86)\SlimBrowser\'
        Image|endswith: '\slimbrowser.exe'
    filter_optional_flock:
        Image|contains: '\AppData\Local\Flock\'
        Image|endswith: '\Flock.exe'
    filter_optional_phoebe:
        Image|contains: '\AppData\Local\Phoebe\'
        Image|endswith: '\Phoebe.exe'
    filter_optional_falkon:
        Image|startswith:
            - 'C:\Program Files\Falkon\'
            - 'C:\Program Files (x86)\Falkon\'
        Image|endswith: '\falkon.exe'
    filter_optional_avant:
        Image|startswith:
            - 'C:\Program Files (x86)\Avant Browser\'
            - 'C:\Program Files\Avant Browser\'
        Image|endswith: '\avant.exe'
    condition: selection and not 1 of filter_optional_*
falsepositives:
    - Likely with other browser software. Apply additional filters for any other browsers you might use.
level: medium

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_optional_*

Stage 1: selection

selection:
    QueryName|endswith: 'azurewebsites.net'

Stage 2: not filter_optional_*

filter_optional_chrome:
    Image:
        - 'C:\Program Files\Google\Chrome\Application\chrome.exe'
        - 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'
filter_optional_firefox:
    Image:
        - 'C:\Program Files\Mozilla Firefox\firefox.exe'
        - 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'
filter_optional_ie:
    Image:
        - 'C:\Program Files (x86)\Internet Explorer\iexplore.exe'
        - 'C:\Program Files\Internet Explorer\iexplore.exe'
filter_optional_edge_1:
    - Image|startswith: 'C:\Program Files (x86)\Microsoft\EdgeWebView\Application\'
    - Image|endswith: '\WindowsApps\MicrosoftEdge.exe'
    - Image:
          - 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe'
          - 'C:\Program Files\Microsoft\Edge\Application\msedge.exe'
filter_optional_edge_2:
    Image|startswith:
        - 'C:\Program Files (x86)\Microsoft\EdgeCore\'
        - 'C:\Program Files\Microsoft\EdgeCore\'
    Image|endswith:
        - '\msedge.exe'
        - '\msedgewebview2.exe'
filter_optional_safari:
    Image|endswith: '\safari.exe'
filter_optional_defender:
    Image|endswith:
        - '\MsMpEng.exe'
        - '\MsSense.exe'
filter_optional_brave:
    Image|endswith: '\brave.exe'
    Image|startswith: 'C:\Program Files\BraveSoftware\'
filter_optional_maxthon:
    Image|contains: '\AppData\Local\Maxthon\'
    Image|endswith: '\maxthon.exe'
filter_optional_opera:
    Image|contains: '\AppData\Local\Programs\Opera\'
    Image|endswith: '\opera.exe'
filter_optional_seamonkey:
    Image|startswith:
        - 'C:\Program Files\SeaMonkey\'
        - 'C:\Program Files (x86)\SeaMonkey\'
    Image|endswith: '\seamonkey.exe'
filter_optional_vivaldi:
    Image|contains: '\AppData\Local\Vivaldi\'
    Image|endswith: '\vivaldi.exe'
filter_optional_whale:
    Image|startswith:
        - 'C:\Program Files\Naver\Naver Whale\'
        - 'C:\Program Files (x86)\Naver\Naver Whale\'
    Image|endswith: '\whale.exe'
filter_optional_tor:
    Image|contains: '\Tor Browser\'
filter_optional_whaterfox:
    Image|startswith:
        - 'C:\Program Files\Waterfox\'
        - 'C:\Program Files (x86)\Waterfox\'
    Image|endswith: '\Waterfox.exe'
filter_optional_midori:
    Image|contains: '\AppData\Local\Programs\midori-ng\'
    Image|endswith: '\Midori Next Generation.exe'
filter_optional_slimbrowser:
    Image|startswith:
        - 'C:\Program Files\SlimBrowser\'
        - 'C:\Program Files (x86)\SlimBrowser\'
    Image|endswith: '\slimbrowser.exe'
filter_optional_flock:
    Image|contains: '\AppData\Local\Flock\'
    Image|endswith: '\Flock.exe'
filter_optional_phoebe:
    Image|contains: '\AppData\Local\Phoebe\'
    Image|endswith: '\Phoebe.exe'
filter_optional_falkon:
    Image|startswith:
        - 'C:\Program Files\Falkon\'
        - 'C:\Program Files (x86)\Falkon\'
    Image|endswith: '\falkon.exe'
filter_optional_avant:
    Image|startswith:
        - 'C:\Program Files (x86)\Avant Browser\'
        - 'C:\Program Files\Avant Browser\'
    Image|endswith: '\avant.exe'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
Imageends_with\msedge.exeexcludes:Image field:"Image" value:"\msedge.exe"
Imageends_with\msedgewebview2.exeexcludes:Image field:"Image" value:"\msedgewebview2.exe"
Imagestarts_withC:\Program Files (x86)\Microsoft\EdgeCore\excludes:Image field:"Image" value:"C:\Program Files (x86)\Microsoft\EdgeCore\"
Imagestarts_withC:\Program Files\Microsoft\EdgeCore\excludes:Image field:"Image" value:"C:\Program Files\Microsoft\EdgeCore\"
Imagestarts_withC:\Program Files (x86)\Avant Browser\excludes:Image field:"Image" value:"C:\Program Files (x86)\Avant Browser\"
Imagestarts_withC:\Program Files\Avant Browser\excludes:Image field:"Image" value:"C:\Program Files\Avant Browser\"
Imageends_with\avant.exeexcludes:Image field:"Image" value:"\avant.exe"
Imagestarts_withC:\Program Files (x86)\Falkon\excludes:Image field:"Image" value:"C:\Program Files (x86)\Falkon\"
Imagestarts_withC:\Program Files\Falkon\excludes:Image field:"Image" value:"C:\Program Files\Falkon\"
Imageends_with\falkon.exeexcludes:Image field:"Image" value:"\falkon.exe"
Imagestarts_withC:\Program Files (x86)\Naver\Naver Whale\excludes:Image field:"Image" value:"C:\Program Files (x86)\Naver\Naver Whale\"
Imagestarts_withC:\Program Files\Naver\Naver Whale\excludes:Image field:"Image" value:"C:\Program Files\Naver\Naver Whale\"
Imageends_with\whale.exeexcludes:Image field:"Image" value:"\whale.exe"
Imagestarts_withC:\Program Files (x86)\SeaMonkey\excludes:Image field:"Image" value:"C:\Program Files (x86)\SeaMonkey\"
Imagestarts_withC:\Program Files\SeaMonkey\excludes:Image field:"Image" value:"C:\Program Files\SeaMonkey\"
Imageends_with\seamonkey.exeexcludes:Image field:"Image" value:"\seamonkey.exe"
Imagestarts_withC:\Program Files (x86)\SlimBrowser\excludes:Image field:"Image" value:"C:\Program Files (x86)\SlimBrowser\"
Imagestarts_withC:\Program Files\SlimBrowser\excludes:Image field:"Image" value:"C:\Program Files\SlimBrowser\"
Imageends_with\slimbrowser.exeexcludes:Image field:"Image" value:"\slimbrowser.exe"
Imagestarts_withC:\Program Files (x86)\Waterfox\excludes:Image field:"Image" value:"C:\Program Files (x86)\Waterfox\"
Imagestarts_withC:\Program Files\Waterfox\excludes:Image field:"Image" value:"C:\Program Files\Waterfox\"
Imageends_with\Waterfox.exeexcludes:Image field:"Image" value:"\Waterfox.exe"
Imageends_with\Flock.exeexcludes:Image field:"Image" value:"\Flock.exe"
Imagematch\AppData\Local\Flock\excludes:Image field:"Image" value:"\AppData\Local\Flock\"
Imageends_with\Midori Next Generation.exeexcludes:Image field:"Image" value:"\Midori Next Generation.exe"
Imagematch\AppData\Local\Programs\midori-ng\excludes:Image field:"Image" value:"\AppData\Local\Programs\midori-ng\"
Imageends_with\Phoebe.exeexcludes:Image field:"Image" value:"\Phoebe.exe"
Imagematch\AppData\Local\Phoebe\excludes:Image field:"Image" value:"\AppData\Local\Phoebe\"
Imageends_with\brave.exeexcludes:Image field:"Image" value:"\brave.exe"
Imagestarts_withC:\Program Files\BraveSoftware\excludes:Image field:"Image" value:"C:\Program Files\BraveSoftware\"
Imageends_with\maxthon.exeexcludes:Image field:"Image" value:"\maxthon.exe"
Imagematch\AppData\Local\Maxthon\excludes:Image field:"Image" value:"\AppData\Local\Maxthon\"
Imageends_with\opera.exeexcludes:Image field:"Image" value:"\opera.exe"
Imagematch\AppData\Local\Programs\Opera\excludes:Image field:"Image" value:"\AppData\Local\Programs\Opera\"
Imageends_with\vivaldi.exeexcludes:Image field:"Image" value:"\vivaldi.exe"
Imagematch\AppData\Local\Vivaldi\excludes:Image field:"Image" value:"\AppData\Local\Vivaldi\"
Imageends_with\MsMpEng.exeexcludes:Image field:"Image" value:"\MsMpEng.exe"
Imageends_with\MsSense.exeexcludes:Image field:"Image" value:"\MsSense.exe"
Imageends_with\WindowsApps\MicrosoftEdge.exeexcludes:Image field:"Image" value:"\WindowsApps\MicrosoftEdge.exe"
Imageends_with\safari.exeexcludes:Image field:"Image" value:"\safari.exe"
ImageeqC:\Program Files (x86)\Google\Chrome\Application\chrome.exeexcludes:Image field:"Image" value:"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
ImageeqC:\Program Files (x86)\Internet Explorer\iexplore.exeexcludes:Image field:"Image" value:"C:\Program Files (x86)\Internet Explorer\iexplore.exe"
ImageeqC:\Program Files (x86)\Microsoft\Edge\Application\msedge.exeexcludes:Image field:"Image" value:"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
ImageeqC:\Program Files (x86)\Mozilla Firefox\firefox.exeexcludes:Image field:"Image" value:"C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
ImageeqC:\Program Files\Google\Chrome\Application\chrome.exeexcludes:Image field:"Image" value:"C:\Program Files\Google\Chrome\Application\chrome.exe"
ImageeqC:\Program Files\Internet Explorer\iexplore.exeexcludes:Image field:"Image" value:"C:\Program Files\Internet Explorer\iexplore.exe"
ImageeqC:\Program Files\Microsoft\Edge\Application\msedge.exeexcludes:Image field:"Image" value:"C:\Program Files\Microsoft\Edge\Application\msedge.exe"
ImageeqC:\Program Files\Mozilla Firefox\firefox.exeexcludes:Image field:"Image" value:"C:\Program Files\Mozilla Firefox\firefox.exe"
Imagematch\Tor Browser\excludes:Image field:"Image" value:"\Tor Browser\"
Imagestarts_withC:\Program Files (x86)\Microsoft\EdgeWebView\Application\excludes:Image field:"Image" value:"C:\Program Files (x86)\Microsoft\EdgeWebView\Application\"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
QueryNameends_with
  • azurewebsites.net
field:"QueryName" kind:ends_with value:"azurewebsites.net"