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

[RFC] Stage 1: Introducing new fields in file/dll/process fields #2395

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions rfcs/text/0048-fileorigin-fields.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 0048: File Origin Fields
<!-- Leave this ID at 0000. The ECS team will assign a unique, contiguous RFC number upon merging the initial stage of this RFC. -->

- Stage: **0 (strawperson)** <!-- Update to reflect target stage. See https://elastic.github.io/ecs/stages.html -->
- Date: **2024-10-15** <!-- The ECS team sets this date at merge time. This is the date of the latest stage advancement. -->
- Stage: **1 (Draft)** <!-- Update to reflect target stage. See https://elastic.github.io/ecs/stages.html -->
- Date: **2024-XX-XX** <!-- The ECS team sets this date at merge time. This is the date of the latest stage advancement. -->

<!--
As you work on your RFC, use the "Stage N" comments to guide you in what you should focus on, for the stage you're targeting.
Expand Down Expand Up @@ -49,12 +49,12 @@ Field | Type | Description /Usage
file.origin_referrer_url | keyword | The URL of the webpage that linked to the file.
file.origin_url | keyword | The URL where the file is hosted.
file.zone_identifier | short | Numerical identifier that indicates the security zone of a file's origin.
process.origin_referrer_url | keyword | The URL of the webpage that linked to the file.
process.origin_url | keyword | The URL where the file is hosted.
process.zone_identifier | short | Numerical identifier that indicates the security zone of a file's origin.
dll.origin_referrer_url | keyword | The URL of the webpage that linked to the file.
dll.origin_url | keyword | The URL where the file is hosted.
dll.zone_identifier | short | Numerical identifier that indicates the security zone of a file's origin.
process.origin_referrer_url | keyword | The URL of the webpage that linked to the process's executable file.
process.origin_url | keyword | The URL where the process's executable file is hosted.
process.zone_identifier | short | Numerical identifier that indicates the security zone of the executable file's origin.
dll.origin_referrer_url | keyword | The URL of the webpage that linked to the dll file.
dll.origin_url | keyword | The URL where the dll file is hosted.
dll.zone_identifier | short | Numerical identifier that indicates the security zone of the dll file's origin.

<!--
Stage 2: Add or update all remaining field definitions. The list should now be exhaustive. The goal here is to validate the technical details of all remaining fields and to provide a basis for releasing these field definitions as beta in the schema. Use GitHub code blocks with yml syntax formatting, and add them to the corresponding RFC folder.
Expand All @@ -66,12 +66,21 @@ Stage 2: Add or update all remaining field definitions. The list should now be e
Stage 1: Describe at a high-level how these field changes will be used in practice. Real world examples are encouraged. The goal here is to understand how people would leverage these fields to gain insights or solve problems. ~1-3 paragraphs.
-->

* File
* A file open event may be generated when a file is opened. By including the file's origin information in the event, the system can assess whether the file might be malware downloaded from a malicious website based on those URLs.
* Process
* Generally, a process is generated from an executable file. However, there's a possibility that the executable file originating the process could be malware. To enhance security, we aim to include the executable file’s origin information at the process creation event and use the origin URL to help determine if the file is malicious.
* DLL
* A process may load DLLs (libraries) as needed. However, there are cases where a malicious DLL prepared by an attacker might be loaded. To enhance security, we would like to check whether the loaded DLL was downloaded from the internet and, if so, where it was downloaded from. This information can help in determining whether the loaded DLL is malicious.

## Source data

<!--
Stage 1: Provide a high-level description of example sources of data. This does not yet need to be a concrete example of a source document, but instead can simply describe a potential source (e.g. nginx access log). This will ultimately be fleshed out to include literal source examples in a future stage. The goal here is to identify practical sources for these fields in the real world. ~1-3 sentences or unordered list.
-->

Example sources of data is shown in the above.

<!--
Stage 2: Included a real world example source document. Ideally this example comes from the source(s) identified in stage 1. If not, it should replace them. The goal here is to validate the utility of these field changes in the context of a real world example. Format with the source name as a ### header and the example document in a GitHub code block with json formatting, or if on the larger side, add them to the corresponding RFC folder.
-->
Expand Down Expand Up @@ -135,7 +144,7 @@ e.g.:

<!-- An RFC should link to the PRs for each of it stage advancements. -->

* Stage 0: https://github.com/elastic/ecs/pull/2387
* Stage 1: https://github.com/elastic/ecs/pull/2395

<!--
* Stage 1: https://github.com/elastic/ecs/pull/NNN
Expand Down
33 changes: 33 additions & 0 deletions rfcs/text/0048/dll.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
- name: dll
title: DLL
group: 2
short: These fields contain information about code libraries dynamically loaded into processes.
description: |-
These fields contain information about code libraries dynamically loaded into processes.

Many operating systems refer to "shared code libraries" with different names, but this field set refers to all of the following:
* Dynamic-link library (`.dll`) commonly used on Windows
* Shared Object (`.so`) commonly used on Unix-like operating systems
* Dynamic library (`.dylib`) commonly used on macOS
type: group

fields:
- name: origin_referrer_url
level: extended
type: keyword
ignore_above: 8192
description: The URL of the webpage that linked to the dll file.
example: http://example.com/article1.html

- name: origin_url
level: extended
type: keyword
ignore_above: 8192
description: The URL where the dll file is hosted.
example: http://example.com/files/example.dll

- name: zone_identifier
level: extended
type: short
description: Numerical identifier that indicates the security zone of the dll file's origin.
example: 3
31 changes: 31 additions & 0 deletions rfcs/text/0048/file.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
- name: file
group: 2
title: File
short: Fields describing files.
description: >
A file is defined as a set of information that has been created on, or has existed on a filesystem.

File objects can be associated with host events, network events,
and/or file events (e.g., those produced by File Integrity Monitoring [FIM] products or services).
File fields provide details about the affected file associated with the event or metric.
type: group
fields:
- name: origin_referrer_url
level: extended
type: keyword
ignore_above: 8192
description: The URL of the webpage that linked to the file.
example: http://example.com/article1.html

- name: origin_url
level: extended
type: keyword
ignore_above: 8192
description: The URL where the file is hosted.
example: http://example.com/imgs/article1_img1.jpg

- name: zone_identifier
level: extended
type: short
description: Numerical identifier that indicates the security zone of a file's origin.
example: 3
31 changes: 31 additions & 0 deletions rfcs/text/0048/process.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
- name: process
title: Process
group: 2
short: These fields contain information about a process.
description: >
These fields contain information about a process.

These fields can help you correlate metrics information with a process id/name
from a log message. The `process.pid` often stays in the metric itself and is
copied to the global field for correlation.
type: group
fields:
- name: origin_referrer_url
level: extended
type: keyword
ignore_above: 8192
description: The URL of the webpage that linked to the process's executable file.
example: http://example.com/article1.html

- name: origin_url
level: extended
type: keyword
ignore_above: 8192
description: The URL where the process's executable file is hosted.
example: http://example.com/files/example.exe

- name: zone_identifier
level: extended
type: short
description: Numerical identifier that indicates the security zone of the executable file's origin.
example: 3