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

Create generate_datamodels script #170

Merged
merged 24 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
24e3dc9
grabbed cleaned up datamodels from the yaml branch
Amndeep7 Feb 23, 2023
89e10e8
added coverage map attribute and fixed some weird file permissions
Amndeep7 Feb 23, 2023
ad45f84
implemented data model template
Amndeep7 Feb 24, 2023
8ca29c2
changed up whitespace and also used td instead of th
Amndeep7 Feb 24, 2023
a51838f
changed whitespace again and simplified table structure
Amndeep7 Feb 24, 2023
ffac373
trying with th again
Amndeep7 Feb 24, 2023
6937482
wrapped examples with code tags
Amndeep7 Feb 24, 2023
6649d58
fixed tables to actually show the sensors
Amndeep7 Feb 24, 2023
5d01e40
markdown links don't work in html table
Amndeep7 Feb 24, 2023
e7ac755
update references to the glossary's location and also run the redirec…
Amndeep7 Feb 26, 2023
a951c30
made the key of the dict the filename instead of the path since i nev…
Amndeep7 Feb 26, 2023
e4b4a89
generate index file from template
Amndeep7 Feb 26, 2023
0912ea8
generate index with sensors
Amndeep7 Feb 27, 2023
01ff21d
formatting change to fix tables
Amndeep7 Feb 27, 2023
5b9c3a8
use the more modern pathlib instead of path and glob
Amndeep7 Feb 27, 2023
c8c2314
resolved conflicts
Amndeep7 Feb 27, 2023
581658f
added generate_datamodels to the workflow
Amndeep7 Feb 27, 2023
2e5f456
added coverage field to datamodel schema
Amndeep7 Feb 27, 2023
7abef66
reran generate analytics - just seem to hae changed the order for som…
Amndeep7 Feb 27, 2023
292d191
reran generate sensors - seems to put the data model coverage section…
Amndeep7 Feb 27, 2023
1ac88dc
reran generate nav layer - seems to be a reordering
Amndeep7 Feb 27, 2023
d720756
handle case where data_model directory is removed entirely before reg…
Amndeep7 Feb 27, 2023
9f06a95
reran generate_datamodels - changes to file permissions to not be exe…
Amndeep7 Feb 27, 2023
6a882ac
Automated commit to rebuild the static site
Amndeep7 Feb 27, 2023
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
5 changes: 2 additions & 3 deletions data_model/authentication.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Authentication
description: Authentication events occur whenever a user attempts to login to a system, or a user or process attempts to access a privileged system resource.
description: An authentication event occurs whenever a user or process attempts to access a privileged system resource. Examples include logging into a system, or elevating privilege.
actions:
- name: success
description: The event corresponding to an authentication service responding positively to an authentication request.
Expand All @@ -12,7 +12,7 @@ fields:
- name: app_name
description: Name of the application that made the authentication request
example: ssh, win:local
- name: method
- name: method
description: The authentication method that was used.
example: SMAL, Kerberos
- name: auth_service
Expand Down Expand Up @@ -66,4 +66,3 @@ fields:
- name: target_user
description: Name of the user being authenticated; this only pertains to privilage escalation events where the current user is not necessarily the same as the target user.
example: HOST1\LOCALUSER2

10 changes: 9 additions & 1 deletion data_model/driver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,12 @@ fields:
example: 1533
- name: signature_valid
description: Boolean indicator of whether the driver is signed and whether the signature is current and not revoked
example: True
example: true
coverage_map:
load:
fqdn: ["sysmon_13"]
image_path: ["sysmon_13"]
pid: ["sysmon_13"]
sha256_hash: ["sysmon_13"]
signature_valid: ["sysmon_13"]
signer: ["sysmon_13"]
21 changes: 2 additions & 19 deletions data_model/email.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Email
description: Email events are at the email server level.
description: Email events are at the mail server level.
actions:
- name: deliver
description: The event corresponding to an email being sent to an end recipient.
Expand All @@ -16,7 +16,7 @@ fields:
- name: action_reason
description: The rationale given for blocking, redirecting, or quarantining an email.
example: "Malformed Message"
- name: attachment_name
- name: attachment_name
description: Filename of any email attachment that may exist.
example: "cuddly-cats.pdf"
- name: attachment_size
Expand Down Expand Up @@ -75,20 +75,3 @@ fields:
- name: to
description: the content of the To field in the email header; does not necessarily match up with real recipients.
example: "adam@example.com"

















