Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsingrule Update 2 #28216

Merged
merged 18 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[INGEST:vendor="barracuda", product="cgfw", target_dataset="barracuda_cgfw_raw", no_hit=keep]
alter
filter _raw_log ~= "^.*(\d{10})\s.*BYF" OR _raw_log ~= "\S{3}\s+\S+\s\d{2}\:\d{2}\:\d{2}"
| alter
tmp_time1_get_epoch = arraystring(regextract(_raw_log, "^.*(\d{10})\s.*BYF"), ""),
tmp_time2_gen_year = arraystring(regextract(to_string(_insert_time) , "^.{0,4}"),""), // 2023
tmp_time2_get_datetime_log = replace(arraystring(regextract(_raw_log , "\S{3}\s+\S+\s\d{2}\:\d{2}\:\d{2}"), ""), " ", " ") // Mar 13 07:11:42
Expand Down
5 changes: 3 additions & 2 deletions Packs/Barracuda_Cloudgen_Firewall/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ You need to configure Check Point to forward Syslog messages in CEF format.
3. Set **Enable Syslog Streaming** to **yes**.
4. Click **Send Changes** and **Activate**.

* Pay attention: Timestamp parsing is only supported for UNIX timestamp (UTC).

More details, see [here](https://campus.barracuda.com/product/cloudgenfirewall/doc/96026562/how-to-configure-syslog-streaming/)
## Collect Events from Vendor

Expand All @@ -18,9 +20,8 @@ To create or configure the Broker VM, use the information described [here](https

You can configure the specific vendor and product for this instance.


1. Navigate to **Settings** > **Configuration** > **Data Broker** > **Broker VMs**.
2. Right-click and select **Syslog Collector** > **Configure**.
3. When configuring the Syslog Collector, set the following values:
- vendor as vendor - barracuda
- product as product - cgfw
- product as product - cgfw
6 changes: 6 additions & 0 deletions Packs/Barracuda_Cloudgen_Firewall/ReleaseNotes/1_0_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Parsing Rules

##### Barracuda Cloudgen Firewall Parsing Rules

- Added a filter for the Parsing Rule to enhance its logic.
2 changes: 1 addition & 1 deletion Packs/Barracuda_Cloudgen_Firewall/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Barracuda Cloudgen Firewall",
"description": "Barracuda Cloudgen Friewall modeling rule and parsing rule for XSIAM",
"support": "xsoar",
"currentVersion": "1.0.0",
"currentVersion": "1.0.1",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
[INGEST:vendor="bluecat", product="address_manager", target_dataset="bluecat_address_manager_raw", no_hit=keep]
alter tmp_time1 = arrayindex(regextract(_raw_log,"<\d+>(\w+\s*\d+\s\d+:\d+:\d+)\s"),0),
tmp_Year = format_timestamp("%Y",_insert_time)
filter _raw_log ~= "<\d+>(\w+\s*\d+\s\d+:\d+:\d+)\s"
| alter
tmp_time1 = arrayindex(regextract(_raw_log,"<\d+>(\w+\s*\d+\s\d+:\d+:\d+)\s"),0),
tmp_Year = format_timestamp("%Y",_insert_time)
// Parsing time format 1
| alter tmp_time1_1 = concat(tmp_Year, " ", tmp_time1)
| alter tmp_time1_1 = parse_timestamp("%Y %b %e %H:%M:%S", tmp_time1_1)
| alter tmp_timeDiff = timestamp_diff(tmp_time1_1, current_time(), "DAY")
| alter
tmp_time1_1 = concat(tmp_Year, " ", tmp_time1)
| alter
tmp_time1_1 = parse_timestamp("%Y %b %e %H:%M:%S", tmp_time1_1)
| alter
tmp_timeDiff = timestamp_diff(tmp_time1_1, current_time(), "DAY")
// Check if the date is a future date
| alter tmp_Year2 = if(tmp_timeDiff > 0, to_string(subtract(to_integer(tmp_Year),1)),null)
| alter
tmp_Year2 = if(tmp_timeDiff > 0, to_string(subtract(to_integer(tmp_Year),1)),null)
// Create timestamp minus 1 year if the timestamp is a future one
| alter tmp_time1_2 = if(tmp_Year2 != null, concat(tmp_Year2, " ", tmp_time1), null)
| alter tmp_time1_2 = if(tmp_time1_2 != null, parse_timestamp("%Y %b %e %H:%M:%S", tmp_time1_2), null)
| alter
tmp_time1_2 = if(tmp_Year2 != null, concat(tmp_Year2, " ", tmp_time1), null)
| alter
tmp_time1_2 = if(tmp_time1_2 != null, parse_timestamp("%Y %b %e %H:%M:%S", tmp_time1_2), null)
// final result
| alter _time = coalesce(tmp_time1_2, tmp_time1_1)
| fields -tmp_time1, tmp_Year, tmp_Year2, tmp_timeDiff, tmp_time1_1, tmp_time1_2;
6 changes: 6 additions & 0 deletions Packs/BluecatAddressManager/ReleaseNotes/1_1_11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Parsing Rules

##### Bluecat Address Manager

- Added a filter for the Parsing Rule to enhance its logic.
2 changes: 1 addition & 1 deletion Packs/BluecatAddressManager/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Bluecat Address Manager",
"description": "Use the BlueCat Address Manager integration to enrich IP addresses and manage response policies.",
"support": "xsoar",
"currentVersion": "1.1.10",
"currentVersion": "1.1.11",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[INGEST:vendor="box", product="box", target_dataset="box_box_raw", no_hit=keep]
alter
filter created_at ~= "\d{4}-\d{2}-\d{2}T"
| alter
tmp_create_at_string = to_string(created_at)
| alter
tmp_parse_created = if(created_at ~= "\d{4}-\d{2}-\d{2}T", parse_timestamp("%Y-%m-%dT%H:%M:%S%Ez", tmp_create_at_string), _insert_time)
tmp_parse_created = parse_timestamp("%Y-%m-%dT%H:%M:%S%Ez", tmp_create_at_string)
| alter
_time = tmp_parse_created
| fields -tmp_create_at_string, tmp_parse_created;
6 changes: 6 additions & 0 deletions Packs/Box/ReleaseNotes/3_1_28.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Parsing Rules

##### BoxEventCollector Parsing Rule

- Added a filter for the Parsing Rule to enhance its logic.
2 changes: 1 addition & 1 deletion Packs/Box/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Box",
"description": "Manage Box users",
"support": "xsoar",
"currentVersion": "3.1.27",
"currentVersion": "3.1.28",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down