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

to-top