Cloudflare
SIEM (InsightIDR) can now parse logs from Cloudflare. The Cloudflare event source has been set up to use an Amazon S3 bucket. Using your own Amazon S3 bucket, you can now send logs to this bucket using Cloudflare’s Logpush mechanism. Our collectors will then consume the logs from this bucket before pushing them to IDR to be parsed.
Initially, SIEM (InsightIDR) will ingest Cloudflare logs and add them to the “Raw Logs” Logset. View an example of Cloudflare logs, in the log example section of this topic.
To set up Cloudflare, you’ll need to:
We also provide Log Examples.
Review the Requirements
In order to configure Cloudflare to send data to SIEM (InsightIDR), you must configure the AWS S3 Bucket to send messages to SIEM (InsightIDR). You will need access to the Logpush API which is currently only available to the Enterprise tier of Cloudflare. From this point you will need to configure an Amazon S3 destination either through the Cloudflare dashboard or API. Once you see log files appearing in the S3 bucket, you’ll be able to set up the event source in SIEM (InsightIDR).
Configure SIEM (InsightIDR) to collect data from the event source
After you complete the prerequisite steps and configure the event source to send data, you must add the event source in SIEM (InsightIDR).
To configure the new event source in SIEM (InsightIDR):
- From the left menu, go to Data Collection and click Setup Event Source > Add Event Source.
- Do one of the following:
- Search for Cloudflare in the event sources search bar.
- In the Product Type filter, select Cloud Service.
- Select the Cloudflare event source tile.
- Choose your collector and select Cloudflare as your event source. You also have the option to name your event source.
- If you are sending additional events beyond alerts, select the unfiltered logs checkbox.
- Specify the authentication and path information for the S3 bucket that was created by Cloudflare.
- Click Save.
Verify the Configuration
Complete these steps to view your logs and ensure events are being sent to the Collector.
- On the new event source that was just created, click View Raw Log. If you see log messages in the box, this shows that logs are flowing to the Collector.
- Click Log Search in the left menu.
- Select the applicable Log Sets and the Log Names within them. The Log Name will be the event source name or Cloudflare if you did not name the event source. Cloudflare logs flow into the Raw Logs log set.
Log Example
{
"Datetime": "2022-08-15T01:40:59Z",
"Action": "allow",
"Kind": "firewall",
"Source": "firewallrules",
"ClientIP": "123.123.123.123",
"ClientASNDescription": "R7-RAPID7",
"ClientIPClass": "noRecord",
"ClientCountry": "us",
"ClientASN": 14618,
"ClientRequestMethod": "GET",
"ClientRequestUserAgent": "Rapid7 - Mobile",
"ClientRequestPath": "/client/request/path/",
"ClientRequestQuery": "?key=value",
"ClientRequestScheme": "https",
"ClientRequestHost": "www.rapid7.com",
"ClientRefererHost": "www.rapid7.com",
"ClientRefererPath": "/client/reference/path/",
"ClientRefererQuery": "",
"ClientRefererScheme": "https",
"EdgeColoCode": "IAD",
"EdgeResponseStatus": 200,
"RuleID": "e8d36d34b4ed4b718acfdfeb30f64b2b",
"MessageRule": "",
"OriginatorRayID": "00",
"RayID": "73ae39ad9c3182e6",
"MatchIndex": 0
}