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

Examples mappings #564

Merged
merged 29 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2b1b6ca
mapping examples for GoldenSAML WindowsEvents
pcoccoli Jul 19, 2024
5a31518
initial kestrel-tool commit with mkdb command
pcoccoli Jul 22, 2024
bb22a87
add GoldenSAML_Microsoft365DefenderEvents example mapping
pcoccoli Jul 24, 2024
9a7e89a
kestrel-tool mkdb: deserialize _string fields for better flattening
pcoccoli Jul 24, 2024
f913a0a
add api_activity to MDE mapping
pcoccoli Jul 24, 2024
9b02056
fix mapping for WindowsEvents
subbyte Jul 25, 2024
d5c57f5
add managed_entity mapping; extract uuid
subbyte Jul 25, 2024
7463992
Fix EventID mapping in GoldenSAML WindowsEvents
pcoccoli Jul 25, 2024
6c39c11
Merge branch 'develop' into examples_mappings
pcoccoli Jul 25, 2024
2cdb462
remove comment; fixed for top level attribute
subbyte Jul 25, 2024
06d3c10
fix pid float issue in ingestion
subbyte Jul 25, 2024
c67347d
Merge branch 'develop' into examples_mappings
pcoccoli Jul 25, 2024
f96c844
Merge branch 'develop' into examples_mappings
pcoccoli Jul 26, 2024
875dbac
beef up GoldenSAML WindowsEvents config
subbyte Jul 26, 2024
d90afc2
use original Windows event description
subbyte Jul 26, 2024
93c70fe
remove redundant event mapping
subbyte Jul 26, 2024
c478ab4
Improve GoldenSAML MDE mapping
pcoccoli Jul 26, 2024
cc43a4a
add endpoint to user mapping
subbyte Jul 26, 2024
9a6a797
Remove activities level from GoldenSAML mappings
pcoccoli Jul 26, 2024
d67c515
coalesce projected columns if necessary
pcoccoli Jul 26, 2024
59548da
update MDE yaml
subbyte Jul 26, 2024
d929522
reformat mkdb.py
pcoccoli Jul 26, 2024
37330f5
reorder imports
pcoccoli Jul 26, 2024
8aa2156
add GoldenSAML_AADAuditEvents example mapping
pcoccoli Jul 26, 2024
49ee342
isort
subbyte Jul 26, 2024
6f61281
complete LdapSearch mapping
subbyte Jul 26, 2024
3a7ce28
fix MDE mapping
subbyte Jul 27, 2024
2b62c34
upgrade data mappings for GoldenSAML
subbyte Jul 27, 2024
34def5f
black code
subbyte Jul 27, 2024
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# SecurityDatasets GoldenSAML AADAuditEvents.json to OSCF mapping


time: TimeGenerated


# endpoint: see https://schema.ocsf.io/1.1.0/objects/endpoint
device: &endpoint
uid: TenantId


# https://schema.ocsf.io/1.1.0/objects/http_request
http_request:
user_agent: UserAgent


# https://schema.ocsf.io/1.1.0/objects/managed_entity
entity:
uid:
- targetId
- ModifiedApplicationObjectId
type:
- targetType
- Type
name:
- targetDisplayName
- ModifiedApplication
data: TargetResources


actor:
user:
endpoint: *endpoint
uid: InitiatedBy.user.id
name: InitiatedBy.user.userPrincipalName


# https://schema.ocsf.io/1.2.0/classes/user_access
privileges: Permissions


type_uid:
native_field: OperationName
native_value:
300403: # Entity Management: Update
- "Update application – Certificates and secrets management "
- "Update application"
300501: # User Access Management: Assign Privileges
- "Add delegated permission grant"

type_name: OperationName

status_id:
- native_field: Result
native_value:
1: # Success
- "success"
2: # Failure
- "failure"
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# SecurityDatasets GoldenSAML Microsoft365DefenderEvents.json to OSCF mapping


time: Timestamp


# endpoint: see https://schema.ocsf.io/1.1.0/objects/endpoint
device: &endpoint
hostname: DeviceName
uid: DeviceId


file: &file
endpoint: *endpoint
name: FileName


# https://schema.ocsf.io/1.1.0/objects/process
process:
endpoint: *endpoint
cmd_line: ProcessCommandLine
pid: ProcessId
uid: ProcessId
hash:
md5: MD5
sha1: SHA1
sha256: SHA256


actor:
process:
endpoint: *endpoint
cmd_line: InitiatingProcessCommandLine
pid: InitiatingProcessId
uid: InitiatingProcessId
parent_process:
endpoint: *endpoint
pid: InitiatingProcessParentId
uid: InitiatingProcessParentId
file:
name: InitiatingProcessParentFileName
file:
name: InitiatingProcessFileName
path: InitiatingProcessFolderPath
hash:
md5: InitiatingProcessMD5
sha1: InitiatingProcessSHA1
sha256: InitiatingProcessSHA256
parent_folder:
native_field: InitiatingProcessFolderPath
native_op: LIKE
native_value: winpath_startswith
ocsf_value: dirname
user:
endpoint: *endpoint
uid: InitiatingProcessAccountSid
name: InitiatingProcessAccountName
domain: InitiatingProcessAccountDomain


# src_endpoint: see https://schema.ocsf.io/1.1.0/objects/endpoint
src_endpoint:
ip: IPAddress
port: Port


# dst_endpoint: see https://schema.ocsf.io/1.1.0/objects/endpoint
dst_endpoint:
hostname: DestinationDeviceName
ip: DestinationIPAddress
port: DestinationPort


# https://schema.ocsf.io/1.1.0/objects/user
user:
domain: AccountDomain
name: AccountName
uid: AccountSid


