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

PantherFlow Investigator Helper #1436

Merged
merged 4 commits into from
Dec 4, 2024
Merged

Conversation

arielkr256
Copy link
Contributor

Background

Adds a helper function to convert an event into a PantherFlow query to investigate the context surrounding the event. It searches +/- 30 minutes, for the logtype of the event, with any similar p_any indicator fields.

Changes

  • New pantherflow_investigation helper
  • Updated AWS and Okta alert context to add PantherFlow Investigation query

Testing

  • generated queries tested in dev environment

@arielkr256 arielkr256 requested a review from a team as a code owner November 27, 2024 18:27
@arielkr256
Copy link
Contributor Author

arielkr256 commented Nov 27, 2024

Example generated query:

union panther_signals.public.correlation_signals
, panther_logs.public.aws_cloudtrail
| where p_event_time between datetime('2024-11-25 15:06:52.343407388') - time.parse_timespan('30m') .. datetime('2024-11-25 15:06:52.343407388') + time.parse_timespan('30m')
| where arrays.overlap(p_any_ip_addresses, ['10.11.12.13'])
or arrays.overlap(p_any_trace_ids, ['ASIADFJLKEFINDLKFJLJ'])
or arrays.overlap(p_any_usernames, ['ariel.ropek'])
| sort p_event_time

@ben-githubs
Copy link
Contributor

We should add a couple unit tests (in the global_helpers_test.py file) but otherwise looks good!

@arielkr256 arielkr256 added the enhancement New feature or request label Nov 27, 2024
@arielkr256
Copy link
Contributor Author

@ben-githubs good call on the unit tests, caught an issue with the Immutable event types.

@ben-githubs ben-githubs enabled auto-merge (squash) December 3, 2024 15:30
@arielkr256 arielkr256 disabled auto-merge December 4, 2024 16:29
@arielkr256 arielkr256 merged commit ea063d5 into develop Dec 4, 2024
6 checks passed
@arielkr256 arielkr256 deleted the pantherflow-investigator branch December 4, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants