elastic / elastic/detection-rules

[Rule Tuning] Potential Shadow Credentials added to AD Object

Open
#6,726 0 comments 0 reactions 1 assignee Claimed by @w0rk3r View on GitHub
Rule: Tuning Team: TRADE
Dominant language
Python
Stars
2.7k
Forks
696
Avg merge
4d 17h
Merged PRs (30d)
87

Description

### Link to Rule

https://github.com/elastic/detection-rules/blob/main/rules/windows/credential_access_shadow_credentials.toml

### Rule Tuning Type

False Negatives - Enhancing detection of true threats that were previously missed.

### Description

In https://github.com/elastic/detection-rules/pull/2359 we introduced a filter: `winlog.event_data.AttributeValue :B\:828*`, that filter refers to `KEYCREDENTIALLINK_BLOB` length observed in public offensive tooling at the time.

This creates a false negative because 828 is not reliable. LLM explanation:

`In the DN-Binary representation B:::, the count describes the serialized hexadecimal key length. The underlying KEYCREDENTIALLINK_BLOB contains variable entries, including variable-length key material.`

### Impact

Current Impacket generated a 403-byte KeyCredentialLink blob during testing, which we miss. Windows emitted and Elastic ingested Event 5136 with:

```
AttributeValue: B:806::CN=
ObjectClass: computer
OperationType: Value Added
```

### Example Data

```
{
"winlog": {
"record_id": 4801366,
"event_data": {
"SubjectUserSid": "S-1-5-21-2038103339-2155116624-3331879844-1113",
"SubjectUserName": "daenerys.targaryen",
"ObjectDN": "CN=KCLVALC001,OU=DetectionFixtures,DC=essos,DC=local",
"ObjectClass": "computer",
"AttributeLDAPDisplayName": "msDS-KeyCredentialLink",
"AttributeValue": "B:806::CN=KCLVALC001,OU=DetectionFixtures,DC=essos,DC=local",
"OperationType": "Value Added"
}
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.