# https://schema.ocsf.io/1.1.0/objects/http_request
http_request:
user_agent: UserAgent


# https://schema.ocsf.io/1.1.0/objects/query_info
query_info:
uid: ReportId_long
attr_list: AdditionalFields_string.AttributeList
search_filter: AdditionalFields_string.SearchFilter


# https://schema.ocsf.io/1.1.0/objects/managed_entity
entity:
uid: ReportId_long
data: ActivityObjects


# https://schema.ocsf.io/1.2.0/classes/user_access
privileges: Permissions


# https://schema.ocsf.io/1.1.0/classes/base_event
# Base Event
type_uid:
native_field: ActionType
native_value:
300403: # Entity Management: Update
- "MailItemsAccessed"
300501: # User Access Management: Assign Privileges
- "Add delegated permission grant."
600504: # Datastore Activity: Query
- "LdapSearch"
600599: # Datastore Activity: Other
- "Directory Services replication"

type_name: ActionType

status_id:
- native_field: RawEventData.ResultStatus
native_value:
1: # Success
- "Succeeded"
2: # Failure
- "Failed"
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# SecurityDatasets GoldenSAML AADAuditEvents.json to OSCF mapping


time: TimeGenerated


# endpoint: see https://schema.ocsf.io/1.1.0/objects/endpoint
device: &endpoint
uid: TenantId


# src_endpoint: see https://schema.ocsf.io/1.1.0/objects/endpoint
src_endpoint:
ip: Client_IPAddress
port: Client_Port


# https://schema.ocsf.io/1.1.0/objects/managed_entity
entity:
uid: MailboxGuid
type: Type
data: Folders


actor:
user:
endpoint: *endpoint
uid: LogonUserSid
name: UserId


type_uid:
native_field: Operation
native_value:
300403: # Entity Management: Update
- "MailItemsAccessed"

type_name: Operation

status_id:
- native_field: ResultStatus
native_value:
1: # Success
- "Succeeded"
2: # Failure
- "Failed"
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# SecurityDatasets GoldenSAML WindowsEvents.json to OSCF mapping

time: TimeGenerated

# endpoint: see https://schema.ocsf.io/1.1.0/objects/endpoint
device: &endpoint
hostname:
native_field: Computer
ocsf_value: lowercase
uid: _ResourceId


file: &file
endpoint: *endpoint
name: PipeName
type_id:
native_field: EventID
native_value:
6: 18


# https://schema.ocsf.io/1.1.0/objects/process
process: &process
endpoint: *endpoint
name:
native_field: Image
native_op: LIKE
native_value: winpath_endswith
ocsf_value: basename
pid:
native_field: ProcessId_dynamic
ocsf_value: to_int
uid: ProcessGuid
file:
name:
native_field: Image
native_op: LIKE
native_value: winpath_endswith
ocsf_value: basename
path: Image
parent_folder:
native_field: Image
native_op: LIKE
native_value: winpath_startswith
ocsf_value: dirname


# src_endpoint: see https://schema.ocsf.io/1.1.0/objects/endpoint
src_endpoint: &src_ref
ip: SourceAddress
port:
- native_field: SourcePort
ocsf_value: to_int
# normalized by ingestion
#- native_field: IpPort
# ocsf_value: to_int


# dst_endpoint: see https://schema.ocsf.io/1.1.0/objects/endpoint
dst_endpoint: &dst_ref
ip: DestAddress
port:
- native_field: DestPort
ocsf_value: to_int


# https://schema.ocsf.io/1.1.0/objects/user
user: &user
endpoint: *endpoint
domain: TargetDomainName
name: TargetUserName
uid: TargetUserSid


# https://schema.ocsf.io/1.2.0/objects/managed_entity?extensions=
entity:
uid: ObjectName
type: ObjectType
data: Properties


# https://schema.ocsf.io/1.1.0/classes/authentication?extensions=win
# Authentication [3002]
auth_protocol: AuthenticationPackageName
logon_type_id:
- native_field: LogonType
ocsf_value: to_int


# https://schema.ocsf.io/1.1.0/classes/base_event
# Base Event
type_uid:
native_field: EventID
native_value:
100101: # File System Activity: Create
- 11 # Sysmon: FileCreate
100701: # Process Activity: Launch
- 1 # Sysmon: Process creation
- 4688 # Security: Process Create
100702: # Process Activity: Terminate
- 5 # Sysmon: Process termindated
- 4689
100703: # Process Activity: Open
- 10 # Sysmon: ProcessAccess
100704: # Process Activity: Inject
- 8 # Sysmon: CreateRemoteThread
300201: # auth: logon (success and failure)
- 4624 # Security: An account was successfully logged on.
- 4625 # Security: An account failed to log on.
300400: # Entity Management: Unknown
- 4662 # Security: An operation was performed on an object.
400101: # Network Activity: Open
- 3 # Sysmon: Network connection
- 5156 # Security: The Windows Filtering Platform has permitted a connection.
100114: # File System Activity: Open
- 18 # Sysmon: Pipe connected
100799: # Process Activity: Other
- 501 # Desktop Window Manager is experiencing heavy resource contention

type_name:
native_field: EventID
native_value:
Pipe connected: 18
An account was successfully logged on: 4624
An account failed to log on: 4625
An operation was performed on an object: 4662
Desktop Window Manager is experiencing heavy resource contention: 501
The Windows Filtering Platform has permitted a connection: 5156

status_id:
- native_field: event.code
native_value:
1: # Success
- 4624 # Security: An account was successfully logged on.
2: # Failure
- 4625 # Security: An account failed to log on.


actor:
process: *process
user:
domain: SubjectDomainName
name: SubjectUserName
uid: SubjectUserSid
Loading
Loading