Correlation rules for Sentinel, Splunk and QRadar
Example rules for what Sugardaddy sends to your SIEM: the node's integrity, its tamper-proof audit log and how decoy activity meets console activity. They are a starting point, not a product: tune the windows and thresholds to your environment, and test each one with the Send test button of the output and with real activity before you turn on notifications.
The fields are the ones described in Sugardaddy events in your SIEM:
- Microsoft Sentinel: the Sentinel output writes to the
SugardaddyEventos_CLtable.Codigois the class (auditoria.login,integridad.desviacion…, with.resueltowhen an alert is resolved),NodoIdthe node,IpOrigenthe source of a decoy event andDetallethe data. For an audit entry,Detallecarriesentrada,quien,accion,detalleandhash, and the IP, when there is one, isDetalle.detalle.ip. If you send CEF over syslog instead, the same data is inCommonSecurityLog(DeviceEventClassID,SourceIP,SourceUserName,DeviceCustomString5). - Splunk: CEF over syslog, with the CEF extension extracted as fields (
act,src,suser,deviceExternalId,cs5), for example with a CEF add-on orKV_MODE. The searches useindex=sugardaddy: change it to yours. - IBM QRadar: LEEF 2.0 over syslog, with a log source of type Universal LEEF. Create custom event properties for the LEEF attributes
codigo,nodoId,usrNameanddatos(JSON). The class is also the LEEF event ID, so you can map each one to a QID.
Sentinel package (Sugardaddy Cloud). You don't have to copy the Sentinel queries one by one: in your console, Alerts and SIEM → Add output → Microsoft Sentinel, download the Sentinel package. It is an ARM template that creates in your workspace, in one go, a scheduled analytics rule for each Sentinel query on this page (the same query, with the frequency and window given for each rule), the AGENTIC_IOCs watchlist of rule 7 and a workbook of decoy events by attacker class and AI agent. Deploy it to the resource group of your workspace once the output has created the table: az deployment group create -g <resource group> --template-file sugardaddy-sentinel-package.json -p workspaceName=<workspace>. If your table has another name, add tableName=<table>; with rulesEnabled=false the rules are created disabled. Deploying it again updates the same rules, it does not duplicate them.
1. The node does not match its signed version
Why: the node updater compares the machine with the signed version every 10 minutes. A difference that nobody planned is someone changing the node: a file, an image or a variable of .env. It is critical and it comes once, when it starts; integridad.desviacion.resuelto closes it.
Sentinel (KQL), scheduled every 5 minutes over the last 15:
SugardaddyEventos_CL
| where Codigo == "integridad.desviacion"
| project TimeGenerated, Nodo, NodoId, Texto, Detalle
Splunk (SPL):
index=sugardaddy act="integridad.desviacion"
| table _time dvchost deviceExternalId msg cs5
QRadar (AQL):
SELECT DATEFORMAT(devicetime,'yyyy-MM-dd HH:mm:ss') AS cuando, "nodoId", "datos"
FROM events WHERE "codigo" = 'integridad.desviacion' LAST 15 MINUTES
As a rule: when the event matches codigo equals integridad.desviacion, create an offense, severity 10.
2. The audit log was rewritten (a seal goes backwards)
Why: every hour the console seals the last entry of its audit log (auditoria.sello, hasta is the entry number). The entry number only grows. A seal whose hasta is lower than the previous one of the same node, or the same with another hash, means the log was rebuilt or restored from a copy. Sugardaddy Central checks the same thing on its side.
Sentinel (KQL), every hour over the last 7 days:
SugardaddyEventos_CL
| where Codigo == "auditoria.sello"
| extend hasta = tolong(Detalle.hasta), hash = tostring(Detalle.hash)
| order by NodoId asc, TimeGenerated asc
| extend hastaAntes = prev(hasta), hashAntes = prev(hash), nodoAntes = prev(NodoId)
| where NodoId == nodoAntes and (hasta < hastaAntes or (hasta == hastaAntes and hash != hashAntes))
| project TimeGenerated, Nodo, NodoId, hastaAntes, hasta, hashAntes, hash
Splunk (SPL):
index=sugardaddy act="auditoria.sello"
| spath input=cs5 path=hasta output=hasta | spath input=cs5 path=hash output=hash
| sort 0 deviceExternalId _time
| streamstats current=f window=1 last(hasta) as hasta_antes last(hash) as hash_antes by deviceExternalId
| where hasta < hasta_antes OR (hasta == hasta_antes AND hash != hash_antes)
| table _time dvchost deviceExternalId hasta_antes hasta hash_antes hash
QRadar: AQL cannot compare an event with the previous one of the same node. Keep the seals in a reference table keyed by nodoId with the last hasta (a rule response Add to a reference table), and add a rule that fires when the hasta of a new auditoria.sello is lower than the stored one. Or run the check with herramientas/verificar-sellos-auditoria.ts on a schedule.
3. Emergency access followed by a privilege change
Why: an emergency way in (auditoria.emergencia) is for when nothing else works. If, right after it, someone changes roles, second factors, API tokens or users, it can be an attacker using the emergency path to stay in.
Sentinel (KQL), every 15 minutes over the last hour:
let emergencias = SugardaddyEventos_CL
| where Codigo == "auditoria.emergencia"
| project Emergencia = TimeGenerated, NodoId, Quien = tostring(Detalle.quien);
SugardaddyEventos_CL
| where Codigo in ("auditoria.rol", "auditoria.mfa", "auditoria.token-api", "auditoria.usuario")
| join kind=inner emergencias on NodoId
| where TimeGenerated between (Emergencia .. Emergencia + 30m)
| project Emergencia, Cambio = TimeGenerated, Nodo, Codigo, QuienEmergencia = Quien, QuienCambio = tostring(Detalle.quien), Accion = tostring(Detalle.accion)
Splunk (SPL):
index=sugardaddy act IN ("auditoria.emergencia", "auditoria.rol", "auditoria.mfa", "auditoria.token-api", "auditoria.usuario")
| transaction deviceExternalId startswith=eval(act=="auditoria.emergencia") maxspan=30m
| where eventcount > 1
| table _time dvchost act suser
QRadar: a rule with when these events are detected in sequence by the same nodoId within 30 minutes: first codigo = auditoria.emergencia, then codigo is any of auditoria.rol, auditoria.mfa, auditoria.token-api, auditoria.usuario.
4. Failed sign-ins, then a sign-in from the same address
Why: five or more refused sign-ins (auditoria.fallo) from one IP in 10 minutes, and then a sign-in that works from that IP, is a guessed or stolen password.
Sentinel (KQL), every 15 minutes over the last hour:
let fallos = SugardaddyEventos_CL
| where Codigo == "auditoria.fallo"
| extend Ip = tostring(Detalle.detalle.ip)
| where isnotempty(Ip)
| summarize Fallos = count(), Ultimo = max(TimeGenerated) by NodoId, Ip, bin(TimeGenerated, 10m)
| where Fallos >= 5;
SugardaddyEventos_CL
| where Codigo == "auditoria.login"
| extend Ip = tostring(Detalle.detalle.ip)
| join kind=inner fallos on NodoId, Ip
| where TimeGenerated between (Ultimo .. Ultimo + 30m)
| project TimeGenerated, Nodo, Ip, Fallos, Quien = tostring(Detalle.quien)
Splunk (SPL):
index=sugardaddy act IN ("auditoria.fallo", "auditoria.login") src=*
| bin _time span=10m
| stats count(eval(act=="auditoria.fallo")) as fallos count(eval(act=="auditoria.login")) as entradas values(suser) as quien by deviceExternalId src _time
| where fallos >= 5 AND entradas > 0
QRadar: the built-in multiple login failures followed by success pattern works if you map auditoria.fallo to an authentication-failure QID and auditoria.login to an authentication-success QID. Or a rule: when at least 5 events with codigo = auditoria.fallo are seen with the same source IP in 10 minutes, followed by codigo = auditoria.login from the same source IP within 30 minutes.
5. Whoever touched a decoy tries the console
Why: nobody legitimate touches a decoy. If the IP that touched one (trampa.*) then tries to sign in to the Sugardaddy console, the attacker knows the deception platform is there and is going for it.
Sentinel (KQL), every hour over the last day:
let atacantes = SugardaddyEventos_CL
| where Clase == "evento" and isnotempty(IpOrigen)
| where coalesce(tobool(column_ifexists("ConexionEstablecida", true)), true) and (tostring(Detalle.origen) == "windows" or (isempty(tostring(Detalle.ipSocket)) and tostring(Detalle.origen) !in ("aws", "azure")) or tostring(Detalle.ipSocket) == IpOrigen)
| summarize Trampas = make_set(Trampa), Primero = min(TimeGenerated) by Ip = IpOrigen;
SugardaddyEventos_CL
| where Codigo in ("auditoria.login", "auditoria.fallo")
| extend Ip = tostring(Detalle.detalle.ip)
| join kind=inner atacantes on Ip
| where TimeGenerated > Primero
| project TimeGenerated, Nodo, Ip, Codigo, Trampas, Quien = tostring(Detalle.quien)
Splunk (SPL):
index=sugardaddy (cat=trampa OR act IN ("auditoria.login", "auditoria.fallo")) src=*
| stats min(eval(if(cat=="trampa", _time, null()))) as primera_trampa values(cs1) as trampas count(eval(act=="auditoria.login" OR act=="auditoria.fallo")) as intentos by src
| where isnotnull(primera_trampa) AND intentos > 0
QRadar: add the source IP of every event with cat = trampa to a reference set (Sugardaddy attackers, 1 day), and a rule: when codigo is auditoria.login or auditoria.fallo and the source IP is in the reference set.
6. An AI attack agent touched a decoy
Why: attack frameworks driven by AI agents (ARTEX, HexStrike, RedAmon, PentAGI, Cairn…) work at machine speed and try many tools in minutes. When one touches a decoy, the attacker is already inside or already targeting you. Each event carries who is on the other side, as a hint worked out from what the decoy recorded: in Sentinel the AtacanteClase (ia, ataque…) and Atacante (ARTEX, AI agent…) columns, in CEF the reason field (AI: ARTEX), in LEEF atacanteClase and atacante.
Sentinel (KQL), every 15 minutes over the last hour:
SugardaddyEventos_CL
| extend AtacanteClase = tostring(column_ifexists("AtacanteClase", "")),
Atacante = tostring(column_ifexists("Atacante", ""))
| where Clase == "evento" and AtacanteClase in~ ("ia", "AI")
| extend IpOrigen = iif(coalesce(tobool(column_ifexists("ConexionEstablecida", true)), true) and (tostring(Detalle.origen) == "windows" or (isempty(tostring(Detalle.ipSocket)) and tostring(Detalle.origen) !in ("aws", "azure")) or tostring(Detalle.ipSocket) == IpOrigen), IpOrigen, "")
| summarize Eventos = count(), Trampas = make_set(Trampa, 20), Acciones = make_set(Accion, 10),
Primero = min(TimeGenerated), Ultimo = max(TimeGenerated) by IpOrigen, Atacante, Nodo
Splunk (SPL):
index=sugardaddy cat=trampa reason="AI: *"
| stats count values(cs1) as trampas min(_time) as primero max(_time) as ultimo by src reason dvchost
QRadar: create a custom event property for the LEEF attribute atacanteClase, and a rule: when atacanteClase is AI, create an offense indexed on the source IP.
7. The address that touched a decoy shows up in your real logs
Why: a decoy gives you an address you can trust: nobody legitimate touches it. This rule looks for that address in your own sign-ins, firewall and web server logs, to see what else it did. Optionally it also matches the decoy attackers against the indicators of ThreatDefence agentic-attack-detections (MIT license): upload its feeds/sentinel-watchlist.csv as a watchlist with the alias AGENTIC_IOCs and the search key value.
Sentinel (KQL), every hour over the last day. Tables you don't have are skipped (isfuzzy):
let atacantes = SugardaddyEventos_CL
| where Clase == "evento" and isnotempty(IpOrigen)
| where coalesce(tobool(column_ifexists("ConexionEstablecida", true)), true) and (tostring(Detalle.origen) == "windows" or (isempty(tostring(Detalle.ipSocket)) and tostring(Detalle.origen) !in ("aws", "azure")) or tostring(Detalle.ipSocket) == IpOrigen)
| summarize Trampas = make_set(Trampa, 20), Atacante = take_any(tostring(column_ifexists("Atacante", ""))),
PrimeraTrampa = min(TimeGenerated) by Ip = IpOrigen;
union isfuzzy=true
(datatable(TimeGenerated: datetime, Ip: string, Fuente: string, Que: string)[]),
(SigninLogs | project TimeGenerated, Ip = IPAddress, Fuente = "Entra sign-in",
Que = strcat(UserPrincipalName, " (", ResultType, ")")),
(CommonSecurityLog | project TimeGenerated, Ip = SourceIP, Fuente = DeviceVendor,
Que = strcat(Activity, " to ", DestinationIP, ":", DestinationPort)),
(W3CIISLog | project TimeGenerated, Ip = cIP, Fuente = "IIS",
Que = strcat(csMethod, " ", csUriStem, " ", scStatus))
| join kind=inner atacantes on Ip
| project TimeGenerated, Ip, Fuente, Que, Trampas, Atacante, PrimeraTrampa
With the watchlist, the decoy attackers that ThreatDefence has seen in intrusions by AI attack frameworks:
let td = union isfuzzy=true
(datatable(Ip: string, Framework: string, Confianza: string, Fuente: string)[]),
(_GetWatchlist('AGENTIC_IOCs')
| where type in ("ipv4", "ipv6") and confidence in ("high", "medium")
| project Ip = tostring(value), Framework = tostring(framework), Confianza = tostring(confidence),
Fuente = tostring(source));
SugardaddyEventos_CL
| where Clase == "evento" and isnotempty(IpOrigen)
| where coalesce(tobool(column_ifexists("ConexionEstablecida", true)), true) and (tostring(Detalle.origen) == "windows" or (isempty(tostring(Detalle.ipSocket)) and tostring(Detalle.origen) !in ("aws", "azure")) or tostring(Detalle.ipSocket) == IpOrigen)
| join kind=inner td on $left.IpOrigen == $right.Ip
| summarize Eventos = count(), Trampas = make_set(Trampa, 20) by IpOrigen, Framework, Confianza, Fuente
Hosting addresses are reassigned: treat a match as a lead, not proof, and check the watchlist's review_by date.
Splunk and QRadar: the same idea with a lookup or reference set of the decoy attackers' addresses (as in rule 5), searched in your firewall, proxy and sign-in indexes.
In rules 5 to 7 an address only counts when a connection proved it: an event without an established connection (a spoofed UDP packet) or whose address was written in the request (a webhook-shaped POST, where the real one is in Detalle.ipSocket) does not become an entity, so a playbook that contains by entity cannot be pointed at an address the attacker chose. Rule 6 keeps those events, without the address.
What these rules do not cover
- A node that stops sending: Sugardaddy already sends
salud.silencio, and your SIEM should alert when a log source goes quiet. - What the integrity check found: the detail is in the alert data (
cs5,datos,Detalle), not in these rules. - Sugardaddy Central: these are for the alerts your node sends to your SIEM. What SeguridadSI staff do in Central is in Central's audit log, and changes made on your behalf are emailed to your contact email and security contacts.