[BUG] Elevated Group Discovery with PowerView: the test sample windows-xml.log is declared as Sysmon but holds Security events

Aperta Adatta ai principianti
#4,418 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
powershell, yaml

Direzione di ricerca

Inizia nel blocco tests di detections/endpoint/elevated_group_discovery_with_powerview.yml e confronta la seconda voce attack_data con il descrittore in datasets/attack_techniques/T1069.002/AD_discovery/AD_discovery.yml, che dichiara windows-xml.log come XmlWinEventLog:Security. Esegui sul file windows-xml.log i comandi grep indicati nell'issue per verificare che contenga solo eventi Security 5145. Il lavoro è completato quando la sorgente del secondo campione corrisponde a Security, oppure quando il campione viene rimosso perché la regola cerca l'evento 4104 e il file non ne contiene. Prima di modificare, controlla quale opzione preferiscono i maintainer.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Describe the bug

In the tests block of detections/endpoint/elevated_group_discovery_with_powerview.yml (id 10d62950-0de5-4199-a710-cff9ea79b413, version 11), the second sample is declared as a Sysmon log. The file holds Security events, and the descriptor in attack_data says so.

tests:
    - name: True Positive Test
      attack_data:
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-powershell-xml-powerview.log
          source: XmlWinEventLog:Microsoft-Windows-PowerShell/Operational
          sourcetype: XmlWinEventLog
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-xml.log
          source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
          sourcetype: XmlWinEventLog

The file datasets/attack_techniques/T1069.002/AD_discovery/windows-xml.log holds 8 events. All 8 are Security event 5145 (a network share object was checked), on the Security channel. The file has no mention of the Sysmon provider.

$ grep -o '<Channel>[^<]*</Channel>' windows-xml.log | sort | uniq -c
      8 <Channel>Security</Channel>
$ grep -o '<EventID>[0-9]*</EventID>' windows-xml.log | sort | uniq -c
      8 <EventID>5145</EventID>

The descriptor datasets/attack_techniques/T1069.002/AD_discovery/AD_discovery.yml in attack_data declares the same file as XmlWinEventLog:Security:

- name: windows-xml
  path: /datasets/attack_techniques/T1069.002/AD_discovery/windows-xml.log
  sourcetype: XmlWinEventLog
  source: XmlWinEventLog:Security

The rule itself searches PowerShell script block logging (powershell macro, EventCode=4104, data_source: Powershell Script Block Logging 4104). The first sample, windows-powershell-xml-powerview.log, holds 15 events, all 4104 on Microsoft-Windows-PowerShell/Operational. The second sample holds no event 4104.

Expected behavior

The source of each sample should name the log the file holds. For windows-xml.log that is XmlWinEventLog:Security.

Suggested change: change the source of the second sample to XmlWinEventLog:Security. Or remove the second sample, because the rule searches event 4104 and the file holds none.

Screenshots

None.

App Version:
  • ESCU: 6.10.0 (the tests block is the same in release v6.10.0 and on develop)
  • Splunk Security Essentials: Not applicable
Additional context

None.

Lingua principale
Python
Stelle
1.7k
Fork
507
Merge medio
2g 17h
PR unite (30g)
35

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.