37 changes: 36 additions & 1 deletion data_model/file.yaml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,42 @@ fields:
example: 0644 (linux) or NTFS ACL
- name: signature_valid
description: Boolean indicator of whether the signature is valid; empty if file is not signed.
example: True
example: true
- name: uid
description: The user ID or SID for the acting entity.
example: S-1-5-18
coverage_map:
create:
company: ["autoruns_13.98", "sysmon_13"]
creation_time: ["autoruns_13.98", "sysmon_13"]
file_name: ["autoruns_13.98"]
file_path: ["sysmon_13"]
fqdn: ["autoruns_13.98", "sysmon_13"]
hostname: ["autoruns_13.98"]
image_path: ["sysmon_13"]
md5_hash: ["autoruns_13.98"]
pid: ["sysmon_13"]
signer: ["sysmon_13"]
delete:
fqdn: ["sysmon_13"]
image_path: ["sysmon_13"]
pid: ["sysmon_13"]
uid: ["sysmon_13"]
modify:
company: ["autoruns_13.98"]
creation_time: ["autoruns_13.98"]
file_name: ["autoruns_13.98"]
fqdn: ["autoruns_13.98"]
hostname: ["autoruns_13.98"]
md5_hash: ["autoruns_13.98"]
sha256_hash: ["autoruns_13.98"]
signature_valid: ["autoruns_13.98"]
signer: ["autoruns_13.98"]
timestomp:
creation_time: ["sysmon_13"]
file_path: ["sysmon_13"]
fqdn: ["sysmon_13"]
image_path: ["sysmon_13"]
pid: ["sysmon_13"]
previous_creation_time: ["sysmon_13"]
uid: ["sysmon_13"]
20 changes: 19 additions & 1 deletion data_model/flow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,22 @@ fields:
example: TCP
- name: uid
description: User ID or SID of the flow-handling entity.
example: S-1-5-18
example: S-1-5-18
coverage_map:
start:
dest_hostname: ["sysmon_13"]
dest_ip: ["sysmon_13"]
dest_port: ["sysmon_13"]
exe: ["sysmon_13"]
fqdn: ["sysmon_13"]
hostname: ["sysmon_13"]
image_path: ["sysmon_13"]
pid: ["sysmon_13"]
src_fdqn: ["sysmon_13"]
src_hostname: ["sysmon_13"]
src_ip: ["sysmon_13"]
src_port: ["sysmon_13"]
start_time: ["sysmon_13"]
transport_protocol: ["sysmon_13"]
uid: ["sysmon_13"]
user: ["sysmon_13"]
20 changes: 1 addition & 19 deletions data_model/http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fields:
- name: hostname
description: hostname on which the request was seen.
example: HOST1
- name: request_body_bytes
- name: request_body_bytes
description: Integer value corresponding to the total number of bytes in the request.
example: 180
- name: http_version
Expand Down Expand Up @@ -60,21 +60,3 @@ fields:
- name: user_agent_version
description: User Agent Version. Note that some User Agent strings may not label versions in the same way.
example: 4.0


















