redcanaryco / surveyor

A cross-platform baselining, threat hunting, and attack surface analysis tool for security teams.
MIT License
170 stars 59 forks source link

Refactor, SentinelOne support, and miscellaneous improvements #53

Closed jholtmann closed 2 years ago

jholtmann commented 2 years ago

This is a fairly major rewrite of the surveyor tool. My initial goal was to implement SentinelOne support but I realized that doing so would be very difficult given the project's architecture. The problems were as follows:

I addressed these issues in the following ways:

1. Refactor for CBR/CBTH/Defender products:

The benefits of this refactor are as follows:

2. Refactored process_search and nested_process_search:

3. Miscellaneous changes made:

Resolved issues:

Implemented support for SentinelOne:

Potential Breaking Changes:

New module dependencies:

To-Do:

jholtmann commented 2 years ago

Summary of the most recent changes:

jholtmann commented 2 years ago

Proposed changes to the wiki. As wiki pages can't be included in a pull request I can add these once this PR is merged. Please let me know if there are any other wiki pages that need to be updated @rc-abodkins.

Changelog

March 2022

Getting Started

Prerequisites

You need the following to use Surveyor:

Save your SentinelOne API Credentials

To use Surveyor with SentinelOne, you need the following information from SentinelOne:

Save your configuration information in an INI file as follows:

[profile_name_here]
url=<URL>
token=<API KEY>

Alternatively, you can omit the token field and specify your API token via the environment variable S1_TOKEN.

When you run Surveyor, specify the path of the INI file with the --creds option (e.g. py surveyor.py s1 --creds s1_creds.ini). Note that unless otherwise specified with --profile, Surveyor uses the credentials and URL provided by the [default] header.

Other Changes

It might make sense to create per-product wiki pages that document any additional options implemented for those products. For example, the SentinelOne page could document the --site-id, --account-id, and --account-name options.

rc-abodkins commented 2 years ago

@jholtmann to the Getting Started wiki we need to add that Python 3.9 is required for Surveyor to work as well as the new commands and their structure.

I think a per product Wiki is the right way to go and then we can also move all the credential pieces to that and additional information.

jholtmann commented 2 years ago

@rc-abodkins I have updated my comment above to reflect that addition. The README in this pull request also mentions the 3.9+ requirement.

EricMich commented 2 years ago

unsubscribe

On Wed, Mar 30, 2022 at 12:37 PM Jonathan Holtmann @.***> wrote:

@rc-abodkins https://github.com/rc-abodkins I have updated my comment above to reflect that addition. The README in this pull request also mentions the 3.9+ requirement.

— Reply to this email directly, view it on GitHub https://github.com/redcanaryco/surveyor/pull/53#issuecomment-1083548708, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGKEWCSMBRN7ZQNMVJBXHDVCSUQ3ANCNFSM5QHJ2VKQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>