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

Adding the Startup Application Query event class in the discovery category. #1119

Merged
merged 30 commits into from
Sep 4, 2024

Conversation

maxhotta
Copy link
Contributor

The Startup Application Query class captures the results of a discovery on target devices.
This class was refactored from a previous submission, while incorporating feedback from Paul.

Description of changes:

Made the Startup Application object more clear by factoring out unrelated items in the type_id list.
The list now describes only the type of application.
A run_mode attribute was added as an array to capture the other items.
Also added a run_state to capture the state of the application at the time the event was logged.

…s used to report startup applications on endpoint devices.
@maxhotta maxhotta added discovery Issues related to Discovery Category v1.3.0 Changes marked for v1.3.0 of OCSF labels Jun 25, 2024
Copy link
Contributor

@davemcatcisco davemcatcisco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a number of concerns about this PR:

  1. If scheduled tasks/jobs are a supported startup application type (and they seem to be because Scheduled is one of the values in start_type_id) then the file and cmd_line attributes should not be required and recommended respectively because Windows scheduled tasks don't necessarily have an associated executable file or command line. Also, the type_id enum should have an entry for a scheduled task/job.
  2. Is there a reason why run_mode isn't run_mode_id with a corresponding run_mode companion attribute?
  3. start_type_id should cross-reference start_type in its sibling property.
  4. Instead of having attributes like start_type_id, cmd_line, file, run_state_id, etc. the startup_app object could (should?) reuse existing object types that describe the same properties of the relevent entities. For example, startup_app could have a win_service attribute that would apply when the type_id is Service. It could have a schedule_job attribute that would apply when the type_id is Scheduled Job. This would avoid the startup_app object having lots of required attributes that don't make sense for certain values of type_id.

@maxhotta
Copy link
Contributor Author

maxhotta commented Jul 2, 2024

@davemcatcisco Per further discussion on your point 4, the consensus was to use a 'just one' constraint on the different types that the startup_app could be, and add objects (as you suggest) to model the startup_app type. I will revise, and post an update with these changes.

maxhotta and others added 5 commits July 15, 2024 20:51
- Add objects that map to items in type_id
- Include a just_one clause for these objects
- Updated run_mode for consistency
@maxhotta
Copy link
Contributor Author

Incorporated most items, except for adding the win_service object as one of the options for the target startup application.
It is defined in the extension dictionary file and thus trying to find a way to include it.

objects/startup_app.json Outdated Show resolved Hide resolved
@maxhotta
Copy link
Contributor Author

maxhotta commented Jul 23, 2024

I've fixed the schema validation issue by 'patching' the startup_app object in windows extensions (per committee discussion). There was an issue in defining the constraints in the patched startup_app object which includes win_service. To address this, I've defined win_service and its corresponding constraint in the core startup_app object.

dictionary.json Show resolved Hide resolved
dictionary.json Show resolved Hide resolved
dictionary.json Outdated Show resolved Hide resolved
dictionary.json Outdated Show resolved Hide resolved
objects/startup_app.json Outdated Show resolved Hide resolved
objects/startup_app.json Outdated Show resolved Hide resolved
objects/startup_app.json Outdated Show resolved Hide resolved
objects/startup_app.json Outdated Show resolved Hide resolved
objects/startup_app.json Outdated Show resolved Hide resolved
objects/startup_app.json Outdated Show resolved Hide resolved
@floydtree floydtree added v1.4.0 Changes marked for the upcoming version 1.4.0 and removed v1.3.0 Changes marked for v1.3.0 of OCSF labels Jul 30, 2024
extensions/windows/objects/startup_app.json Outdated Show resolved Hide resolved
objects/startup_app.json Outdated Show resolved Hide resolved
floydtree
floydtree previously approved these changes Aug 27, 2024
mikeradka
mikeradka previously approved these changes Aug 27, 2024
@maxhotta maxhotta dismissed stale reviews from mikeradka and floydtree via 913e83c August 28, 2024 18:11
Copy link
Contributor

@mikeradka mikeradka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Max

Copy link
Contributor

@davemcatcisco davemcatcisco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thanks for addressing my picky comments. And my apologies for missing the notification asking me to re-review.

@floydtree floydtree merged commit 2540764 into ocsf:main Sep 4, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discovery Issues related to Discovery Category v1.4.0 Changes marked for the upcoming version 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants