QRadar & SIEM

QRadar Reference Sets and Building Blocks: Making Rules Manageable

🇹🇷 Bu yazıyı Türkçe oku

In QRadar, reference sets and building blocks are the two basic building elements that make correlation rules easier to read, easier to manage and less prone to false positives. A reference set holds lists of values used in rules (IPs, users, hashes, domains). A building block defines conditions that are reused across many rules in one place. This guide explains what each one is, when to use which, and how they work together in real SOC scenarios.

What Is a Reference Set?

A reference set is a list of values of a single type in QRadar. Rules can check whether a field in an incoming event is in that list. Sets can be filled manually, from a CSV file, through the API, or by a rule response.

TypeExample use
IPMalicious IPs from threat intelligence, authorized scanner IPs, backup servers
AlphaNumericAdmin accounts, service accounts, malicious domains, file hashes
NumericCritical port numbers, event IDs
PortAllowed or suspicious service ports
DateScenarios where you need to keep the time a value was added

Reference sets can have a Time to Live (TTL). Letting threat intelligence IPs expire automatically after 30 days, for example, stops old and no longer valid indicators from generating false alarms.

How to Create a Reference Set

  1. Open Reference Set Management from the Admin tab.
  2. Click Add to create a new set, and set the name, type and, if needed, the TTL.
  3. Add values manually or import a CSV file.
  4. In the rule that will use the set, choose the test “when any of these properties are contained in any of these reference set(s)”.

For bulk management from the command line you can use the ReferenceDataUtil.sh tool on the Console; for automation, use the /api/reference_data/sets endpoint of the REST API.

What Is a Building Block?

A building block (BB) is a type of rule that does not create offenses on its own; it only defines conditions. Other rules call the building block with the test “when an event matches any of the following rules”. That way the same condition is not written separately into dozens of rules.

QRadar ships with many building blocks. The most important ones are the host definition building blocks:

  • BB:HostDefinition: DNS Servers
  • BB:HostDefinition: Mail Servers
  • BB:HostDefinition: Proxy Servers
  • BB:HostDefinition: Network Management Servers
  • BB:HostDefinition: VA Scanner Source IP

Filling these building blocks with the IP addresses of your own environment is one of the first tuning tasks after installing QRadar. If your vulnerability scanner’s IP is not defined in VA Scanner Source IP, every scan will trigger port scan and reconnaissance alerts.

Reference Set or Building Block?

QuestionReference setBuilding block
What does it hold?A list of valuesA combination of conditions (tests)
Does it change often?Yes, updated automatically or manuallyMore static
Who updates it?Analysts, the API, threat intelligence feeds, rule responsesThe rule administrator
Typical example“List of admin accounts”Definition of a “failed login event”

The strongest design uses both together: the building block defines the condition, and the reference set decides which values the condition applies to.

Scenario 1: Admin Logins Outside Working Hours

  1. Reference set: Admin_Accounts (AlphaNumeric) – admin account names.
  2. Building block: BB: Successful Login – events in the successful authentication category.
  3. Rule: create an offense if the event matches the BB, the username is in Admin_Accounts, and the event time is outside working hours.

When a new admin is added, you only update the reference set, not the rule.

Scenario 2: Communication with Threat Intelligence IPs

  1. Reference set: TI_Malicious_IPs (IP, TTL: 30 days) – fed from a threat intelligence source through the API.
  2. Rule: create an offense for connections whose destination IP is in TI_Malicious_IPs and that the firewall allowed.

Treating blocked connections separately and with lower severity lets analysts focus on the connections that carry real risk.

Scenario 3: Exception Lists to Reduce False Positives

If a rule keeps firing because of an authorized service account or scanning server, do not disable the rule. Create an exception reference set and add an “and NOT when … contained in” test to the rule. This keeps the rest of the rule’s coverage and keeps exceptions in a visible, auditable list. For the full approach, see our guide on reducing QRadar false positives.

Best Practices

  • Use meaningful names: choose names that show the purpose, such as TI_Malicious_IPs or Exception_Scanner_IPs.
  • Set a TTL: threat indicators and temporary exceptions should not live forever.
  • Document exceptions: record why, by whom and when a value was added.
  • Copy default building blocks before editing them: this prevents your changes from being lost in updates.
  • Clean up unused sets: sets that no rule references only add clutter.

Frequently Asked Questions

What is the difference between a reference set and a reference map?

A reference set only holds a list of values. A reference map holds key-value pairs, such as username to department. For more complex relationships there are also reference maps of sets and reference tables.

Can a rule add values to a reference set automatically?

Yes. With the “Add to a Reference Set” option in the rule response, a value from the event that triggered the rule can be added to the list automatically.

Does a building block create offenses?

No. A building block only defines conditions; it must be called by a rule to create an offense.

Sources

Related Guides

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button