Can I send only attack records to the SIEM?
Short answer
Yes, for blocked attacks. When Line Format = TR7 WAF Log is selected in the Logs profile, only the requests that WAF blocked produce a line; the whole line is the JSON of the attack information (uid, totalScore, action, attacks, wafTime). In this format, requests passed in Monitor mode, requests recognized by Teacher and requests that stay below the threshold and only trigger a signature in the Monitor state are not sent; if the WAF box is not checked on the vService, this format produces no lines at all. If monitored attacks are also to be sent, CEF Format or TR7 JSON Format is selected and the lines whose wafInfo field is not empty ({}) are filtered for in the SIEM. The attack fields in the line are determined in the SIEM & Attack Details card on WAF Management.
Problem: All the Traffic Goes to the SIEM
The CEF and TR7 JSON formats send a line for every HTTP request; on a busy vService, the license and storage load of the SIEM increases. Only the attack records need to be sent or separated in the SIEM.
Solution: Two Methods
| Your situation | Suitable method |
|---|---|
| Only the blocked attacks should be sent | Method 1: TR7 WAF Log |
| All attacks, including Monitor and Teacher, are needed | Method 2: CEF or TR7 JSON and filtering in the SIEM |
Method 1: TR7 WAF Log Recommended
- How it works In the TR7 WAF Log format, the log line of the requests that are not blocked is suppressed; the JSON of the attack information is sent only for the blocked requests (example log).
- Where it is openedLoad Balancer → Profiles → Logs · vService edit form → Details → LOG
- Requirement Modify permission in the Load Balancer area (the Logs profile and the vService form are on Load Balancer screens); WAF on in the vService; syslog access from TR7 to the SIEM
- vService type HTTP
Step-by-Step Configuration
The profile form is opened with Load Balancer → Profiles → Logs → Add (how to add).
Name is entered; in the Log Addresses row, the protocol, the address of the SIEM (e.g. 192.0.2.50) and its port (e.g. 514) are entered.
Line Format = TR7 WAF Log is selected. For the line to be parsed directly as JSON in the SIEM, Log Standard = raw is selected; in another standard, a syslog header is added in front of the line (log parsing).
Add in the form is clicked.
On the Load Balancer → Load Balancer vService List screen, the vService is right-clicked and Edit is selected.
Save is clicked. In a cluster setup, the change is also sent to the peer device with the default auto-sync; if Manual Sync Mode is on, it is sent to the peer device manually.
Verification
A blocked test request and a normal request are sent; the lines that arrive at the SIEM are examined.
Command: curl -s -o /dev/null -w '%{http_code}' 'https://www.example.com/cmd.exe'
Only for the blocked request {"uid":"…","totalScore":8,"action":"block","attacks":[…],"wafTime":…}Method 2: CEF or TR7 JSON and Filtering in the SIEM
- How it worksCEF Format and TR7 JSON Format send all requests; in requests in which an attack is found, the
wafInfofield comes filled, and if there is no attack, it is{}. Blocked attacks, attacks passed in Monitor mode and attacks recognized by Teacher are told apart by theactionkey inwafInfo(block,monitor,fpc). - Where it is openedLoad Balancer → Profiles → Logs → Line Format = CEF Format or TR7 JSON Format
- Requirement Modify permission in the Load Balancer area (the Logs profile and the vService form are on Load Balancer screens); a line filtering rule in the SIEM
- vService type HTTP
Step-by-Step Configuration
The steps of Method 1 are followed; CEF Format or TR7 JSON Format is selected as the Line Format (How do I send WAF logs to a SIEM; which formats carry attack information in a structured way (CEF, JSON)?).
In the SIEM, the lines whose wafInfo field is not {} are separated as attack records; for only the blocked ones, the isWafAttack = 1 condition is used.
Verification
A request that contains an attack is sent to a vService whose host group is in Monitor mode, and the filtered result is examined.
"action":"monitor" in wafInfo; isWafAttack not 1Common Mistakes
- Selecting TR7 WAF Log while the host group is in Monitor mode. In Monitor mode, no line goes to the SIEM because the request that contains an attack is not blocked; during the monitoring period, Method 2 is used.
- Binding a TR7 WAF Log profile to a vService on which WAF is not on. This format produces no log line on a vService whose WAF box is not checked in the edit form.
- Leaving Log Standard at a value other than raw and trying to parse the line as JSON. Since the syslog header is added in front of the line, JSON parsing does not work directly.
- Assuming that Event Logs and the SIEM carry the same records. Event Logs also keeps the Monitor, Teacher and below-threshold Monitor-state signature records; TR7 WAF Log sends only the blocked ones.
How it is done in the documentation
Related questions
- How do I send WAF logs to a SIEM; which formats carry attack information in a structured way (CEF, JSON)?
- Which attack fields are sent to the SIEM (score, severity, scope, name, category, CWE, MITRE, CAPEC, OWASP, target)?
- Which HTTP and TCP log formats are supported (Standard, Apache Combined, Apache VHost, CEF, TR7 JSON, TR7 WAF, Manual JSON, Manual CEF, Manual log line)?
