Vai al contenuto
SOC Analyst Role
  • Caricamento dell'indice…

↑↓ naviga · ↵ apri · Esc chiudi

it

Cheat sheet

Cheat sheet Splunk SPL vs Sentinel KQL

Lo stesso hunt SOC, scritto in entrambi i linguaggi, con l'unica trappola di traduzione che frega le persone. Cerca per tecnica, tabella, operatore o Event ID.

Traduzione degli operatori a colpo d'occhio

Splunk SPLSentinel KQL
index=… sourcetype=…TableName (es. SecurityEvent)
search / wherewhere
stats count by xsummarize count() by x
stats dc(x)summarize dcount(x)
stats values(x)summarize make_set(x)
eval new=…extend new = …
table a b cproject a, b, c
rename a AS bproject-rename b = a
sort - countorder by count_ desc
head 10take 10 / top 10 by …
dedup xdistinct x (o summarize arg_max)
timechart span=1h countsummarize count() by bin(TimeGenerated, 1h) | render timechart
earliest=-24hwhere TimeGenerated > ago(24h)
rex field=x "(?<y>…)"extend y = extract("…", 1, x)

Hunt fianco a fianco

25 di 25 hunt

Cercare e filtrare gli eventi di un utente

Basi
Splunk SPL
index=wineventlog sourcetype=WinEventLog:Security EventCode=4625 user=jsmith
Sentinel KQL
SecurityEvent
| where EventID == 4625
| where TargetUserName =~ "jsmith"

In SPL i valori dei campi non distinguono maiuscole e minuscole per impostazione predefinita, mentre in KQL == è case-sensitive, quindi usa =~ (o has) quando non controlli il formato maiuscolo/minuscolo.

Limitare una ricerca alle ultime 24 ore

Basi
Splunk SPL
index=wineventlog sourcetype=WinEventLog:Security EventCode=4624 earliest=-24h@h latest=now
Sentinel KQL
SecurityEvent
| where TimeGenerated between (ago(24h) .. now())
| where EventID == 4624

Splunk può arrotondare il tempo con @h; ago(24h) non arrotonda, quindi usa startofday() o bin() se ti servono intervalli allineati, e filtra sempre prima su TimeGenerated per le prestazioni.

Contare gli eventi per utente e IP di origine

Basi
Splunk SPL
index=wineventlog sourcetype=WinEventLog:Security EventCode=4625
| stats count by user, src_ip
| sort - count
Sentinel KQL
SecurityEvent
| where EventID == 4625
| summarize Count = count() by TargetAccount, IpAddress
| sort by Count desc

stats ... by corrisponde a summarize ... by; KQL richiede un nome di colonna esplicito per l'aggregato se vuoi ordinarlo in modo pulito.

Nomi di processo più e meno comuni

Basi
Splunk SPL
index=sysmon EventCode=1
| top limit=10 Image

index=sysmon EventCode=1
| rare limit=10 Image
Sentinel KQL
DeviceProcessEvents
| summarize Count = count() by FileName
| top 10 by Count desc

DeviceProcessEvents
| summarize Count = count() by FileName
| top 10 by Count asc

In SPL top/rare contano e aggiungono per te una colonna con la percentuale; in KQL top si limita a ordinare e prendere N righe, quindi devi prima fare summarize.

Coppie uniche di utente e origine per i logon RDP

Basi
Splunk SPL
index=wineventlog sourcetype=WinEventLog:Security EventCode=4624 Logon_Type=10
| dedup user, src_ip
| table _time, user, src_ip, host
Sentinel KQL
SecurityEvent
| where EventID == 4624 and LogonType == 10
| distinct TargetAccount, IpAddress, Computer

dedup mantiene l'intero evento più recente, mentre distinct restituisce solo le colonne elencate; usa summarize arg_max(TimeGenerated, *) by TargetAccount, IpAddress per mantenere le righe complete come dedup.

Rinominare e selezionare le colonne di output

Basi
Splunk SPL
index=wineventlog sourcetype=WinEventLog:Security EventCode=4624
| rename src_ip AS SourceIP, user AS Account
| table _time, Account, SourceIP, host
Sentinel KQL
SecurityEvent
| where EventID == 4624
| project TimeGenerated, Account = TargetAccount, SourceIP = IpAddress, Computer

In KQL project rinomina e seleziona in un solo passaggio; usa project-rename se vuoi mantenere tutte le altre colonne.

