[BUG] regex command does not work with formated expression using new lines

Aperta
#4,377 3 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@nasbench ci sta già lavorando.

Dal 30/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug

I am testing this use case https://research.splunk.com/endpoint/6735153f-2da0-4eba-a428-288898613837/ against the referenced attack data. It provides events with original_file_name=py.exe But the SPL does not show any results.

It looks like the regex command does not work with the the formatted expression.
After this command expected events are filtered out (no results returned):
| regex original_file_name="(?i)^(?:py
|pyw
|python
|pythonw
|python32
|python64
|pythonw32
|pythonw64
|ipyw32
|ipyw64
|python3
|pythonw3
|python3.\w+
|pythonw3.\w+).exe$"

My assumption is, that the new lines cause the alternatives to effectively end with a newline character.

Changing the filter to
| regex original_file_name="(?i)^(?:py|pyw
|python
|pythonw
|python32
|python64
|pythonw32
|pythonw64
|ipyw32
|ipyw64
|python3
|pythonw3
|python3.\w+
|pythonw3.\w+).exe$"

shows the expected results.
If this issue is confirmed, it will effect all detections where regex commands use such kind of formatting.

Lingua principale
Python
Stelle
1.7k
Fork
503
Merge medio
1g 22h
PR unite (30g)
42

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di splunk/security_content

Tutte le issue di splunk/security_content

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.