Skip to content

Commit

Permalink
XSUP-39406-o365-parsing-update (demisto#35827)
Browse files Browse the repository at this point in the history
* Updated ParsingRules, README

* Updated ReleaseNotes

* Updated ReleaseNotes

* Updated ParsingRules

* Updated README

* Update Packs/Office365/README.md

Co-authored-by: ShirleyDenkberg <[email protected]>

* Update Packs/Office365/ReleaseNotes/1_0_4.md

Co-authored-by: ShirleyDenkberg <[email protected]>

---------

Co-authored-by: ShirleyDenkberg <[email protected]>
  • Loading branch information
eepstain and ShirleyDenkberg authored Aug 12, 2024
1 parent 23696f5 commit 71745e6
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 9 deletions.
36 changes: 28 additions & 8 deletions Packs/Office365/ParsingRules/Office365/Office365.xif
Original file line number Diff line number Diff line change
@@ -1,19 +1,39 @@
[INGEST:vendor="msft", product="o365_general", target_dataset="msft_o365_general_raw", no_hit=keep]
filter to_string(CreationTime) ~= ".*\d{2}:\d{2}:\d{2}.*"
filter to_string(CreationTime) ~= "UTC|:\d{2}(?:[\.\d]+)?Z"
| alter
_time = CreationTime;
tmp_string_CreationTime = to_string(CreationTime)
| alter
tmp_check_format = if(tmp_string_CreationTime ~= "UTC", parse_timestamp("%Y-%m-%d %H:%M:%E*S %Z", tmp_string_CreationTime), tmp_string_CreationTime ~= ":\d{2}(?:[\.\d]+)?Z", parse_timestamp("%Y-%m-%dT%H:%M:%E*SZ", tmp_string_CreationTime))
| alter
_time = tmp_check_format
| fields -tmp*;

[INGEST:vendor="msft", product="o365_exchange_online", target_dataset="msft_o365_exchange_online_raw", no_hit=keep]
filter to_string(CreationTime) ~= ".*\d{2}:\d{2}:\d{2}.*"
filter to_string(CreationTime) ~= "UTC|:\d{2}(?:[\.\d]+)?Z"
| alter
tmp_string_CreationTime = to_string(CreationTime)
| alter
tmp_check_format = if(tmp_string_CreationTime ~= "UTC", parse_timestamp("%Y-%m-%d %H:%M:%E*S %Z", tmp_string_CreationTime), tmp_string_CreationTime ~= ":\d{2}(?:[\.\d]+)?Z", parse_timestamp("%Y-%m-%dT%H:%M:%E*SZ", tmp_string_CreationTime))
| alter
_time = CreationTime;
_time = tmp_check_format
| fields -tmp*;

[INGEST:vendor="msft", product="o365_sharepoint_online", target_dataset="msft_o365_sharepoint_online_raw", no_hit=keep]
filter to_string(CreationTime) ~= ".*\d{2}:\d{2}:\d{2}.*"
filter to_string(CreationTime) ~= "UTC|:\d{2}(?:[\.\d]+)?Z"
| alter
_time = CreationTime;
tmp_string_CreationTime = to_string(CreationTime)
| alter
tmp_check_format = if(tmp_string_CreationTime ~= "UTC", parse_timestamp("%Y-%m-%d %H:%M:%E*S %Z", tmp_string_CreationTime), tmp_string_CreationTime ~= ":\d{2}(?:[\.\d]+)?Z", parse_timestamp("%Y-%m-%dT%H:%M:%E*SZ", tmp_string_CreationTime))
| alter
_time = tmp_check_format
| fields -tmp*;

[INGEST:vendor="msft", product="o365_dlp", target_dataset="msft_o365_dlp_raw", no_hit=keep]
filter to_string(CreationTime) ~= ".*\d{2}:\d{2}:\d{2}.*"
filter to_string(CreationTime) ~= "UTC|:\d{2}(?:[\.\d]+)?Z"
| alter
tmp_string_CreationTime = to_string(CreationTime)
| alter
tmp_check_format = if(tmp_string_CreationTime ~= "UTC", parse_timestamp("%Y-%m-%d %H:%M:%E*S %Z", tmp_string_CreationTime), tmp_string_CreationTime ~= ":\d{2}(?:[\.\d]+)?Z", parse_timestamp("%Y-%m-%dT%H:%M:%E*SZ", tmp_string_CreationTime))
| alter
_time = CreationTime;
_time = tmp_check_format
| fields -tmp*;
6 changes: 6 additions & 0 deletions Packs/Office365/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,10 @@ Timestamp ingestion for Office 365 logs is currently available for the following
* Exchange Online &rarr; `msft_o365_exchange_online_raw`
* SharePoint Online &rarr; `msft_o365_sharepoint_online_raw`
* DLP &rarr; `msft_o365_dlp_raw`

The ingestion is made using the CreationTime field in the following formats:
* yyyy-mm-ddThh:mm:ssZ
* yyyy-mm-ddThh:mm:ss.msZ
* yyyy-mm-dd hh:mm:ss UTC
* yyyy-mm-dd hh:mm:ss.ms UTC
</~XSIAM>
6 changes: 6 additions & 0 deletions Packs/Office365/ReleaseNotes/1_0_4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Parsing Rules

##### Office 365 Parsing Rule

Updated the Parsing Rule logic, ingesting specific UTC time formats from the CreationTime field.
2 changes: 1 addition & 1 deletion Packs/Office365/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Office 365",
"description": "The product family of productivity and collaboration cloud based softwares owned by Microsoft.",
"support": "xsoar",
"currentVersion": "1.0.3",
"currentVersion": "1.0.4",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down

0 comments on commit 71745e6

Please sign in to comment.