[BUG] AWS CreateAccessKey: unquoted field names make the cross-user filter a no-op (fires on self-key creation)
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
Direzione di ricerca
Inizia da detections/cloud/aws_createaccesskey.yml e analizza il filtro tra utenti e aws_createaccesskey_filter. Esegui la riproduzione SPL autonoma per confermare i risultati attuali, quindi verifica che la regola escluda la creazione di una propria chiave, mantenendo però la creazione di una chiave da parte di un altro utente, incluse le richieste senza requestParameters.userName. Esamina il comportamento di esclusione della console descritto nell'issue e assicurati che l'ambito finale sia riflesso nella regola.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
AWS CreateAccessKey (detections/cloud/aws_createaccesskey.yml, id 2a9b80d3-6340-4345-11ad-212bf3d0d111) is meant to surface a user creating an access key for a different user:
| eval match=if(match(userIdentity.userName,requestParameters.userName),1,0)
| search match=0
Inside eval, the dotted field names are not single-quoted, so SPL parses userIdentity.userName as the . concatenation of the (non-existent) fields userIdentity and userName. Both arguments to match() evaluate to null, match is always 0, and search match=0 keeps every event. As shipped, the filter does nothing: the rule fires on every successful non-console CreateAccessKey, including the routine case of a user rotating their own key.
Repro
Self-contained, with no data needed:
| makeresults count=2
| streamstats count as n
| eval _raw=if(n==1, "{\"userIdentity\":{\"userName\":\"alice\"},\"requestParameters\":{\"userName\":\"alice\"}}", "{\"userIdentity\":{\"userName\":\"alice\"},\"requestParameters\":{\"userName\":\"bob\"}}")
| spath
| eval case=if(n==1,"self: alice creates a key for alice","cross-user: alice creates a key for bob")
| eval match=if(match(userIdentity.userName,requestParameters.userName),1,0)
| eval match_quoted=if('userIdentity.userName'=='requestParameters.userName',1,0)
| table case userIdentity.userName requestParameters.userName match match_quoted
Output:
| case | userIdentity.userName | requestParameters.userName | match (shipped) | match_quoted |
|---|---|---|---|---|
| self: alice creates a key for alice | alice | alice | 0 | 1 |
| cross-user: alice creates a key for bob | alice | bob | 0 | 0 |
The self-key row should be excluded (match=1), but the shipped expression returns 0.
Expected behavior
Only cross-user key creation should produce a result. A minimal fix quotes the fields and compares them directly. match() also treats its second argument as a regex, so a username like svc. would match svcX:
| eval match=if('userIdentity.userName'=='requestParameters.userName',1,0)
| search match=0
One related case to consider: when requestParameters.userName is absent (the key is for the caller), the request is a self-key and should also be excluded, e.g. if(isnull('requestParameters.userName') OR 'userIdentity.userName'=='requestParameters.userName',1,0).
Additional context: the console exclusion no longer matches console calls
The base search excludes console activity with userAgent!=console.amazonaws.com. A real console-issued CreateAccessKey captured from an AWS account in 2026 records a browser user agent (Mozilla/5.0 ... Chrome/...) together with "sessionCredentialFromConsole": "true", not console.amazonaws.com. Keys created in the console today therefore aren't excluded. A scripted caller can also evade the rule by sending the literal console.amazonaws.com user agent.
sessionCredentialFromConsole is not a clean replacement key. It marks console-session credentials, not the client, and AWS's own log examples show CloudShell CLI calls (exec-env/CloudShell) carrying it, including IAM calls. Excluding on it would hide cross-user key creation scripted from CloudShell. Once the cross-user filter works, dropping the console exclusion altogether and suppressing known provisioning principals in aws_createaccesskey_filter may be the better trade-off.
App Version:
- ESCU: reproduced on 5.26.0; SPL unchanged on
develop(64acde7bf6, rule version 11) - Splunk Enterprise 9.3.10, Splunk_TA_aws 7.11.0
- Lingua principale
- Python
- Stelle
- 1.7k
- Fork
- 494
- Merge medio
- 2g 10h
- PR unite (30g)
- 34
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di splunk/security_content
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
splunk/security_content#4275 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
splunk/security_content#4293 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
splunk/security_content#4285 ·
I maintainer di solito rispondono entro 2 giorni
-
Lookup replication issue with DA-ESS-ContentUpdate on distributed searchForse già presa @nasbench l’ha presa 4 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
splunk/security_content#4229 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
splunk/security_content#4220 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di splunk/security_content
Issue simili
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
vllm-project/vllm-metal#822 ·
I maintainer di solito rispondono entro 1 giorno
-
vector-store
Difficoltà 1/5 1-3 ore Idoneità per principianti 90/100
mem0ai/mem0#7461 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: chunk_span_bounds and _validated_chunk_spans reject Pydantic models ChunkSpan and AudioFileAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
BasedHardware/omi#19047 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno