d854b943e5
* [Security Content] Add Investigation Guides to Cloud Rules - AWS * Apply suggestion from review * Update rules/integrations/aws/exfiltration_ec2_snapshot_change_activity.toml Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> * Update rules/integrations/aws/impact_cloudwatch_log_stream_deletion.toml Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> * Apply suggestions from review * Apply suggestions from code review Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com> * . * Applies suggestions from the https://github.com/elastic/detection-rules/pull/2124 PR Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com>
112 lines
5.3 KiB
TOML
112 lines
5.3 KiB
TOML
[metadata]
|
|
creation_date = "2020/12/15"
|
|
maturity = "production"
|
|
updated_date = "2022/05/21"
|
|
|
|
[rule]
|
|
author = ["Elastic"]
|
|
description = """
|
|
Identifies the use of the Exchange PowerShell cmdlet, New-MailBoxExportRequest, to export the contents of a primary
|
|
mailbox or archive to a .pst file. Adversaries may target user email to collect sensitive information.
|
|
"""
|
|
false_positives = ["Legitimate exchange system administration activity."]
|
|
from = "now-9m"
|
|
index = ["logs-endpoint.events.*", "winlogbeat-*", "logs-windows.*"]
|
|
language = "eql"
|
|
license = "Elastic License v2"
|
|
name = "Exporting Exchange Mailbox via PowerShell"
|
|
note = """## Triage and analysis
|
|
|
|
### Investigating Exporting Exchange Mailbox via PowerShell
|
|
|
|
The `New-MailBoxExportRequest` cmdlet is used to begin the process of exporting contents of a primary mailbox or archive
|
|
to a .pst file. Note that this is done on a per-mailbox basis and this cmdlet is available only in on-premises Exchange.
|
|
|
|
Attackers can abuse this functionality in preparation for exfiltrating contents, which is likely to contain sensitive
|
|
and strategic data.
|
|
|
|
#### Possible investigation steps
|
|
|
|
- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files
|
|
for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
|
|
- Investigate other alerts associated with the user/host during the past 48 hours.
|
|
- Investigate the export operation:
|
|
- Identify the user account that performed the action and whether it should perform this kind of action.
|
|
- Contact the account owner and confirm whether they are aware of this activity.
|
|
- Check if this operation was approved and performed according to the organization's change management policy.
|
|
- Retrieve the operation status and use the `Get-MailboxExportRequest` cmdlet to review previous requests.
|
|
- By default, no group in Exchange has the privilege to import or export mailboxes. Investigate administrators that
|
|
assigned the "Mailbox Import Export" privilege for abnormal activity.
|
|
- Investigate if there is a significant quantity of export requests in the alert timeframe. This operation is done on
|
|
a per-mailbox basis and can be part of a mass export.
|
|
- If the operation was completed successfully:
|
|
- Check if the file is on the path specified in the command.
|
|
- Investigate if the file was compressed, archived, or retrieved by the attacker for exfiltration.
|
|
|
|
### False positive analysis
|
|
|
|
- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity
|
|
and it is done with proper approval.
|
|
|
|
### Response and remediation
|
|
|
|
- Initiate the incident response process based on the outcome of the triage.
|
|
- If the involved host is not the Exchange server, isolate the host to prevent further post-compromise behavior.
|
|
- Use the `Remove-MailboxExportRequest` cmdlet to remove fully or partially completed export requests.
|
|
- Prioritize cases that involve personally identifiable information (PII) or other classified data.
|
|
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are
|
|
identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business
|
|
systems, and web services.
|
|
- Review the privileges of users with the "Mailbox Import Export" privilege to ensure that the least privilege principle
|
|
is being followed.
|
|
- Run a full scan using the antimalware tool in place. This scan can reveal additional artifacts left in the system,
|
|
persistence mechanisms, and malware components.
|
|
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
|
|
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the
|
|
mean time to respond (MTTR).
|
|
|
|
## Setup
|
|
|
|
If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.
|
|
"""
|
|
references = [
|
|
"https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/",
|
|
"https://docs.microsoft.com/en-us/powershell/module/exchange/new-mailboxexportrequest?view=exchange-ps",
|
|
]
|
|
risk_score = 47
|
|
rule_id = "6aace640-e631-4870-ba8e-5fdda09325db"
|
|
severity = "medium"
|
|
tags = ["Elastic", "Host", "Windows", "Threat Detection", "Collection"]
|
|
timestamp_override = "event.ingested"
|
|
type = "eql"
|
|
|
|
query = '''
|
|
process where event.type in ("start", "process_started") and
|
|
process.name: ("powershell.exe", "pwsh.exe", "powershell_ise.exe") and process.args : "New-MailboxExportRequest*"
|
|
'''
|
|
|
|
|
|
[[rule.threat]]
|
|
framework = "MITRE ATT&CK"
|
|
[[rule.threat.technique]]
|
|
id = "T1005"
|
|
name = "Data from Local System"
|
|
reference = "https://attack.mitre.org/techniques/T1005/"
|
|
|
|
[[rule.threat.technique]]
|
|
id = "T1114"
|
|
name = "Email Collection"
|
|
reference = "https://attack.mitre.org/techniques/T1114/"
|
|
[[rule.threat.technique.subtechnique]]
|
|
id = "T1114.002"
|
|
name = "Remote Email Collection"
|
|
reference = "https://attack.mitre.org/techniques/T1114/002/"
|
|
|
|
|
|
|
|
[rule.threat.tactic]
|
|
id = "TA0009"
|
|
name = "Collection"
|
|
reference = "https://attack.mitre.org/tactics/TA0009/"
|
|
|