Skip to content

Commit 5c0bfab

Browse files
authored
Merge pull request #264014 from vhorne/fw-malware
add detect malware
2 parents 7cdcce1 + 260271e commit 5c0bfab

File tree

2 files changed

+140
-0
lines changed

2 files changed

+140
-0
lines changed
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
---
2+
title: Detect malware with Microsoft Sentinel for Azure Firewall
3+
description: This article shows you how you can detect malware with the Azure Firewall solution for Microsoft Sentinel.
4+
author: vhorne
5+
ms.author: victorh
6+
ms.service: firewall
7+
ms.topic: how-to
8+
ms.date: 01/23/2024
9+
---
10+
11+
# Detect malware with Microsoft Sentinel for Azure Firewall
12+
13+
Malware is any software that is designed to cause damage, disruption, or compromise the security and functionality of computer systems, networks, or devices. It includes diverse types of threats, such as viruses, worms, trojans, ransomware, spyware, adware, rootkits, and more. Malware can have various negative impacts, such as stealing sensitive data, encrypting, or deleting files, displaying unwanted ads, slowing down performance, or even taking control of the device.
14+
15+
It's important to identify and eliminate malware from a system or network, which you can do by employing various detection techniques, such as signature-based, behavior-based, heuristic-based, or machine learning-based techniques. Malware detection is vital for protecting the security and privacy of users, as well as the integrity and availability of systems and networks.
16+
17+
The Azure Firewall IDPS feature automatically detects and denies malware by default and can prevent the cloud workloads from being infected. You can further enhance this capability by employing automated detection and response using prebuilt detection queries and Microsoft Sentinel. In this article, you explore how to detect some common malware found in Azure Firewall logs such as `Coinminer`, `Cl0p` and `Sunburst` using predefined KQL detection queries for Azure Firewall.
18+
19+
These detections enable security teams to receive Sentinel alerts when machines on the internal network request connections to domain names or IP addresses on the Internet that are linked to known Indicators of Compromise (IOCs), as defined in the detection rule query. True positive detections should be regarded as Indicators of Compromise (IOCs). Then, security incident response teams can initiate a response and implement appropriate custom remediation actions based on these detection signals.
20+
21+
22+
23+
For instructions to deploy the analytic rules using the following queries, see [Detect new threats using Microsoft Sentinel with Azure Web Application Firewall](../web-application-firewall/waf-new-threat-detection.md).
24+
25+
## Common malware exploits
26+
27+
The following malware exploits are common on today's networks.
28+
29+
### `Coinminer`
30+
31+
Due to the recent surge in cryptocurrency mining, there's an increasing need for high-performance network processing units. Distributed computing is expanding and the widespread availability of mining software, both in legal and illegal contexts.
32+
33+
`Coinminer` represents a type of malware that uses the hardware resources of an unwitting victim's computer for cryptocurrency mining. The graphics processing unit (GPU) of the unsuspecting user's PC is used to run various scripts aimed at mining cryptocurrencies and calculating transaction block hashes.
34+
35+
To mitigate the risk of these threats, proactive measures should be implemented at the typical entry points. This includes ensuring that Jupyter software is deployed with proper authentication, configuring, and updating web applications to minimize vulnerabilities, controlling external access to Docker, and following extra Zero Trust principles.
36+
37+
The following detection query can be used to create an analytics rule in Sentinel to automatically detect and respond to this malware using Azure Firewall logs.
38+
39+
```
40+
// Coinminer Detection Rule
41+
// Detects suspicious traffic patterns associated with coinmining activity in Azure Firewall logs for Sentinel
42+
43+
let coinminerPorts = dynamic(["2375", "2376", "2377", "4243", "4244"]); // List of known coinminer ports
44+
//Assign the known domains to a variable
45+
let coinminerdomains = dynamic(["teamtnt.red", "kaiserfranz.cc", "45.9.148.123"]); // List of known coinminer domains
46+
47+
(union isfuzzy=true
48+
49+
(AzureDiagnostics
50+
| where ResourceType == "AZUREFIREWALLS"
51+
| where Category == "AzureFirewallApplicationRule"
52+
| parse msg_s with Protocol 'request from ' SourceHost ':' SourcePort 'to ' DestinationHost ':' DestinationPort '. Action:' Action
53+
| extend action_s = column_ifexists("action_s", ""), transactionId_g = column_ifexists("transactionId_g", "")
54+
| where DestinationPort in (coinminerPorts) // Filter traffic on known coinminer ports
55+
| summarize CoinminerAttempts = count() by DestinationHost, DestinationPort
56+
| where CoinminerAttempts > 10 // Adjust threshold as needed
57+
),
58+
59+
(AZFWIdpsSignature
60+
| where DestinationPort in (coinminerPorts)
61+
| summarize CoinminerAttempts = count() by DestinationIp, DestinationPort
62+
| where CoinminerAttempts > 10 // Adjust threshold as needed
63+
64+
),
65+
66+
(AzureDiagnostics
67+
| where ResourceType == "AZUREFIREWALLS"
68+
| where Category == "AzureFirewallDnsProxy"
69+
| parse msg_s with "DNS Request: " ClientIP ":" ClientPort " - " QueryID " " Request_Type " " Request_Class " " Request_Name ". " Request_Protocol " " Request_Size " " EDNSO_DO " " EDNS0_Buffersize " " Response_Code " " Response_Flags " " Response_Size " " Response_Duration
70+
| where Request_Name has_any(coinminerdomains)
71+
| extend DNSName = Request_Name
72+
| extend IPCustomEntity = ClientIP
73+
74+
),
75+
76+
(AzureDiagnostics
77+
| where ResourceType == "AZUREFIREWALLS"
78+
| where Category == "AzureFirewallApplicationRule"
79+
| parse msg_s with Protocol ' request from ' SourceHost ':' SourcePort 'to' DestinationHost ':' DestinationPort '. Action:' Action
80+
| where isnotempty(DestinationHost)
81+
| where DestinationHost has_any(coinminerdomains)
82+
| extend DNSName = DestinationHost
83+
| extend IPCustomEntity = SourceHost),
84+
85+
(AZFWApplicationRule
86+
| where isnotempty(Fqdn)
87+
| where Fqdn has_any (coinminerdomains)
88+
| extend DNSName = Fqdn
89+
| extend IPCustomEntity = SourceIp),
90+
91+
(AZFWDnsQuery
92+
| where isnotempty(QueryName)
93+
| where QueryName has_any (coinminerdomains)
94+
| extend DNSName = QueryName
95+
| extend IPCustomEntity = SourceIp
96+
97+
),
98+
99+
(AZFWIdpsSignature
100+
| where DestinationIp has_any (coinminerdomains)
101+
| extend DNSName = DestinationIp
102+
| extend IPCustomEntity = SourceIp
103+
104+
),
105+
106+
(AZFWIdpsSignature
107+
| where Description contains "coinminer"
108+
| extend DNSName = DestinationIp
109+
| extend IPCustomEntity = SourceIp
110+
)
111+
112+
)
113+
```
114+
115+
### `Cl0p`
116+
117+
`Cl0p` is a ransomware that operates by applying distinctive encryption keys to the victim's files and then requesting a ransom for the files' decryption. It uses a vulnerability in the data transfer software MOVEit and sends spear phishing emails to numerous employees in the hope to deliver `cl0p`. Then it uses tools like `truebot` and `dewmode` to move laterally within the network and exfiltrate data. The ransomware encrypts files using the AES-256 encryption algorithm.
118+
119+
`Cl0p` vulnerabilities include CVE-2023-35036, CVE-2023-34362 and CVE-2023-35708. In June 2023, the FBI and CISA published a press release about this exploitation. The effects of `cl0p` ransomware are registered across several universities in the US Midwest and government organizations. Airlines, TV networks, and UK based retail stores are the latest victims of the `cl0p` ransomware gang.
120+
121+
The following detection query can be used to create an analytics rule in Sentinel to automatically detect and respond to this malware using Azure Firewall logs.
122+
123+
Detection Query for `Cl0p`: [Firewall Malware Detections for Sentinel/Detection - Analytic rule query for Cl0p.json](https://github.com/Azure/Azure-Network-Security/blob/master/Azure%20Firewall/Playbook%20-%20Firewall%20Malware%20Detections%20for%20Sentinel/Detection%20-%20Analytic%20rule%20query%20for%20Cl0p.json)
124+
125+
## `Sunburst`
126+
127+
This malware targets victims by using domain generation algorithm (DGA) strings to evade detection and establish a command-and-control backdoor attack. The DGA strings are often difficult for security tools to identify the domains used by the malware due to the pattern used in the syntax and their constant changing of the domain information.
128+
129+
The following detection query can be used to create an analytics rule in Sentinel to automatically detect and respond to this malware using Azure Firewall logs.
130+
131+
Detection Query for `Sunburst` Malware: [Firewall Malware Detections for Sentinel/Detection - Analytic rule query for Sunburst.json](https://github.com/Azure/Azure-Network-Security/blob/master/Azure%20Firewall/Playbook%20-%20Firewall%20Malware%20Detections%20for%20Sentinel/Detection%20-%20Analytic%20rule%20query%20for%20Sunburst.json)
132+
133+
## Related content
134+
135+
- [Azure Firewall with Microsoft Sentinel overview](firewall-sentinel-overview.md)
136+
- [Detect new threats using Microsoft Sentinel with Azure Web Application Firewall](../web-application-firewall/waf-new-threat-detection.md)
137+
- [Learn more about Microsoft Sentinel](../sentinel/overview.md)
138+
- [Azure network security documentation](../networking/security/index.yml)

articles/firewall/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ items:
173173
href: protect-azure-kubernetes-service.md
174174
- name: Protect Office 365
175175
href: protect-office-365.md
176+
- name: Detect malware with Microsoft Sentinel
177+
href: detect-malware-with-sentinel.md
176178
- name: Migrate
177179
items:
178180
- name: Migrate to Azure Firewall Premium

0 commit comments

Comments
 (0)