Objective. Students write, test, and document three correlation rules that detect defined attack behaviors and generate actionable alerts without excessive false positives.
This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.
VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.
A SIEM platform collects log data from many sources—firewalls, endpoints, directory services, cloud platforms—and stores each event. Correlation rules are the logic layer on top of that storage. A rule watches the event stream and fires an alert when a defined pattern appears. Without rules, the SIEM is only a search engine; with rules, it becomes a detection engine.
A well-written rule has four parts:
Threshold rules count events that share a field value over a rolling time window. A brute-force detection rule is the classic example: if more than a set number of failed authentication events share the same source IP address within a short window, raise an alert. The threshold and the window are tunable; finding the right values is the art of rule writing.
Aggregation rules group events by one or more fields (source IP, user account, host) and summarize them before applying logic. They reduce noise by collapsing many raw events into a single context object.
Sequence rules (also called chained rules) require that event A happen before event B within a time limit. Example: a new local admin account is created, and then a remote login using that account occurs within 10 minutes.
Lookup or threat-intel rules compare a field value—such as a destination IP address—against a reference list such as a threat-intelligence feed. If the destination IP appears in the feed, the rule fires. Open-source feeds like those published by abuse.ch are commonly used in training environments.
A false positive is an alert that fires on legitimate traffic. False positives are dangerous because they train analysts to ignore alerts, a behavior known as alert fatigue. Every rule you write must be tested against both attack traffic and representative benign traffic.
Common causes of false positives in threshold rules:
When you identify a legitimate source of false positives, you have two main remediation options:
1. Whitelist (exception) condition – add a NOT clause: do not fire if the source IP is in a known-good list (e.g., the backup server subnet). This is fast to implement but must be maintained as infrastructure changes.
2. Threshold adjustment – raise the count or shorten or lengthen the time window so legitimate traffic no longer crosses the threshold. Document why you chose the new value.
Always document every tuning change: what you changed, why, what test data confirmed the result, and the date. Documentation is required for audit purposes and is tested on the CompTIA CySA+ exam under the detection and analytics domain.
Before writing a single line of rule logic, define the use case:
1. Identify the threat behavior – what attacker technique does this detect? Reference a framework such as MITRE ATT&CK to name the tactic and technique.
2. Identify the log source – which system generates the events you need? Confirm that source is forwarding logs to the SIEM.
3. Define the logic in plain English – write the condition in words before translating it into query syntax.
4. Set severity and response – decide how urgent the alert is and what the analyst should do first.
5. Define the suppression condition – document known-good behaviors that must be excluded.
6. Test on attack data – confirm the rule fires on injected malicious traffic.
7. Test on benign data – confirm the rule does NOT fire on representative legitimate traffic.
8. Document everything – rule name, version, author, date, logic, severity, suppression, and test results.
Correlation rules that run in a production SIEM operate on real user and system data. Treat all log data as sensitive. Do not copy raw logs containing usernames, IP addresses, or event details outside the authorized lab environment. Follow your organization's or school's acceptable-use policy. In a real workplace, changes to production SIEM rules must go through a change-management process before deployment to avoid accidental suppression of real alerts. In this lab, work only within the isolated practice instance provided.
CompTIA Security+ covers monitoring and event analysis as core competencies. CompTIA CySA+ goes deeper: the detection and analytics domain specifically tests your ability to analyze indicators of compromise, tune detection rules, and document findings. ISC2 CC addresses security operations and monitoring concepts at a foundational level. The skills you practice in this lab map directly to exam questions on all three credentials.
Answer each question, then check it. Nothing is recorded; this is your own practice.
A free tech program — complimentary, as our commitment to get America working. Help us build VoTechWorks. Tell us what works, what doesn’t, and what you want to learn.