Azure Service Principal Credentials Added
Identifies when new Service Principal credentials have been added in Azure. In most organizations, credentials will be added to service principals infrequently. Hijacking an application (by adding a rogue secret or certificate) with granted permissions will allow the attacker to access data that is normally protected by MFA requirements.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2021/05/05"
3integration = ["azure"]
4maturity = "production"
5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
6min_stack_version = "8.3.0"
7updated_date = "2023/06/22"
8
9[rule]
10author = ["Elastic", "Austin Songer"]
11description = """
12Identifies when new Service Principal credentials have been added in Azure. In most organizations, credentials will be
13added to service principals infrequently. Hijacking an application (by adding a rogue secret or certificate) with
14granted permissions will allow the attacker to access data that is normally protected by MFA requirements.
15"""
16false_positives = [
17 """
18 Service principal credential additions may be done by a system or network administrator. Verify whether the
19 username, hostname, and/or resource name should be making changes in your environment. Credential additions from
20 unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted
21 from the rule.
22 """,
23]
24from = "now-25m"
25index = ["filebeat-*", "logs-azure*"]
26interval = "10m"
27language = "kuery"
28license = "Elastic License v2"
29name = "Azure Service Principal Credentials Added"
30note = """## Setup
31
32The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
33references = ["https://www.fireeye.com/content/dam/collateral/en/wp-m-unc2452.pdf"]
34risk_score = 47
35rule_id = "f766ffaf-9568-4909-b734-75d19b35cbf4"
36severity = "medium"
37tags = ["Domain: Cloud", "Data Source: Azure", "Use Case: Identity and Access Audit", "Tactic: Impact"]
38timestamp_override = "event.ingested"
39type = "query"
40
41query = '''
42event.dataset:azure.auditlogs and azure.auditlogs.operation_name:"Add service principal credentials" and event.outcome:(success or Success)
43'''
44
45
46[[rule.threat]]
47framework = "MITRE ATT&CK"
48[[rule.threat.technique]]
49id = "T1496"
50name = "Resource Hijacking"
51reference = "https://attack.mitre.org/techniques/T1496/"
52
53
54[rule.threat.tactic]
55id = "TA0040"
56name = "Impact"
57reference = "https://attack.mitre.org/tactics/TA0040/"
Setup
The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
References
Related rules
- Azure AD Global Administrator Role Assigned
- Azure Active Directory High Risk Sign-in
- Azure Active Directory High Risk User Sign-in Heuristic
- Azure Active Directory PowerShell Sign-in
- Azure Application Credential Modification