19 changes: 16 additions & 3 deletions data_model/module.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Library
description: Libraries correspond to executable (and potentially non-executable) content, and are loaded as a contiguous region of memory into the address space of a process. Each process will have the main image loaded as a shared library or module (DLLs in Windows) and their dependencies.
name: Module
description: Modules correspond to executable (and potentially non-executable) content, and are loaded as a contiguous region of memory into the address space of a process. Each process will have the main image loaded as a module and shared libraries (DLLs in Windows) and their dependencies.
actions:
- name: load
description: A module load event occurs when a PE image (dll or exe) is loaded into a process.
Expand Down Expand Up @@ -45,4 +45,17 @@ fields:
example: 50
- name: signature_valid
description: Boolean indicator of whether the signature is current and not revoked
example: True
example: true
coverage_map:
load:
fqdn: ["sysmon_13"]
hostname: ["sysmon_13"]
image_path: ["sysmon_13"]
md5_hash: ["sysmon_13"]
module_name: ["sysmon_13"]
module_path: ["sysmon_13"]
pid: ["sysmon_13"]
sha1_hash: ["sysmon_13"]
signature_valid: ["sysmon_13"]
signer: ["sysmon_13"]
tid: ["sysmon_13"]
26 changes: 25 additions & 1 deletion data_model/process.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fields:
example: "{f81d4fae-7dec-11d0-a765-00a0c91e6bf6}"
- name: signature_valid
description: Boolean indicator of whether signature is current and not revoked.
example: True
example: true
- name: target_guid
description: Global Unique Identifier for the target process (only for process access events).
- name: target_pid
Expand All @@ -93,3 +93,27 @@ fields:
- name: uid
description: User ID under which original process is running.
example: 509
coverage_map:
access:
access_level: ["sysmon_13"]
call_trace: ["sysmon_13"]
fqdn: ["sysmon_13"]
guid: ["sysmon_13"]
image_path: ["sysmon_13"]
pid: ["sysmon_13"]
sid: ["sysmon_13"]
target_guid: ["sysmon_13"]
target_pid: ["sysmon_13"]
target_name: ["sysmon_13"]
create:
command_line: ["sysmon_13"]
current_working_directory: ["sysmon_13"]
fqdn: ["sysmon_13"]
image_path: ["sysmon_13"]
integrity_level: ["sysmon_13"]
parent_command_line: ["sysmon_13"]
parent_guid: ["sysmon_13"]
pid: ["sysmon_13"]
ppid: ["sysmon_13"]
sha256_hash: ["sysmon_13"]
sid: ["sysmon_13"]
40 changes: 40 additions & 0 deletions data_model/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,43 @@ fields:
- name: new_content
description: The data within the new value, or the new name of a key, after an edit event.
example: \%SystemRoot%\system32\svchost.exe, HKLM\SYSTEM\CurrentControlSet\services\RpcSs
coverage_map:
add:
data: ["autoruns_13.98", "sysmon_13"]
fqdn: ["sysmon_13"]
hostname: ["autoruns_13.98"]
hive: ["autoruns_13.98", "sysmon_13"]
key: ["autoruns_13.98", "sysmon_13"]
image_path: ["sysmon_13"]
pid: ["sysmon_13"]
type: ["autoruns_13.98"]
user: ["sysmon_13"]
value: ["autoruns_13.98"]
key_edit:
data: ["autoruns_13.98", "sysmon_13"]
fqdn: ["sysmon_13"]
hostname: ["autoruns_13.98"]
hive: ["autoruns_13.98", "sysmon_13"]
key: ["autoruns_13.98", "sysmon_13"]
image_path: ["sysmon_13"]
new_content: ["autoruns_13.98", "sysmon_13"]
pid: ["sysmon_13"]
type: ["autoruns_13.98"]
user: ["sysmon_13"]
value: ["autoruns_13.98", "sysmon_13"]
remove:
data: ["sysmon_13"]
fqdn: ["sysmon_13"]
hive: ["sysmon_13"]
key: ["sysmon_13"]
image_path: ["sysmon_13"]
pid: ["sysmon_13"]
user: ["sysmon_13"]
value_edit:
data: ["autoruns_13.98"]
hostname: ["autoruns_13.98"]
hive: ["autoruns_13.98"]
key: ["autoruns_13.98"]
new_content: ["autoruns_13.98"]
type: ["autoruns_13.98"]
value: ["autoruns_13.98"]
15 changes: 14 additions & 1 deletion data_model/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,17 @@ fields:
example: 1860
- name: uid
description: The ID of SID of the user who acted on the service
example: S-1-5-18
example: S-1-5-18
coverage_map:
create:
command_line: ["autoruns_13.98"]
exe: ["autoruns_13.98"]
fqdn: ["autoruns_13.98"]
hostname: ["autoruns_13.98"]
image_path: ["autoruns_13.98"]
delete:
command_line: ["autoruns_13.98"]
exe: ["autoruns_13.98"]
fqdn: ["autoruns_13.98"]
hostname: ["autoruns_13.98"]
image_path: ["autoruns_13.98"]
49 changes: 30 additions & 19 deletions data_model/socket.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ fields:
- name: pid
description: ID of the process that acted on the socket
example: 3930
- name: image_path
- name: image_path
description: Path to the executable that initiated the socket event.
example: C:/user/adam/malware.exe
- name: success
description: Boolean indicator of whether the socket event was successful (e.g. the socket was created as requested)
example: True
example: true
- name: family
description: The type of socket in question
example: AF_UNIX, AF_INET, AF_INET6
Expand All @@ -39,20 +39,31 @@ fields:
- name: local_path
description: In the case that a socket is used for local interprocess communication, the socket binds to a local filepath, and will usually be visible in the filesystem. This is the case with AF_UNIX type sockets.
example: "/tmp/foo"

















