Detection rule
DNS Query To MEGA Hosting Website
Overview
Detects DNS queries for subdomains related to MEGA sharing website
- Rule id
613c03ba-0779-4a53-8a1f-47f914a4ded3- ATT&CK techniques
- T1567.002 Exfiltration Over Web Service: Exfiltration to Cloud Storage
- Severity
- Medium
- Confidence
- Low
- Origin
- SigmaHQ (community)
- SigmaHQ status
test- Used in defense packs
- qilin, Akira, safepay, nightspire
Validation
- ExperimentalSyntax checked only. Not yet tested on events.
- Test-data validatedMatched positive test events and ignored near-miss events. Not yet run in a production SIEM.
- SIEM-validatedRun in a real SIEM, with a recorded result.
1 of 1 positive test events matched; 1 of 1 near-miss events were correctly ignored. Community rule reused unmodified from SigmaHQ. OffSet7 converted it and tested it on synthetic events.
Detection logic and queries
Queries are shown exactly as generated. Test them in your environment before you deploy them.
Sigma
Sigma (YAML) · 613c03ba-0779-4a53-8a1f-47f914a4ded3
title: DNS Query To MEGA Hosting Website
id: 613c03ba-0779-4a53-8a1f-47f914a4ded3
related:
- id: 66474410-b883-415f-9f8d-75345a0a66a6
type: similar
status: test
description: Detects DNS queries for subdomains related to MEGA sharing website
references:
- https://www.nccgroup.com/research/detecting-rclone-an-effective-tool-for-exfiltration/
author: Aaron Greetham (@beardofbinary) - NCC Group
date: 2021-05-26
modified: 2023-09-18
tags:
- attack.exfiltration
- attack.t1567.002
logsource:
product: windows
category: dns_query
detection:
selection:
QueryName|contains: 'userstorage.mega.co.nz'
condition: selection
falsepositives:
- Legitimate DNS queries and usage of Mega
level: mediumQRadar CRE
Design for the QRadar Rule Wizard. It is not importable and has not been tested in QRadar.
- Rule name
OffSet7: DNS Query To MEGA Hosting Website- Rule type
- Event rule (Local)
- Log source types
- Microsoft Windows Security Event Log DSM: Sysmon EID 22 (DNS query)
Building blocks
BB:OffSet7:DNS Query To MEGA Hosting Website:selection(match)All test lines must match (AND).- custom property needed:
QueryNamecontains:userstorage.mega.co.nzNo QRadar property mapped for "QueryName": create a custom event property (regex or JSON) on the DSM first.
- custom property needed:
Main rule, option A (building blocks)
- when the event(s) were detected by one or more of these log source types:
Microsoft Windows Security Event Log DSM: Sysmon EID 22 (DNS query) - when an event matches the condition built from these building blocks:
BB:OffSet7:DNS Query To MEGA Hosting Website:selection
Main rule, option B (AQL filter test)
Not available: the AQL conversion failed for this rule.
Rule response
- Severity 5, credibility 6, relevance 7
- Ensure the detected event is part of an offense; index offense on Log Source (host) and annotate with the rule title and OffSet7 rule id
- Respond no more than once per 30 minutes per Log Source (tune per environment)
Limitations
- AQL conversion failed (field 'QueryName' is not supported); only the building-block design is available.
- QRadar AQL LIKE / CRE string tests are case-sensitive unless the property is lower-cased; the AQL option uses LOWER() where the backend applied it.
Splunk
Splunk SPLSearch
Search for Splunk with Windows/Sysmon field names. A scheduled search or ES correlation search also needs a schedule, time range, throttling and an adaptive response, set in your environment.
QueryName="*userstorage.mega.co.nz*"Splunk savedsearches.conf stanzaScheduled search template
Template stanza. Review schedule, alert actions and index/sourcetype for your environment before enabling.
[default]
dispatch.earliest_time = -30d
dispatch.latest_time = now
[DNS Query To MEGA Hosting Website]
description = Detects DNS queries for subdomains related to MEGA sharing website
search = QueryName="*userstorage.mega.co.nz*"Elastic
Elastic Lucene (ECS)Hunting query
Lucene query over ECS fields (Winlogbeat/Elastic Agent Windows mappings). A detection rule also needs an index pattern, schedule and actions.
dns.question.name:*userstorage.mega.co.nz*Elastic EQL (ECS)Hunting query
EQL query over ECS fields. Usable in an Elastic Security EQL rule after review; index pattern and schedule are set per environment.
any where dns.question.name:"*userstorage.mega.co.nz*"Elastic ES|QL (ECS)Hunting query
ES|QL query over ECS fields; the FROM clause uses * and must be narrowed to your indices.
from * metadata _id, _index, _version | where dns.question.name like "*userstorage.mega.co.nz*"No working conversion: Microsoft Sentinel KQL (ASIM) (No ASIM parser/table for this log source in the stock pipeline (see native draft on the Event table where one exists).); Microsoft Defender XDR KQL (No documented Defender XDR table with these fields (DeviceEvents ActionTypes are only listed in the in-portal schema); not drafted.); IBM QRadar AQL (hunting query) (QRadar AQL backend has no property mapping for field "QueryName")
Required telemetry
- Log source
product: windows · category: dns_query- Fields used
QueryName
False positives
- Legitimate DNS queries and usage of Mega
Investigation and response
No OffSet7 investigation guidance has been written for this rule yet. Start from the false positives above and the ATT&CK technique pages.
References
Author and attribution
- Author
- Aaron Greetham (@beardofbinary) - NCC Group
- Source
- SigmaHQ ·
rules/windows/dns_query/dns_query_win_mega_nz.yml - Upstream commit
9688134317a2- Licence
- Detection Rule License (DRL) 1.1
Version history
- Version 1Imported from SigmaHQ
- OffSet7 build · SigmaHQ
9688134317a2