Calcolare nuovi campi (flag di errore, lunghezza dell'URI)

Basi
Splunk SPL
index=web sourcetype=access_combined
| eval is_error=if(status>=500, 1, 0), uri_len=len(uri)
| stats sum(is_error) AS errors avg(uri_len) AS avg_uri_len by clientip
Sentinel KQL
W3CIISLog
| extend IsError = iff(toint(scStatus) >= 500, 1, 0), UriLen = strlen(csUriStem)
| summarize Errors = sum(IsError), AvgUriLen = avg(UriLen) by cIP

eval corrisponde a extend e if() a iff(); in W3CIISLog la colonna scStatus è una stringa, quindi convertila con toint() prima di un confronto numerico.

Logon falliti per ora in un grafico

Basi
Splunk SPL
index=wineventlog sourcetype=WinEventLog:Security EventCode=4625 earliest=-24h
| timechart span=1h count AS failed_logons
Sentinel KQL
SecurityEvent
| where TimeGenerated > ago(24h) and EventID == 4625
| summarize FailedLogons = count() by bin(TimeGenerated, 1h)
| render timechart

timechart riempie i bucket vuoti con zero, mentre summarize by bin() li omette semplicemente; usa make-series in KQL quando i buchi contano per la baseline.

Arricchire i logon con una lista di account privilegiati

Basi
Splunk SPL
index=wineventlog sourcetype=WinEventLog:Security EventCode=4624
| lookup privileged_accounts.csv user OUTPUT role
| where isnotnull(role)
| table _time, user, role, src_ip, host
Sentinel KQL
let PrivAccounts = _GetWatchlist('PrivilegedAccounts')
| project TargetUserName = tostring(SearchKey), Role = tostring(Role);
SecurityEvent
| where EventID == 4624
| join kind=inner PrivAccounts on TargetUserName
| project TimeGenerated, TargetUserName, Role, IpAddress, Computer

Le watchlist di Sentinel sostituiscono i file di lookup di Splunk; ricorda che il join predefinito di KQL è innerunique, che deduplica silenziosamente il lato sinistro, quindi indica esplicitamente kind=inner.

Logon falliti per IP di origine (forza bruta o spraying)

AutenticazioneT1110
Splunk SPL
index=wineventlog sourcetype=WinEventLog:Security EventCode=4625 earliest=-1h
| stats count AS failures dc(user) AS distinct_users values(user) AS targeted by src_ip
| where failures > 20
| sort - failures
Sentinel KQL
SecurityEvent
| where TimeGenerated > ago(1h) and EventID == 4625
| summarize Failures = count(), DistinctUsers = dcount(TargetAccount), Targeted = make_set(TargetAccount, 20) by IpAddress
| where Failures > 20
| sort by Failures desc

dc()/values() corrispondono a dcount()/make_set(); un numero alto di utenti distinti da un IP indica spraying, uno basso forza bruta.

Forza bruta seguita da un logon riuscito

AutenticazioneT1110.001
Splunk SPL
index=wineventlog sourcetype=WinEventLog:Security (EventCode=4625 OR EventCode=4624) earliest=-1h
| eval fail_time=if(EventCode=4625, _time, null()), success_time=if(EventCode=4624, _time, null())
| stats count(fail_time) AS failures min(fail_time) AS first_fail count(success_time) AS successes max(success_time) AS last_success by src_ip, user
| where failures >= 10 AND successes > 0 AND last_success > first_fail
| convert ctime(first_fail) ctime(last_success)
Sentinel KQL
let Failures = SecurityEvent
| where TimeGenerated > ago(1h) and EventID == 4625
| summarize FailCount = count(), FirstFail = min(TimeGenerated) by IpAddress, TargetAccount;
SecurityEvent
| where TimeGenerated > ago(1h) and EventID == 4624
| summarize LastSuccess = max(TimeGenerated) by IpAddress, TargetAccount
| join kind=inner Failures on IpAddress, TargetAccount
| where FailCount >= 10 and LastSuccess > FirstFail
| project IpAddress, TargetAccount, FailCount, FirstFail, LastSuccess

In SPL di solito si risolve in un solo passaggio con stats condizionali, mentre in KQL è più naturale scriverlo come due insiemi let uniti in join su IP e account.

Accessi da più paesi (impossible travel)

AutenticazioneT1078.004
Splunk SPL
index=o365 sourcetype=o365:management:activity Workload=AzureActiveDirectory Operation=UserLoggedIn earliest=-24h
| iplocation ClientIP
| stats dc(Country) AS countries values(Country) AS country_list values(ClientIP) AS ips by UserId
| where countries > 1
Sentinel KQL
SigninLogs
| where TimeGenerated > ago(24h) and ResultType == "0"
| extend Country = tostring(LocationDetails.countryOrRegion)
| summarize Countries = dcount(Country), CountryList = make_set(Country), IPs = make_set(IPAddress), Apps = make_set(AppDisplayName) by UserPrincipalName
| where Countries > 1

Splunk geolocalizza al momento della ricerca con iplocation, mentre SigninLogs contiene già LocationDetails; ResultType è una stringa, quindi confrontalo con "0" e non con 0.

Blocchi degli account e loro provenienza (4740)

AutenticazioneT1110
Splunk SPL
index=wineventlog sourcetype=WinEventLog:Security EventCode=4740
| stats count values(Caller_Computer_Name) AS caller_computers by user
| sort - count
Sentinel KQL
SecurityEvent
| where EventID == 4740
| summarize Lockouts = count(), CallerComputers = make_set(TargetDomainName) by TargetAccount
| sort by Lockouts desc

In SecurityEvent il Caller Computer Name del 4740 finisce nella colonna TargetDomainName, una stranezza nota che trae in inganno chi traduce le query.

Nuovi account utente creati (4720)

AutenticazioneT1136.001
Splunk SPL
index=wineventlog sourcetype=WinEventLog:Security EventCode=4720
| table _time, host, src_user, user
| rename src_user AS created_by, user AS new_account
Sentinel KQL
SecurityEvent
| where EventID == 4720
| project TimeGenerated, Computer, CreatedBy = SubjectAccount, NewAccount = TargetAccount

L'add-on Windows di Splunk normalizza creatore e destinatario in src_user e user, mentre SecurityEvent mantiene la suddivisione grezza SubjectAccount/TargetAccount.

Command line PowerShell codificate

ProcessiT1059.001
Splunk SPL
index=sysmon EventCode=1 (Image="*\\powershell.exe" OR Image="*\\pwsh.exe") (CommandLine="* -e *" OR CommandLine="* -ec *" OR CommandLine="*-enc*")
| table _time, host, User, ParentImage, CommandLine
Sentinel KQL
DeviceProcessEvents
| where TimeGenerated > ago(7d)
| where FileName in~ ("powershell.exe", "pwsh.exe")
| where ProcessCommandLine matches regex @"(?i)\s-(e|ec|en\w*)\s"
| project TimeGenerated, DeviceName, AccountName, InitiatingProcessFileName, ProcessCommandLine

PowerShell accetta qualsiasi prefisso di -EncodedCommand, quindi una regex è meglio delle stringhe fisse; il payload è Base64 di UTF-16LE, quindi il testo decodificato mostra byte nulli se non li rimuovi.

Applicazioni Office che avviano shell o script host

ProcessiT1204.002
Splunk SPL
index=sysmon EventCode=1 (ParentImage="*\\winword.exe" OR ParentImage="*\\excel.exe" OR ParentImage="*\\powerpnt.exe" OR ParentImage="*\\outlook.exe") (Image="*\\cmd.exe" OR Image="*\\powershell.exe" OR Image="*\\wscript.exe" OR Image="*\\cscript.exe" OR Image="*\\mshta.exe" OR Image="*\\rundll32.exe")
| table _time, host, User, ParentImage, Image, CommandLine
Sentinel KQL
DeviceProcessEvents
| where InitiatingProcessFileName in~ ("winword.exe", "excel.exe", "powerpnt.exe", "outlook.exe")
| where FileName in~ ("cmd.exe", "powershell.exe", "pwsh.exe", "wscript.exe", "cscript.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe")
| project TimeGenerated, DeviceName, AccountName, InitiatingProcessFileName, FileName, ProcessCommandLine

Sysmon fornisce percorsi completi, quindi in SPL servono wildcard con backslash con escape, mentre MDE separa i valori FileName nudi, adatti a una lista in~ case-insensitive.

Coppie rare di processo padre-figlio

ProcessiT1059
Splunk SPL
index=sysmon EventCode=1 earliest=-7d
| eval parent=lower(mvindex(split(ParentImage, "\\"), -1)), child=lower(mvindex(split(Image, "\\"), -1))
| stats count dc(host) AS hosts values(host) AS host_list by parent, child
| where count < 5
| sort count
Sentinel KQL
DeviceProcessEvents
| where TimeGenerated > ago(7d)
| summarize Count = count(), Hosts = dcount(DeviceName), HostList = make_set(DeviceName, 10) by Parent = tolower(InitiatingProcessFileName), Child = tolower(FileName)
| where Count < 5
| sort by Count asc

In SPL devi estrarre il nome del file dal percorso con split/mvindex; in KQL puoi calcolare le chiavi di raggruppamento inline dentro summarize ... by.

certutil usato per scaricare o decodificare file (LOLBin)

ProcessiT1105
Splunk SPL
index=sysmon EventCode=1 (Image="*\\certutil.exe" OR OriginalFileName="CertUtil.exe") (CommandLine="*urlcache*" OR CommandLine="*verifyctl*" OR CommandLine="*-decode*")
| table _time, host, User, ParentImage, CommandLine
Sentinel KQL
DeviceProcessEvents
| where FileName =~ "certutil.exe" or ProcessVersionInfoOriginalFileName =~ "CertUtil.exe"
| where ProcessCommandLine has_any ("urlcache", "verifyctl", "decode")
| project TimeGenerated, DeviceName, AccountName, InitiatingProcessFileName, ProcessCommandLine

Filtrare sul nome file originale intercetta le copie rinominate; in KQL has_any corrisponde a termini interi ed è molto più veloce di contains su tabelle grandi.

Connessioni in uscita verso porte di destinazione rare

ReteT1571
Splunk SPL
index=sysmon EventCode=3 Initiated=true NOT DestinationPort IN (80, 443, 53, 22, 25, 88, 123, 389, 445, 3389)
| where NOT (cidrmatch("10.0.0.0/8", DestinationIp) OR cidrmatch("172.16.0.0/12", DestinationIp) OR cidrmatch("192.168.0.0/16", DestinationIp))
| stats count dc(host) AS hosts values(Image) AS processes by DestinationPort
| where hosts < 3
| sort count
Sentinel KQL
DeviceNetworkEvents
| where TimeGenerated > ago(7d)
| where ActionType == "ConnectionSuccess" and RemoteIPType == "Public"
| where RemotePort !in (80, 443, 53, 22, 25, 88, 123, 389, 445, 3389)
| summarize Count = count(), Hosts = dcount(DeviceName), Processes = make_set(InitiatingProcessFileName, 10) by RemotePort
| where Hosts < 3
| sort by Count asc

Splunk richiede cidrmatch() per escludere gli intervalli privati, mentre MDE pre-classifica gli indirizzi in RemoteIPType; NOT x IN (...) diventa !in.

Query DNS lunghe (possibile DNS tunnelling)

ReteT1071.004
Splunk SPL
index=sysmon EventCode=22
| eval qlen=len(QueryName)
| where qlen > 60
| rex field=QueryName "(?<domain>[^.]+\.[^.]+)$"
| stats dc(QueryName) AS unique_queries max(qlen) AS max_len values(Image) AS processes by domain, host
| where unique_queries > 50
| sort - unique_queries
Sentinel KQL
DnsEvents
| where TimeGenerated > ago(24h) and SubType == "LookupQuery"
| where strlen(Name) > 60
| extend Domain = extract(@"([^.]+\.[^.]+)$", 1, Name)
| summarize UniqueQueries = dcount(Name), MaxLen = max(strlen(Name)), Clients = make_set(ClientIP, 10) by Domain
| where UniqueQueries > 50
| sort by UniqueQueries desc

rex corrisponde a extract(); la regex ingenua sulle ultime due etichette raggruppa male domini come co.uk, quindi tratta i risultati come piste e controlla il numero di sottodomini unici per dominio padre.

Un mittente esterno che raggiunge molti destinatari

EmailT1566
Splunk SPL
index=mail sourcetype=ms:o365:reporting:messagetrace earliest=-24h NOT SenderAddress="*@corp.example.com"
| stats dc(RecipientAddress) AS recipients values(Subject) AS subjects values(Status) AS statuses by SenderAddress, FromIP
| where recipients > 20
| sort - recipients
Sentinel KQL
EmailEvents
| where TimeGenerated > ago(24h) and EmailDirection == "Inbound"
| summarize Recipients = dcount(RecipientEmailAddress), Subjects = make_set(Subject, 5), Actions = make_set(DeliveryAction) by SenderFromAddress, SenderIPv4
| where Recipients > 20
| sort by Recipients desc

EmailEvents ti fornisce direttamente EmailDirection e DeliveryAction, mentre con i dati di message trace in Splunk devi escludere il tuo dominio e leggere tu stesso lo Status di consegna.

Email consegnate a tema fattura o pagamento che non hanno superato l'autenticazione

EmailT1566.001
Splunk SPL
index=mail sourcetype=ms:o365:reporting:messagetrace Status=Delivered (Subject="*invoice*" OR Subject="*payment*" OR Subject="*wire transfer*")
| table _time, SenderAddress, FromIP, RecipientAddress, Subject
Sentinel KQL
EmailEvents
| where TimeGenerated > ago(7d) and EmailDirection == "Inbound" and DeliveryAction == "Delivered"
| where Subject has_any ("invoice", "payment", "wire transfer")
| extend Auth = parse_json(AuthenticationDetails)
| where tostring(Auth.DMARC) =~ "fail" or tostring(Auth.SPF) =~ "fail"
| project TimeGenerated, SenderFromAddress, SenderIPv4, RecipientEmailAddress, Subject, AuthenticationDetails

Il message trace non contiene verdetti SPF/DKIM/DMARC, quindi in Splunk fai pivot sui log del gateway o degli header, mentre EmailEvents li espone come JSON in AuthenticationDetails.

Pattern di SQL injection nei log del web server

WebT1190
Splunk SPL
index=web sourcetype=access_combined
| eval decoded=urldecode(uri)
| where match(decoded, "(?i)(union\s+(all\s+)?select|or\s+1=1|sleep\(|benchmark\(|information_schema|' or ')")
| stats count values(status) AS statuses values(uri_path) AS paths by clientip
| sort - count
Sentinel KQL
W3CIISLog
| where TimeGenerated > ago(24h)
| extend Q = url_decode(csUriQuery)
| where Q matches regex @"(?i)(union\s+(all\s+)?select|or\s+1=1|sleep\(|benchmark\(|information_schema|' or ')"
| summarize Requests = count(), Statuses = make_set(scStatus), Paths = make_set(csUriStem, 10) by cIP
| sort by Requests desc

Decodifica prima di cercare corrispondenze (urldecode vs url_decode) o i payload codificati passano inosservati; controlla anche i codici di stato, perché un 200 su un payload di injection conta più di un 403.

Download massivo di file da SharePoint o OneDrive

CloudT1530
Splunk SPL
index=o365 sourcetype=o365:management:activity Workload IN (SharePoint, OneDrive) Operation=FileDownloaded earliest=-24h
| bin _time span=1h
| stats dc(ObjectId) AS files values(ClientIP) AS ips by _time, UserId
| where files > 100
| sort - files
Sentinel KQL
OfficeActivity
| where TimeGenerated > ago(24h)
| where OfficeWorkload in ("SharePoint", "OneDrive") and Operation == "FileDownloaded"
| summarize Files = dcount(OfficeObjectId), IPs = make_set(ClientIP, 10) by UserId, bin(TimeGenerated, 1h)
| where Files > 100
| sort by Files desc

SPL suddivide il tempo in bucket con un comando bin separato prima di stats, mentre KQL mette bin() dentro la clausola summarize ... by.

Creazione sospetta di regole della posta in arrivo (inoltro, eliminazione, spostamento)

CloudT1564.008
Splunk SPL
index=o365 sourcetype=o365:management:activity Workload=Exchange (Operation=New-InboxRule OR Operation=Set-InboxRule OR Operation=UpdateInboxRules)
| search Parameters{}.Name IN (DeleteMessage, MoveToFolder, ForwardTo, RedirectTo, ForwardAsAttachmentTo)
| table _time, UserId, ClientIP, Operation, Parameters{}.Name, Parameters{}.Value
Sentinel KQL
OfficeActivity
| where OfficeWorkload == "Exchange"
| where Operation in~ ("New-InboxRule", "Set-InboxRule", "UpdateInboxRules")
| where Parameters has_any ("DeleteMessage", "MoveToFolder", "ForwardTo", "RedirectTo", "ForwardAsAttachmentTo")
| project TimeGenerated, UserId, ClientIP, Operation, Parameters

Splunk espone i parametri della regola come campi multivalore Parameters{}.Name/Value, mentre OfficeActivity li memorizza come stringa JSON che puoi cercare con has_any o espandere con parse_json.

Come i colloqui valutano la logica delle query SIEM

Pochi colloqui SOC ti chiedono di scrivere a memoria una query perfetta. Quello che valutano è se sai ragionare per query: filtrare gli eventi giusti, aggregare per trovare l'anomalia e spiegare perché un risultato è sospetto o no. Che il team usi Splunk o Microsoft Sentinel, gli stessi tre schemi tornano di continuo nelle query Splunk per i colloqui da analista SOC e nei loro equivalenti KQL.

1. Filtrare gli accessi falliti

"Come troveresti un brute force nell'ultima ora?" La commissione vuole sentire: filtra sull'Event ID 4625, raggruppa per IP sorgente, conta i tentativi e i nomi utente distinti e fissa una soglia. Molti tentativi contro un solo utente sono password guessing; un tentativo ciascuno contro molti utenti è spraying. Poi di' cosa uniresti dopo: un 4624 dallo stesso IP.

Accessi falliti per sorgente (SPL)
index=wineventlog EventCode=4625 earliest=-1h
| stats count dc(user) AS users BY src_ip
| where count > 20
| sort - count
Accessi falliti per sorgente (KQL)
SecurityEvent
| where TimeGenerated > ago(1h) and EventID == 4625
| summarize count(), users = dcount(TargetUserName) by IpAddress
| where count_ > 20
| order by count_ desc

Nota le piccole differenze di sintassi tra Splunk e KQL che gli intervistatori amano sondare: stats … BY diventa summarize … by, dc() diventa dcount(), e KQL chiama la colonna del conteggio count_.

2. Individuare processi padre-figlio sospetti

La seconda preferita: "Come rileveresti Office che avvia PowerShell?" Filtra gli eventi di creazione di processo (4688 o Sysmon 1, oppure DeviceProcessEvents in Microsoft Defender) in cui il padre è winword.exe, excel.exe o outlook.exe e il figlio è powershell.exe, cmd.exe, wscript.exe o mshta.exe. Spiega che il segnale è la relazione: PowerShell da solo è normale, PowerShell avviato da Word con -enc nella command line no. Gli hunt "Office applications spawning shells" e "Rare parent-child process pairs" qui sopra mostrano entrambe le versioni.

3. Ridurre i falsi positivi

I colloqui orientati a L2 chiedono: "Questa regola scatta 300 volte al giorno. Cosa fai?" Una risposta forte evita di disabilitarla e basta. Raggruppa gli hit per host, utente e processo per trovare la sorgente rumorosa, conferma che è benigna (un agente di backup, uno scanner di vulnerabilità, un service account con una password scaduta), poi aggiungi un'esclusione mirata come NOT src_ip IN (…) o where Account !in (…), documenta il perché e fissa una data di revisione. Saper descrivere questo processo è ciò che distingue le query Microsoft Sentinel KQL per il lavoro SOC dalla sintassi copiata e incollata.

Per esercitarti sul ragionamento con dati realistici, fai la missione del falso positivo da ingestione duplicata nel simulatore SOC, e tieni aperta la cheat sheet sugli Event ID di Windows per i nomi dei campi.

Approfondisci

Il modulo SIEM: Splunk e KQL ripercorre passo passo gli hunt su brute force e impossible travel, poi la missione impossible travel verifica se sai distinguere una VPN da un attaccante.

Domande frequenti

Per un colloquio SOC devo imparare Splunk SPL o KQL?

Impara quello che usa l'azienda a cui punti, e i concetti in entrambi. Molte aziende di servizi indiane usano Splunk o QRadar per i clienti, mentre le grandi aziende basate su Microsoft usano Sentinel e Defender (KQL). Il modello mentale — filtrare, aggregare, confrontare con una baseline — è lo stesso.

Qual è l'equivalente KQL di stats count by di Splunk?

summarize count() by field. Nota che in KQL la colonna del conteggio si chiama count_, quindi ordini con order by count_ desc.

KQL distingue tra maiuscole e minuscole?

I nomi di tabelle e colonne e l'operatore == distinguono maiuscole e minuscole; =~, has e contains no. In SPL i valori dei campi in genere non distinguono maiuscole e minuscole in search, ma le distinguono in where.

Perché i nomi dei campi nel mio Splunk sono diversi dagli esempi?

I nomi dei campi dipendono dall'add-on e dal sourcetype. Gli esempi presuppongono i campi normalizzati dello Splunk Add-on for Microsoft Windows (come user e src_ip); gli eventi Windows in XML grezzo usano nomi come TargetUserName e IpAddress.