coverage_map:
bind:
family: ["osquery_4.6.0"]
image_path: ["osquery_4.6.0"]
local_address: ["osquery_4.6.0"]
local_port: ["osquery_4.6.0"]
pid: ["osquery_4.6.0"]
protocol: ["osquery_4.6.0"]
remote_address: ["osquery_4.6.0"]
remote_port: ["osquery_4.6.0"]
listen:
family: ["osquery_4.6.0"]
image_path: ["osquery_4.6.0"]
local_address: ["osquery_4.6.0"]
local_port: ["osquery_4.6.0"]
pid: ["osquery_4.6.0"]
protocol: ["osquery_4.6.0"]
remote_address: ["osquery_4.6.0"]
remote_port: ["osquery_4.6.0"]
close:
family: ["osquery_4.6.0"]
image_path: ["osquery_4.6.0"]
local_address: ["osquery_4.6.0"]
local_port: ["osquery_4.6.0"]
pid: ["osquery_4.6.0"]
protocol: ["osquery_4.6.0"]
remote_address: ["osquery_4.6.0"]
remote_port: ["osquery_4.6.0"]
13 changes: 13 additions & 0 deletions data_model/thread.yaml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,16 @@ fields:
- name: uid
description: The ID of SID of the user who directly or indirectly acted on the thread
example: S-1-5-18
coverage_map:
remote_create:
hostname: ["sysmon_13"]
src_pid: ["sysmon_13"]
src_tid: ["sysmon_13"]
start_address: ["sysmon_13"]
start_function: ["sysmon_13"]
start_module: ["sysmon_13"]
start_module_name: ["sysmon_13"]
tgt_pid: ["sysmon_13"]
tgt_tid: ["sysmon_13"]
uid: ["sysmon_13"]
user: ["sysmon_13"]
5 changes: 2 additions & 3 deletions data_model/user_session.yaml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: User Sesssion
name: User Session
description: User sessions are the user activities undertaken on the computer in the course of conducting standard user actions.
actions:
- name: lock
Expand Down Expand Up @@ -42,5 +42,4 @@ fields:
example: S-1-5-18
- name: login_successful
description: Boolean indicator of whether a login attempt was successful
example: False

example: false
Loading