Skip to main content

Correlation and Anomaly Detection

🌟 Objective​

Apply event correlation and anomaly detection techniques to identify behaviour patterns which, although harmless in isolation, may indicate significant risk when analysed together.


🎯 Objectives of applying correlation​

  • Detect suspicious behaviour emerging from discrete patterns
  • Reduce false positives through cross-referenced context
  • Prioritise real incidents on the basis of multiple pieces of evidence
  • Support proactive and adaptive detection

🥁 Types of correlation​

TypePractical example
TemporalSuspicious actions within a short interval
ContextualOut-of-hours login + unusual IP
BehaviouralDeviation from the user's pattern
Cross-sourceEvent in the app followed by firewall or SIEM
Session / flowEvents with the same trace.id or session token

🛠️ Supporting techniques and tools​

TechniqueApplication / example
Rules in the SIEMSplunk, Sentinel, QRadar
Chaining / graphsIdentity and session graphs
Baseline modelsDeviations by IP, endpoint, time
Composite thresholdMultiple accumulated conditions
Aggregate scoreScore per user, device or application

⚠️ Rule-based correlation is the best starting point for most organisations.


🧠 Examples of correlated patterns​

Pattern identifiedInterpretation
Login + massive downloadCredential abuse
Repeated failures + successSuccessful brute force
Role change + config changePrivilege escalation
API key + out-of-hours accessMisuse
Commit + atypical CI/CD executionCompromise in the chain

🪧 Good practices​

  • Normalise events before correlation (formats, fields)
  • Use limited time windows (e.g. 5m, 15m)
  • Correct false negatives with new correlation factors
  • Use persistent IDs: user.id, session.id, trace.id
  • Assess the severity of the set, not of the isolated events

📊 Behaviour-based detection​

TechniquePurpose
Baseline per userIndividual deviations (time, volume, endpoint)
Profile per roleActions not expected for a given profile
Aggregated metricsAPI calls, latency, variation in the pattern
Supervised feedbackReinforcement of rules based on real cases

💡 Requires progressive tuning and the active participation of the teams.


🧹 Integration with other controls​

DocumentRelation to this topic
02-logging-centralizado.mdSource of the events for correlation
04-integracao-siem.mdChannel and format of ingestion
03-alertas-eventos-criticos.mdPattern-based alert generation
09-ameacas-mitigadas.mdMaps detection to threat scenarios (OSC&R)

✅ Final recommendations​

  • Start with simple correlation, based on high-impact events
  • Test with real data, simulated data and old logs
  • Track quality metrics (signal/noise, triage time)
  • Evolve towards scoring, dynamic baseline and assisted detection

🌟 Effective correlation reduces false positives and reveals complex patterns that would otherwise go unnoticed.