IBM QRadar Executor¶
Category: SIEM and SOAR
Script: qradar.py
Integration: REST API
Faraday Plugin: Raw JSON
Website: https://www.ibm.com/products/qradar-siem
Description¶
Imports IBM QRadar SIEM offenses and the results of an AQL (Ariel Query Language) search into Faraday. Each offense and each result row becomes a [SIEM] vulnerability, grouped under a host that represents the QRadar console.
Prerequisites¶
- An IBM QRadar SIEM console reachable from the agent
- A QRadar authorized service token with permission to run Ariel searches and read offenses, created under Admin > User Management > Authorized Services
requestsavailable in the agent's Python environment (checked withpython3 -c 'import requests')
Configuration¶
Environment Variables (Setup)¶
| Variable | Required | Description |
|---|---|---|
QRADAR_HOST |
Yes | URL of the QRadar console in the form https://host[:port] (e.g., https://qradar.example.com) |
QRADAR_SEC_TOKEN |
Yes | QRadar authorized service token, sent in the SEC header |
These variables are also accepted as execution arguments, so a single run can override them.
Execution Arguments¶
You must set QRADAR_AQL_QUERY, QRADAR_OFFENSE_STATUS, or both. If you set neither, the run stops.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
QRADAR_AQL_QUERY |
string | No* | AQL statement to run, on a single line (e.g., SELECT sourceip, eventcount FROM events WHERE category=18001 LAST 24 HOURS). Each result row becomes a vulnerability, so limit the query with a time window and a WHERE filter. A query with line breaks or tabs is ignored. |
QRADAR_OFFENSE_STATUS |
string | No* | Import the offenses with this status: OPEN, HIDDEN or CLOSED. Not case-sensitive. Other values are ignored. |
QRADAR_MIN_SEVERITY |
string | No | Minimum severity to import, for both offenses and AQL rows: info, low, medium, high or critical, or a QRadar 1-10 number (default: info) |
* You must set QRADAR_AQL_QUERY, QRADAR_OFFENSE_STATUS, or both.
YAML Configuration Example¶
executors:
qradar:
repo_executor: qradar.py
max_size: 65536
varenvs:
QRADAR_HOST: "https://qradar.example.com"
QRADAR_SEC_TOKEN: "<qradar_sec_token>"
params:
QRADAR_AQL_QUERY:
mandatory: false
type: string
base: string
QRADAR_OFFENSE_STATUS:
mandatory: false
type: string
base: string
QRADAR_MIN_SEVERITY:
mandatory: false
type: string
base: string
How It Works¶
- Authenticates with the
SEC: <QRADAR_SEC_TOKEN>header - If
QRADAR_AQL_QUERYis set, creates an Ariel search withPOST /api/ariel/searches, waits for it to complete (about 5 minutes at most), and reads the rows from/api/ariel/searches/{id}/results, 100 per page - If
QRADAR_OFFENSE_STATUSis set, reads the offenses fromGET /api/siem/offensesfiltered by status, 100 per page - Maps each AQL row and each offense to a Faraday vulnerability:
- Name:
[SIEM]followed by the offense description or the row's event name - Severity: from the row's severity, or the offense's 1-10 severity or magnitude (1-3
low, 4-6medium, 7-8high, 9-10critical) - Status:
OPENoffenses are open,CLOSEDare closed,HIDDENare risk-accepted - Details: the row's columns or the offense's fields, plus CVEs found in the text
- Name:
- Drops items below
QRADAR_MIN_SEVERITY
Notes¶
- All results are grouped under one host with IP
0.0.0.0and the console's host name, because SIEM results are not tied to a single asset. - At most 20,000 rows or offenses are read per source.
- If the Ariel search fails or does not finish in time, the AQL results are skipped and the run continues with the offenses, if requested.
- An unrecognized
QRADAR_MIN_SEVERITYfalls back toinfo. - The shared agent parameters (
AGENT_CONFIG_*tags and severity filters) are not applied by this executor. UseQRADAR_MIN_SEVERITYto filter by severity.